{"components":{"responses":{"documents_BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_ApiErrors"}}},"description":"The route rejected the project, item identifier or arguments."},"documents_Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_ApiErrors"}}},"description":"The file's checkout or restore state conflicts with the request."},"documents_Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_ApiErrors"}}},"description":"The active tenant, scope, project capability or effective ACL denied the operation."},"documents_InvalidFields":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_ValidationErrors"}}},"description":"The route rejected invalid input fields or content."},"documents_NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_ApiErrors"}}},"description":"The scoped project, item, grant or upload was not found."},"documents_RateLimited":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_ApiErrors"}}},"description":"The request exceeds the applicable rate limit."},"documents_Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_ApiErrors"}}},"description":"Authentication is required."},"notifications_AuthUnavailable":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_Error"}}},"description":"Delegated authentication is unavailable."},"notifications_BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_Error"}}},"description":"The request is invalid."},"notifications_Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_Error"}}},"description":"The token scope, project company, workspace access, or required permission denies the action."},"notifications_InternalError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_Error"}}},"description":"The server could not complete the request."},"notifications_NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_Error"}}},"description":"The project or specified notification recipient rule was not found."},"notifications_RateLimited":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_Error"}}},"description":"The request was rate limited.","headers":{"RateLimit-Limit":{"description":"Maximum requests in the current window.","schema":{"minimum":1,"type":"integer"}},"RateLimit-Remaining":{"description":"Requests available in the current window.","schema":{"minimum":0,"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate limit window resets.","schema":{"minimum":0,"type":"integer"}},"Retry-After":{"description":"Seconds before retrying.","schema":{"minimum":0,"type":"integer"}}}},"notifications_Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_Error"}}},"description":"A valid bearer token is required."},"photos_PhotoMetadataAuthUnavailable":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataError"}}},"description":"Delegated authentication is unavailable."},"photos_PhotoMetadataBadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataError"}}},"description":"The project query, JSON syntax, or operation input is invalid."},"photos_PhotoMetadataForbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataError"}}},"description":"The token scope, project access, workspace status, or Photos permission denies the operation."},"photos_PhotoMetadataInternalError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataError"}}},"description":"The server could not complete the request."},"photos_PhotoMetadataInvalidBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataFieldErrors"}}},"description":"One or more body fields failed validation."},"photos_PhotoMetadataNotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataError"}}},"description":"The target project, photo, comment, or tag was missing or inaccessible in this context."},"photos_PhotoMetadataRateLimited":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataError"}}},"description":"The request was rate limited."},"photos_PhotoMetadataUnauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataError"}}},"description":"A valid bearer token is required."},"timesheets_WorkflowAuthUnavailable":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_WorkflowError"}}},"description":"Delegated authentication is unavailable."},"timesheets_WorkflowForbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_WorkflowError"}}},"description":"The token scope, project access, workspace status, or Timesheets permission denies the operation."},"timesheets_WorkflowInternalError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_WorkflowError"}}},"description":"The server could not complete the request."},"timesheets_WorkflowNotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_WorkflowError"}}},"description":"The target or a required linked record was missing or inaccessible in this project."},"timesheets_WorkflowRateLimited":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_WorkflowError"}}},"description":"The request was rate limited."},"timesheets_WorkflowUnauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_WorkflowError"}}},"description":"A valid token is required."},"wbs_WbsAuthUnavailable":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsApiError"}}},"description":"Delegated authentication is unavailable."},"wbs_WbsBadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsApiError"}}},"description":"Invalid JSON or an invalid parent for the segment item."},"wbs_WbsDeleteConflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsApiError"}}},"description":"An assembled WBS code references an item to be deleted, or a retained hierarchy blocks deletion."},"wbs_WbsForbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsApiError"}}},"description":"Access to the operation or project was denied."},"wbs_WbsInternalError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsApiError"}}},"description":"The server could not complete the request."},"wbs_WbsInvalidInput":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsValidationError"}}},"description":"The segment item update body failed field validation."},"wbs_WbsNotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsApiError"}}},"description":"The requested record or context was not found."},"wbs_WbsRateLimited":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsApiError"}}},"description":"The request was rate limited."},"wbs_WbsUnauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsApiError"}}},"description":"A valid token is required."}},"schemas":{"accounting_AcceptHighResult":{"properties":{"matched":{"type":"integer"},"total":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["matched","total"],"type":"object"},"accounting_Account":{"properties":{"cash_flow_category":{"enum":["operating","investing","financing",null]},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"description":{"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"is_active":{"type":"boolean"},"is_control":{"type":"boolean"},"is_postable":{"type":"boolean"},"job_cost_type":{"enum":["labor","material","subcontract","equipment","other","burden",null]},"name":{"type":"string"},"normal_balance":{"enum":["debit","credit"]},"number":{"type":"string"},"parent_id":{"minimum":1,"type":["integer","null"]},"require_cost_code":{"type":"boolean"},"require_cost_type":{"type":"boolean"},"require_project":{"type":"boolean"},"subtype":{"type":["string","null"]},"system_role":{"description":"Control-account role, unique per company (e.g. AP_CONTROL)","type":["string","null"]},"type":{"enum":["bank","cash","accounts_receivable","retainage_receivable","contract_asset","other_current_asset","inventory","fixed_asset","accumulated_depreciation","other_asset","accounts_payable","retainage_payable","contract_liability","credit_card","payroll_liability","sales_tax_payable","other_current_liability","long_term_liability","equity","retained_earnings","income","other_income","cost_of_revenue","expense","other_expense"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","number","name","description","type","subtype","normal_balance","parent_id","is_postable","is_active","system_role","is_control","require_project","require_cost_code","require_cost_type","job_cost_type","currency","cash_flow_category","created_at","updated_at"],"type":"object"},"accounting_AccountNode":{"properties":{"cash_flow_category":{"enum":["operating","investing","financing",null]},"children":{"items":{"$ref":"#/components/schemas/accounting_AccountNode"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"description":{"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"is_active":{"type":"boolean"},"is_control":{"type":"boolean"},"is_postable":{"type":"boolean"},"job_cost_type":{"enum":["labor","material","subcontract","equipment","other","burden",null]},"name":{"type":"string"},"normal_balance":{"enum":["debit","credit"]},"number":{"type":"string"},"parent_id":{"minimum":1,"type":["integer","null"]},"require_cost_code":{"type":"boolean"},"require_cost_type":{"type":"boolean"},"require_project":{"type":"boolean"},"subtype":{"type":["string","null"]},"system_role":{"description":"Control-account role, unique per company (e.g. AP_CONTROL)","type":["string","null"]},"type":{"enum":["bank","cash","accounts_receivable","retainage_receivable","contract_asset","other_current_asset","inventory","fixed_asset","accumulated_depreciation","other_asset","accounts_payable","retainage_payable","contract_liability","credit_card","payroll_liability","sales_tax_payable","other_current_liability","long_term_liability","equity","retained_earnings","income","other_income","cost_of_revenue","expense","other_expense"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","number","name","description","type","subtype","normal_balance","parent_id","is_postable","is_active","system_role","is_control","require_project","require_cost_code","require_cost_type","job_cost_type","currency","cash_flow_category","created_at","updated_at","children"],"type":"object"},"accounting_AccountRec":{"additionalProperties":false,"properties":{"account":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"normal_balance":{"type":"string"},"number":{"type":"string"},"type":{"type":"string"}},"required":["id","number","name","type","normal_balance"],"type":"object"},"aging":{"additionalProperties":false,"properties":{"buckets":{"additionalProperties":false,"properties":{"0-30":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"31-60":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"61-90":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"over_90":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["0-30","31-60","61-90","over_90"],"type":"object"},"oldest_days":{"type":["integer","null"]}},"required":["oldest_days","buckets"],"type":"object"},"auto_reconciled":{"type":"boolean"},"entity_id":{"type":"integer"},"frequency":{"enum":["monthly","quarterly"],"type":"string"},"id":{"type":"integer"},"items":{"items":{"$ref":"#/components/schemas/accounting_RecItem"},"type":"array"},"live":{"additionalProperties":false,"properties":{"bank_reconciliation":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"reviewed":{"type":"boolean"},"statement_date":{"format":"date","type":"string"}},"required":["id","statement_date","reviewed"],"type":["object","null"]},"gl_balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"items_total":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"schedule_total":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"support_balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"tie_out":{"additionalProperties":false,"properties":{"message":{"type":"string"},"status":{"enum":["passed","failed","unavailable"],"type":"string"}},"required":["status","message"],"type":["object","null"]},"unexplained":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"within_tolerance":{"type":"boolean"}},"required":["gl_balance","support_balance","items_total","schedule_total","unexplained","within_tolerance","tie_out","bank_reconciliation"],"type":"object"},"material":{"type":"boolean"},"materiality_abs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"materiality_pct":{"type":"string"},"period_id":{"type":"integer"},"period_name":{"type":"string"},"prep_note":{"type":["string","null"]},"prepared_at":{"format":"date-time","type":["string","null"]},"prepared_by_id":{"type":["integer","null"]},"review_level":{"enum":[1,2],"type":"integer"},"review_note":{"type":["string","null"]},"reviewed_at":{"format":"date-time","type":["string","null"]},"reviewed_by_id":{"type":["integer","null"]},"risk_rating":{"type":"string"},"rule_id":{"type":["integer","null"]},"second_review_note":{"type":["string","null"]},"second_reviewed_at":{"format":"date-time","type":["string","null"]},"second_reviewed_by_id":{"type":["integer","null"]},"signed":{"additionalProperties":false,"properties":{"balance_credit":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"balance_debit":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"gl_balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"items_total":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"support_balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"unexplained":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]}},"required":["gl_balance","support_balance","items_total","unexplained","balance_debit","balance_credit"],"type":"object"},"source":{"enum":["tie_out","manual"],"type":"string"},"stale":{"type":"boolean"},"stale_reason":{"type":["string","null"]},"status":{"enum":["not_started","in_progress","prepared","reviewed"],"type":"string"},"tie_out_key":{"type":["string","null"]},"tolerance":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","period_id","period_name","entity_id","rule_id","account","source","tie_out_key","risk_rating","frequency","review_level","materiality_abs","materiality_pct","material","tolerance","status","auto_reconciled","stale","stale_reason","live","signed","prepared_by_id","prepared_at","prep_note","reviewed_by_id","reviewed_at","review_note","second_reviewed_by_id","second_reviewed_at","second_review_note","aging","items"],"type":"object"},"accounting_AccountRef":{"properties":{"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"number":{"type":"string"},"type":{"type":"string"}},"required":["id","number","name","type"],"type":"object"},"accounting_AcctAttachment":{"additionalProperties":false,"properties":{"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"doc_id":{"type":"integer"},"doc_type":{"enum":["journal_entry","ap_bill","vendor","ap_compliance","ap_lien_waiver","ar_invoice","ar_receipt","bank_transaction","fixed_asset","wip_snapshot","account_rec","policy_signoff"],"type":"string"},"download_url":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"sha256":{"pattern":"^[0-9a-f]{64}$","type":"string"},"size_bytes":{"minimum":1,"type":"integer"},"uploaded_by":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"name":{"type":["string","null"]}},"required":["id","name"],"type":"object"}},"required":["id","doc_type","doc_id","name","content_type","size_bytes","sha256","uploaded_by","created_at","download_url"],"type":"object"},"accounting_AcctCoaPack":{"additionalProperties":false,"properties":{"accounts":{"items":{"additionalProperties":false,"properties":{"header":{"type":"boolean"},"job_cost_type":{"type":["string","null"]},"name":{"type":"string"},"number":{"type":"string"},"parent":{"type":["string","null"]},"type":{"type":"string"}},"required":["number","name","type","header","parent","job_cost_type"],"type":"object"},"type":"array"},"cost_types":{"items":{"additionalProperties":false,"properties":{"account":{"type":"string"},"label":{"type":"string"},"type":{"enum":["labor","material","subcontract","equipment","other","burden"],"type":"string"}},"required":["type","label","account"],"type":"object"},"type":"array"},"description":{"type":"string"},"dimensions":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"name":{"type":"string"},"values":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"type":"object"},"type":"array"}},"required":["code","name","values"],"type":"object"},"type":"array"},"key":{"enum":["general_contractor","specialty_contractor","home_builder","heavy_civil","construction_management"],"type":"string"},"name":{"type":"string"},"recommended_edition":{"enum":["essentials","professional","enterprise"],"type":"string"}},"required":["key","name","description","recommended_edition","accounts","dimensions","cost_types"],"type":"object"},"accounting_AcctCoaPackApplied":{"additionalProperties":false,"properties":{"created":{"items":{"type":"string"},"type":"array"},"dimensions_created":{"items":{"type":"string"},"type":"array"},"hash":{"type":"string"},"kept":{"items":{"type":"string"},"type":"array"},"pack":{"enum":["general_contractor","specialty_contractor","home_builder","heavy_civil","construction_management"],"type":"string"},"roles":{"items":{"additionalProperties":false,"properties":{"account":{"type":["string","null"]},"note":{"type":"string"},"role":{"type":"string"},"status":{"enum":["kept","assigned","unmapped"],"type":"string"}},"required":["role","status","account","note"],"type":"object"},"type":"array"}},"required":["pack","hash","created","kept","roles","dimensions_created"],"type":"object"},"accounting_AcctCoaPackPlan":{"additionalProperties":false,"properties":{"create":{"items":{"additionalProperties":false,"properties":{"header":{"type":"boolean"},"name":{"type":"string"},"note":{"type":["string","null"]},"number":{"type":"string"},"parent":{"type":["string","null"]},"role":{"type":["string","null"]},"type":{"type":"string"}},"required":["number","name","type","header","parent","role","note"],"type":"object"},"type":"array"},"dimensions":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"status":{"enum":["create","exists"],"type":"string"}},"required":["code","status"],"type":"object"},"type":"array"},"hash":{"type":"string"},"kept":{"items":{"additionalProperties":false,"properties":{"differs":{"type":"boolean"},"name":{"type":"string"},"number":{"type":"string"},"packName":{"type":"string"},"posted":{"type":"boolean"}},"required":["number","name","packName","differs","posted"],"type":"object"},"type":"array"},"pack":{"enum":["general_contractor","specialty_contractor","home_builder","heavy_civil","construction_management"],"type":"string"},"roles":{"items":{"additionalProperties":false,"properties":{"account":{"type":["string","null"]},"note":{"type":"string"},"role":{"type":"string"},"status":{"enum":["kept","assigned","unmapped"],"type":"string"}},"required":["role","status","account","note"],"type":"object"},"type":"array"}},"required":["pack","hash","create","kept","roles","dimensions"],"type":"object"},"accounting_AcctDimension":{"additionalProperties":false,"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"default_requirement":{"enum":["optional","required"],"type":"string"},"description":{"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"is_active":{"type":"boolean"},"kind":{"enum":["department","division","location","custom"],"type":"string"},"name":{"type":"string"},"position":{"type":"integer"},"rules":{"items":{"$ref":"#/components/schemas/accounting_AcctDimensionRule"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"values":{"items":{"$ref":"#/components/schemas/accounting_AcctDimensionValue"},"type":"array"}},"required":["id","code","name","kind","description","default_requirement","is_active","position","created_at","updated_at","values","rules"],"type":"object"},"accounting_AcctDimensionHistoryEvent":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor_id":{"type":"integer"},"at":{"format":"date-time","type":"string"},"changes":{"type":["object","array","null"]},"id":{"minimum":1,"type":"integer"},"item_id":{"minimum":1,"type":"integer"},"item_type":{"enum":["AcctDimension","AcctDimensionValue"],"type":"string"},"summary":{"type":"string"}},"required":["id","item_type","item_id","action","summary","actor_id","changes","at"],"type":"object"},"accounting_AcctDimensionRule":{"additionalProperties":false,"properties":{"account_from":{"type":["string","null"]},"account_id":{"type":["integer","null"]},"account_to":{"type":["string","null"]},"account_type":{"enum":["bank","cash","accounts_receivable","retainage_receivable","contract_asset","other_current_asset","inventory","fixed_asset","accumulated_depreciation","other_asset","accounts_payable","retainage_payable","contract_liability","credit_card","payroll_liability","sales_tax_payable","other_current_liability","long_term_liability","equity","retained_earnings","income","other_income","cost_of_revenue","expense","other_expense",null],"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"requirement":{"enum":["optional","required"],"type":"string"}},"required":["id","account_id","account_type","account_from","account_to","requirement"],"type":"object"},"accounting_AcctDimensionRuleInput":{"additionalProperties":false,"properties":{"account_from":{"maxLength":20,"minLength":1,"type":["string","null"]},"account_id":{"minimum":1,"type":["integer","null"]},"account_to":{"maxLength":20,"minLength":1,"type":["string","null"]},"account_type":{"enum":["bank","cash","accounts_receivable","retainage_receivable","contract_asset","other_current_asset","inventory","fixed_asset","accumulated_depreciation","other_asset","accounts_payable","retainage_payable","contract_liability","credit_card","payroll_liability","sales_tax_payable","other_current_liability","long_term_liability","equity","retained_earnings","income","other_income","cost_of_revenue","expense","other_expense",null],"type":["string","null"]},"requirement":{"enum":["optional","required"],"type":"string"}},"required":["requirement"],"type":"object"},"accounting_AcctDimensionValue":{"additionalProperties":false,"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"dimension_id":{"minimum":1,"type":"integer"},"effective_from":{"format":"date","type":["string","null"]},"effective_to":{"format":"date","type":["string","null"]},"entity_ids":{"items":{"type":"integer"},"type":"array"},"id":{"minimum":1,"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"parent_id":{"type":["integer","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","dimension_id","code","name","description","parent_id","effective_from","effective_to","entity_ids","is_active","created_at","updated_at"],"type":"object"},"accounting_AcctEdition":{"additionalProperties":false,"properties":{"applied":{"additionalProperties":false,"properties":{"diff":{"$ref":"#/components/schemas/accounting_AcctEditionDiff"},"kept_controls":{"items":{"type":"string"},"type":"array"},"revision":{"type":"integer"}},"required":["revision","kept_controls","diff"],"type":"object"},"areas":{"items":{"additionalProperties":false,"properties":{"key":{"type":"string"},"label":{"type":"string"},"note":{"type":"string"}},"required":["key","label","note"],"type":"object"},"type":"array"},"edition":{"enum":["essentials","professional","enterprise",null],"type":["string","null"]},"edition_name":{"type":["string","null"]},"editions":{"items":{"additionalProperties":false,"properties":{"audience":{"type":"string"},"features":{"additionalProperties":false,"properties":{"apAutomation":{"type":"boolean"},"closeCockpit":{"type":"boolean"},"collections":{"type":"boolean"},"commitments":{"type":"boolean"},"consolidation":{"type":"boolean"},"customerPortal":{"type":"boolean"},"dimensions":{"type":"boolean"},"fixedAssets":{"type":"boolean"},"fpa":{"type":"boolean"},"intercompany":{"type":"boolean"},"leases":{"type":"boolean"},"multiCurrency":{"type":"boolean"},"multiEntity":{"type":"boolean"},"qualifiedReviews":{"type":"boolean"},"reportBuilder":{"type":"boolean"},"retainage":{"type":"boolean"},"wip":{"type":"boolean"}},"type":"object"},"key":{"enum":["essentials","professional","enterprise"],"type":"string"},"name":{"type":"string"},"policies":{"$ref":"#/components/schemas/accounting_AcctEditionPolicies"},"recommended_roles":{"items":{"enum":["owner","controller","accountant","ap_clerk","ar_clerk","payroll_admin","project_manager_view","auditor_readonly"],"type":"string"},"type":"array"}},"required":["key","name","audience","features","policies","recommended_roles"],"type":"object"},"type":"array"},"features":{"additionalProperties":false,"properties":{"apAutomation":{"type":"boolean"},"closeCockpit":{"type":"boolean"},"collections":{"type":"boolean"},"commitments":{"type":"boolean"},"consolidation":{"type":"boolean"},"customerPortal":{"type":"boolean"},"dimensions":{"type":"boolean"},"fixedAssets":{"type":"boolean"},"fpa":{"type":"boolean"},"intercompany":{"type":"boolean"},"leases":{"type":"boolean"},"multiCurrency":{"type":"boolean"},"multiEntity":{"type":"boolean"},"qualifiedReviews":{"type":"boolean"},"reportBuilder":{"type":"boolean"},"retainage":{"type":"boolean"},"wip":{"type":"boolean"}},"type":"object"},"kept_controls":{"items":{"type":"string"},"type":"array"},"overrides":{"additionalProperties":{"type":"boolean"},"type":"object"},"policies":{"$ref":"#/components/schemas/accounting_AcctEditionPolicies"},"recommended_roles":{"items":{"enum":["owner","controller","accountant","ap_clerk","ar_clerk","payroll_admin","project_manager_view","auditor_readonly"],"type":"string"},"type":"array"},"revision":{"type":"integer"},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["edition","edition_name","features","overrides","policies","kept_controls","recommended_roles","areas","revision","updated_at","editions"],"type":"object"},"accounting_AcctEditionDiff":{"additionalProperties":false,"properties":{"blocked":{"items":{"type":"string"},"type":"array"},"features":{"items":{"additionalProperties":false,"properties":{"from":{"type":"boolean"},"key":{"type":"string"},"label":{"type":"string"},"to":{"type":"boolean"},"warning":{"type":["string","null"]}},"required":["key","label","from","to","warning"],"type":"object"},"type":"array"},"from":{"type":["string","null"]},"hash":{"type":"string"},"policies":{"items":{"additionalProperties":false,"properties":{"blocked":{"type":["string","null"]},"control":{"type":"boolean"},"direction":{"enum":["stronger","weaker","same","changed"],"type":"string"},"from":{"type":["string","boolean","integer","null"]},"key":{"type":"string"},"label":{"type":"string"},"to":{"type":["string","boolean","integer","null"]},"warning":{"type":["string","null"]}},"required":["key","label","from","to","direction","control","blocked","warning"],"type":"object"},"type":"array"},"to":{"enum":["essentials","professional","enterprise"],"type":"string"},"weaker":{"items":{"type":"string"},"type":"array"}},"required":["from","to","hash","weaker","blocked","features","policies"],"type":"object"},"accounting_AcctEditionPolicies":{"additionalProperties":false,"properties":{"close_require_recs":{"type":"boolean"},"close_require_tasks":{"type":"boolean"},"dunning":{"type":"boolean"},"recon_adjustment_limit":{"type":["string","null"]},"require_approval_above":{"type":["string","null"]},"require_mfa_for_accounting":{"type":"boolean"},"sod_mode":{"enum":["strict","small_team"],"type":"string"},"step_up_minutes":{"type":"integer"},"transfer_approval_above":{"type":["string","null"]},"transfer_approval_cross_entity":{"type":"boolean"}},"required":["sod_mode","require_approval_above","transfer_approval_above","transfer_approval_cross_entity","recon_adjustment_limit","close_require_tasks","close_require_recs","require_mfa_for_accounting","step_up_minutes","dunning"],"type":"object"},"accounting_AcctSetup":{"additionalProperties":false,"properties":{"checklist":{"items":{"additionalProperties":false,"properties":{"detail":{"type":"string"},"href":{"type":["string","null"]},"key":{"type":"string"},"label":{"type":"string"},"ok":{"type":"boolean"}},"required":["key","label","ok","detail","href"],"type":"object"},"type":"array"},"completed_at":{"format":"date-time","type":["string","null"]},"current":{"enum":["profile","edition","coa","entities","bank_accounts","opening_balances","approvals","users","go_live",null],"type":["string","null"]},"industry_pack":{"type":["string","null"]},"profile":{"oneOf":[{"$ref":"#/components/schemas/accounting_AcctSetupProfile"},{"type":"null"}]},"recommendation":{"oneOf":[{"additionalProperties":false,"properties":{"edition":{"enum":["essentials","professional","enterprise"],"type":"string"},"pack":{"enum":["general_contractor","specialty_contractor","home_builder","heavy_civil","construction_management"],"type":"string"}},"required":["edition","pack"],"type":"object"},{"type":"null"}]},"revision":{"type":"integer"},"steps":{"items":{"additionalProperties":false,"properties":{"key":{"enum":["profile","edition","coa","entities","bank_accounts","opening_balances","approvals","users","go_live"],"type":"string"},"marked":{"type":"boolean"},"skippable":{"type":"boolean"},"status":{"enum":["done","skipped","pending"],"type":"string"},"title":{"type":"string"}},"required":["key","title","status","marked","skippable"],"type":"object"},"type":"array"}},"required":["steps","current","profile","industry_pack","recommendation","checklist","completed_at","revision"],"type":"object"},"accounting_AcctSetupProfile":{"additionalProperties":false,"properties":{"audited":{"type":"boolean"},"employees":{"maximum":1000000,"minimum":0,"type":"integer"},"entities":{"maximum":500,"minimum":1,"type":"integer"},"foreign_operations":{"type":"boolean"},"industry":{"enum":["general_contractor","specialty_contractor","home_builder","heavy_civil","construction_management"],"type":"string"},"payroll":{"type":"boolean"}},"required":["industry","employees","entities","foreign_operations","audited","payroll"],"type":"object"},"accounting_Accuracy":{"properties":{"as_of":{"format":"date","type":"string"},"buckets":{"items":{"properties":{"abs_error":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"abs_pct_error":{"pattern":"^\\d+\\.\\d{2}$","type":["string","null"]},"actual_closing":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"actual_in":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"actual_net":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"actual_out":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"end":{"format":"date","type":"string"},"error":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_closing":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_in":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_net":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_out":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"index":{"type":"integer"},"start":{"format":"date","type":"string"}},"required":["index","start","end","forecast_in","forecast_out","forecast_net","actual_in","actual_out","actual_net","error","abs_error","abs_pct_error","forecast_closing","actual_closing"],"type":"object"},"type":"array"},"explain":{"items":{"properties":{"formula":{"type":"string"},"label":{"type":"string"}},"required":["label","formula"],"type":"object"},"type":"array"},"pending_buckets":{"type":"integer"},"snapshot":{"$ref":"#/components/schemas/accounting_Snapshot"},"summary":{"properties":{"actual_net":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bias":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"buckets":{"type":"integer"},"forecast_net":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"mae":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"mape":{"pattern":"^\\d+\\.\\d{2}$","type":["string","null"]}},"required":["buckets","forecast_net","actual_net","bias","mae","mape"],"type":"object"}},"required":["snapshot","as_of","pending_buckets","buckets","summary","explain"],"type":"object"},"accounting_AchNotice":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ap_payment_id":{"type":["integer","null"]},"applied_at":{"format":"date-time","type":["string","null"]},"applied_by_id":{"type":["integer","null"]},"code":{"description":"R-code (return) or C-code (NOC)","type":"string"},"due_date":{"description":"NOC: six banking days after receipt (Nacha Rule 2.12.1)","format":"date","type":["string","null"]},"entry_id":{"type":["integer","null"]},"id":{"type":"integer"},"id_number":{"description":"Identification number of the original entry: V<vendor id> for AP, the employee number for payroll","type":"string"},"imported_by_id":{"type":"integer"},"kind":{"enum":["return","noc"],"type":"string"},"message":{"type":["string","null"]},"original_trace":{"type":"string"},"party_id":{"type":["integer","null"]},"party_kind":{"enum":["vendor","employee",null],"type":["string","null"]},"pay_check_id":{"type":["integer","null"]},"received_date":{"format":"date","type":"string"},"status":{"enum":["open","applied","manual","unmatched"],"type":"string"},"trace_number":{"type":["string","null"]}},"required":["id","kind","code","original_trace","id_number","amount","received_date","status"],"type":"object"},"accounting_Adjustment":{"properties":{"account_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"driver":{"type":["string","null"]},"from_date":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"memo":{"type":["string","null"]},"method":{"enum":["percent","amount","shift_days"]},"project_id":{"minimum":1,"type":["integer","null"]},"scenario_id":{"minimum":1,"type":"integer"},"target":{"enum":["budget","cash"]},"to_date":{"format":"date","type":["string","null"]},"value":{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"}},"required":["id","scenario_id","target","method","value","account_id","project_id","driver","from_date","to_date","memo","created_by_id","created_at"],"type":"object"},"accounting_AlertTest":{"additionalProperties":false,"properties":{"attempts":{"items":{"additionalProperties":false,"properties":{"channel":{"enum":["email","webhook"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"delivery_error_code":{"type":["string","null"]},"delivery_http_status":{"type":["integer","null"]},"delivery_outcome":{"enum":["pending","succeeded","cancelled",null],"type":["string","null"]},"email_message_id":{"type":["integer","null"]},"error_code":{"description":"A sanitized code, never an address or provider text","type":["string","null"]},"id":{"type":"integer"},"outcome":{"description":"recorded: written to the local outbox (no external delivery); accepted: the email provider accepted it (not proof of mailbox delivery); queued: a signed webhook test delivery was queued (see delivery_outcome)","enum":["recorded","accepted","failed","queued","skipped","no_recipient"],"type":"string"},"recipient_user_id":{"type":["integer","null"]},"subscription_id":{"type":["integer","null"]},"transport":{"description":"email: the configured transport (outbox records locally, webhook or resend hand to a provider); webhook: durable_delivery","type":"string"},"webhook_delivery_id":{"format":"uuid","type":["string","null"]}},"required":["id","channel","transport","recipient_user_id","subscription_id","email_message_id","webhook_delivery_id","outcome","error_code","created_at"],"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"type":"integer"},"job_id":{"type":["integer","null"]},"requested_by_id":{"type":"integer"},"status":{"enum":["queued","delivered","partial","failed"],"type":"string"}},"required":["id","status","requested_by_id","job_id","created_at","finished_at","attempts"],"type":"object"},"accounting_ApAging":{"properties":{"as_of":{"format":"date","type":"string"},"basis":{"type":"string"},"bucket_labels":{"items":{"type":"string"},"type":"array"},"rows":{"items":{"properties":{"buckets":{"items":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"type":"array"},"retainage":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vendor_id":{"type":"integer"},"vendor_name":{"type":["string","null"]}},"required":["vendor_id","vendor_name","buckets","retainage","total"],"type":"object"},"type":"array"},"totals":{"properties":{"buckets":{"items":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"type":"array"},"retainage":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["buckets","retainage","total"],"type":"object"}},"required":["as_of","basis","bucket_labels","rows","totals"],"type":"object"},"accounting_ApApplication":{"properties":{"amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bill_id":{"type":"integer"},"credit_id":{"type":["integer","null"]},"date":{"format":"date","type":"string"},"discount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"id":{"type":"integer"},"payment_id":{"type":["integer","null"]},"voided":{"type":"boolean"},"withholding":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","bill_id","payment_id","credit_id","date","amount","discount","withholding","voided"],"type":"object"},"accounting_ApAutomationSettings":{"properties":{"capture_address":{"description":"ap+<token>@ACCT_AP_CAPTURE_DOMAIN; null when capture by email is not deployed.","type":["string","null"]},"capture_allowed_senders":{"items":{"type":"string"},"type":"array"},"capture_enabled":{"type":"boolean"},"portal_enabled":{"type":"boolean"},"remittance_enabled":{"type":"boolean"},"updated_at":{"format":"date-time","type":["string","null"]},"virtual_card_clearing_account_id":{"type":["integer","null"]},"virtual_card_enabled":{"type":"boolean"},"virtual_card_funding_bank_account_id":{"type":["integer","null"]},"virtual_card_provider":{"type":"string"}},"required":["capture_enabled","portal_enabled","remittance_enabled","virtual_card_enabled"],"type":"object"},"accounting_ApBankChangeRequest":{"properties":{"account_last4":{"type":"string"},"account_type":{"enum":["checking","savings"],"type":"string"},"change_hash":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"forwarded_at":{"format":"date-time","type":["string","null"]},"forwarded_by_id":{"type":["integer","null"]},"id":{"type":"integer"},"note":{"type":["string","null"]},"party_profile_id":{"type":"integer"},"portal_grant_id":{"type":"integer"},"review_note":{"type":["string","null"]},"reviewed_at":{"format":"date-time","type":["string","null"]},"reviewed_by_id":{"type":["integer","null"]},"routing_last4":{"type":"string"},"status":{"enum":["pending_review","forwarded","rejected"],"type":"string"},"vendor_id":{"type":"integer"}},"required":["id","vendor_id","status","routing_last4","account_last4","account_type"],"type":"object"},"accounting_ApBill":{"properties":{"approved_at":{"format":"date-time","type":["string","null"]},"billed_through":{"format":"date","type":["string","null"]},"commitment_id":{"type":["integer","null"]},"commitment_type":{"type":["string","null"]},"contributor_ids":{"description":"Every user who created or edited the bill. None of them may approve it, override its holds or release its payment.","items":{"type":"integer"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"direct_cost_id":{"type":["integer","null"]},"discount_date":{"format":"date","type":["string","null"]},"discount_percent":{"description":"Rate/quantity, 6 dp","type":["string","null"]},"due_date":{"format":"date","type":"string"},"entity_id":{"type":"integer"},"entry_id":{"type":["integer","null"]},"hold_overrides":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"id":{"type":"integer"},"invoice_date":{"format":"date","type":"string"},"invoice_number":{"type":["string","null"]},"kind":{"enum":["bill","credit"],"type":"string"},"last_edited_by_id":{"type":"integer"},"lines":{"items":{"$ref":"#/components/schemas/accounting_ApBillLine"},"type":"array"},"match":{"additionalProperties":true,"type":["object","null"]},"memo":{"type":["string","null"]},"number":{"type":"string"},"off_rent_date":{"format":"date","type":["string","null"]},"open_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"paid_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pay_when_paid_mode":{"type":["string","null"]},"pay_when_paid_pay_app_id":{"type":["integer","null"]},"posting_date":{"format":"date","type":"string"},"prepared_by_id":{"type":"integer"},"requisition_id":{"type":["integer","null"]},"retainage_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"retainage_open":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"retainage_released":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"revision":{"type":"integer"},"status":{"enum":["draft","pending_approval","posted","void"],"type":"string"},"submitted_at":{"format":"date-time","type":["string","null"]},"tax_code_id":{"type":["integer","null"]},"term_id":{"type":["integer","null"]},"total":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"updated_at":{"format":"date-time","type":"string"},"use_tax_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vendor_id":{"type":"integer"},"vendor_name":{"type":["string","null"]},"void_entry_id":{"type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_at":{"format":"date-time","type":["string","null"]}},"required":["id","number","kind","status","vendor_id","vendor_name","entity_id","invoice_number","invoice_date","posting_date","due_date","term_id","discount_percent","discount_date","memo","total","retainage_amount","use_tax_amount","tax_code_id","open_amount","retainage_open","paid_amount","retainage_released","commitment_type","commitment_id","requisition_id","direct_cost_id","pay_when_paid_pay_app_id","pay_when_paid_mode","off_rent_date","billed_through","match","hold_overrides","revision","prepared_by_id","last_edited_by_id","contributor_ids","submitted_at","approved_at","entry_id","voided_at","void_entry_id","void_reason","created_at","updated_at"],"type":"object"},"accounting_ApBillLine":{"properties":{"account_id":{"type":"integer"},"amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"commitment_line_item_id":{"type":["integer","null"]},"cost_code_id":{"type":["integer","null"]},"cost_type_id":{"type":["integer","null"]},"description":{"type":["string","null"]},"dimension_value_ids":{"description":"User-defined dimension values (AcctDimensionValue ids).","items":{"type":"integer"},"type":["array","null"]},"equipment_id":{"type":["integer","null"]},"id":{"type":"integer"},"line_no":{"type":"integer"},"project_id":{"type":["integer","null"]},"quantity":{"description":"Rate/quantity, 6 dp","type":["string","null"]},"reportable_1099":{"type":"boolean"},"retainage_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"retainage_percent":{"description":"Rate/quantity, 6 dp","type":["string","null"]},"tax_category":{"description":"Contractor tax category: CA fixtures are retail sales while materials are consumed; untaxed material on a consumer-model job defaults to use tax (AP).","enum":["material","fixture","labor","equipment",null],"nullable":true,"type":"string"},"unit_price":{"description":"Rate/quantity, 6 dp","type":["string","null"]},"use_tax":{"type":"boolean"}},"required":["id","line_no","account_id","description","amount","retainage_percent","retainage_amount","project_id","cost_code_id","cost_type_id","equipment_id","commitment_line_item_id","quantity","unit_price","use_tax","reportable_1099","tax_category","dimension_value_ids"],"type":"object"},"accounting_ApBillShow":{"properties":{"applications":{"items":{"$ref":"#/components/schemas/accounting_ApApplication"},"type":"array"},"approvals":{"items":{"properties":{"approved_at":{"format":"date-time","type":"string"},"step":{"type":"integer"},"user_id":{"type":"integer"}},"required":["user_id","step","approved_at"],"type":"object"},"type":"array"},"approvals_required":{"type":"integer"},"approved_at":{"format":"date-time","type":["string","null"]},"billed_through":{"format":"date","type":["string","null"]},"commitment_id":{"type":["integer","null"]},"commitment_type":{"type":["string","null"]},"contributor_ids":{"description":"Every user who created or edited the bill. None of them may approve it, override its holds or release its payment.","items":{"type":"integer"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"direct_cost_id":{"type":["integer","null"]},"discount_date":{"format":"date","type":["string","null"]},"discount_percent":{"description":"Rate/quantity, 6 dp","type":["string","null"]},"due_date":{"format":"date","type":"string"},"entity_id":{"type":"integer"},"entry_id":{"type":["integer","null"]},"hold_overrides":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"holds":{"items":{"$ref":"#/components/schemas/accounting_ApHold"},"type":"array"},"id":{"type":"integer"},"invoice_date":{"format":"date","type":"string"},"invoice_number":{"type":["string","null"]},"kind":{"enum":["bill","credit"],"type":"string"},"last_edited_by_id":{"type":"integer"},"lines":{"items":{"$ref":"#/components/schemas/accounting_ApBillLine"},"type":"array"},"match":{"additionalProperties":true,"type":["object","null"]},"memo":{"type":["string","null"]},"number":{"type":"string"},"off_rent_date":{"format":"date","type":["string","null"]},"open_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"paid_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pay_when_paid_mode":{"type":["string","null"]},"pay_when_paid_pay_app_id":{"type":["integer","null"]},"posting_date":{"format":"date","type":"string"},"prepared_by_id":{"type":"integer"},"requisition_id":{"type":["integer","null"]},"retainage_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"retainage_open":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"retainage_released":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"retainage_releases":{"items":{"properties":{"amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"date":{"format":"date","type":"string"},"entry_id":{"type":"integer"},"id":{"type":"integer"},"void_entry_id":{"type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_at":{"description":"Effective void date; as-of aging counts the release before it.","format":"date","type":["string","null"]}},"required":["id","date","amount","entry_id"],"type":"object"},"type":"array"},"revision":{"type":"integer"},"route_preview":{"type":"string"},"status":{"enum":["draft","pending_approval","posted","void"],"type":"string"},"submitted_at":{"format":"date-time","type":["string","null"]},"tax_code_id":{"type":["integer","null"]},"term_id":{"type":["integer","null"]},"total":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"updated_at":{"format":"date-time","type":"string"},"use_tax_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vendor_id":{"type":"integer"},"vendor_name":{"type":["string","null"]},"void_entry_id":{"type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_at":{"format":"date-time","type":["string","null"]}},"required":["id","number","kind","status","vendor_id","vendor_name","entity_id","invoice_number","invoice_date","posting_date","due_date","term_id","discount_percent","discount_date","memo","total","retainage_amount","use_tax_amount","tax_code_id","open_amount","retainage_open","paid_amount","retainage_released","commitment_type","commitment_id","requisition_id","direct_cost_id","pay_when_paid_pay_app_id","pay_when_paid_mode","off_rent_date","billed_through","match","hold_overrides","revision","prepared_by_id","last_edited_by_id","contributor_ids","submitted_at","approved_at","entry_id","voided_at","void_entry_id","void_reason","created_at","updated_at","lines","holds","approvals_required","route_preview","approvals","applications","retainage_releases"],"type":"object"},"accounting_ApCaptureSuggestions":{"properties":{"coding":{"items":{"properties":{"account_id":{"type":"integer"},"cost_code_id":{"type":["integer","null"]},"cost_type_id":{"type":["integer","null"]},"last_used":{"type":"string"},"project_id":{"type":["integer","null"]},"rule":{"enum":["vendor_history","vendor_default_account"],"type":"string"},"uses":{"type":"integer"}},"required":["account_id","uses","rule"],"type":"object"},"type":"array"},"open_commitment_lines":{"items":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"billed":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"commitment_id":{"type":"integer"},"commitment_line_item_id":{"type":"integer"},"commitment_number":{"type":"string"},"commitment_type":{"type":"string"},"cost_code_id":{"type":"integer"},"description":{"type":["string","null"]},"project_id":{"type":"integer"},"remaining":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"unit_cost":{"type":["string","null"]}},"type":"object"},"type":"array"},"profile":{"type":["object","null"]},"vendor_id":{"type":["integer","null"]},"vendor_rule":{"enum":["keyed","portal_grant","sender",null],"type":["string","null"]}},"required":["coding","open_commitment_lines"],"type":"object"},"accounting_ApCapturedDocument":{"properties":{"amount":{"type":["string","null"]},"assigned_to":{"properties":{"id":{"type":"integer"},"name":{"type":["string","null"]}},"type":["object","null"]},"bill":{"properties":{"id":{"type":"integer"},"number":{"type":["string","null"]},"status":{"type":["string","null"]}},"type":["object","null"]},"created_at":{"format":"date-time","type":"string"},"drafted_at":{"format":"date-time","type":["string","null"]},"duplicates":{"items":{"properties":{"bill_id":{"type":"integer"},"captured_document_id":{"type":"integer"},"kind":{"enum":["file_hash","vendor_invoice"],"type":"string"},"number":{"type":"string"}},"required":["kind","number"],"type":"object"},"type":"array"},"file":{"properties":{"content_type":{"type":"string"},"download_url":{"type":["string","null"]},"name":{"type":"string"},"scan_status":{"enum":["clean","internal_upload","unscanned_local","infected"],"type":"string"},"sha256":{"type":"string"},"size_bytes":{"type":"integer"}},"required":["name","content_type","size_bytes","sha256","scan_status"],"type":"object"},"id":{"type":"integer"},"invoice_date":{"format":"date","type":["string","null"]},"invoice_number":{"type":["string","null"]},"kind":{"enum":["invoice","pay_app"],"type":"string"},"notes":{"type":["string","null"]},"number":{"type":"string"},"portal_grant_id":{"type":["integer","null"]},"received_at":{"format":"date-time","type":"string"},"reject_reason":{"type":["string","null"]},"rejected_at":{"format":"date-time","type":["string","null"]},"sender_email":{"type":["string","null"]},"sender_name":{"type":["string","null"]},"source":{"enum":["upload","email","portal"],"type":"string"},"status":{"enum":["new","in_progress","drafted","rejected"],"type":"string"},"subject":{"type":["string","null"]},"suggested_vendor":{"properties":{"id":{"type":"integer"},"name":{"type":["string","null"]}},"type":["object","null"]},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":["string","null"]}},"type":["object","null"]}},"required":["id","number","source","status","received_at","file","duplicates"],"type":"object"},"accounting_ApCheck":{"properties":{"amount":{"type":"string"},"amount_words":{"type":"string"},"check_number":{"type":"string"},"date":{"format":"date","type":"string"},"memo":{"type":["string","null"]},"micr":{"type":"string"},"payee_line":{"type":"string"},"payment_id":{"type":"integer"},"stub":{"items":{"properties":{"date":{"type":"string"},"discount":{"type":"string"},"gross":{"type":"string"},"net":{"type":"string"},"reference":{"type":"string"}},"required":["reference","gross","discount","net"],"type":"object"},"type":"array"}},"required":["payment_id","check_number","date","amount","amount_words","payee_line","memo","micr","stub"],"type":"object"},"accounting_ApCompliance":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"effective_at":{"format":"date","type":["string","null"]},"expires_at":{"format":"date","type":["string","null"]},"id":{"type":"integer"},"kind":{"enum":["coi","w9","license","prequalification","stop_pay"],"type":"string"},"notes":{"type":["string","null"]},"reference":{"type":["string","null"]},"vendor_id":{"type":"integer"}},"required":["id","vendor_id","kind","reference","effective_at","expires_at","active","notes","created_at"],"type":"object"},"accounting_ApComplianceRequirement":{"properties":{"commitment_id":{"type":["integer","null"]},"commitment_type":{"enum":["WorkOrderContract","PurchaseOrderContract",null],"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"kind":{"enum":["coi","w9","license","prequalification","stop_pay"],"type":"string"},"notes":{"type":["string","null"]},"vendor_id":{"type":["integer","null"]}},"required":["id","kind","vendor_id","commitment_type","commitment_id","notes","created_at"],"type":"object"},"accounting_ApComplianceSubmission":{"properties":{"compliance_id":{"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"details":{"type":"object"},"file":{"properties":{"content_type":{"type":"string"},"download_url":{"type":["string","null"]},"name":{"type":"string"},"scan_status":{"type":"string"},"sha256":{"type":"string"},"size_bytes":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"kind":{"enum":["coi","lien_waiver"],"type":"string"},"lien_waiver_id":{"type":["integer","null"]},"portal_grant_id":{"type":"integer"},"review_note":{"type":["string","null"]},"reviewed_at":{"format":"date-time","type":["string","null"]},"reviewed_by_id":{"type":["integer","null"]},"status":{"enum":["pending","accepted","rejected"],"type":"string"},"vendor_id":{"type":"integer"}},"required":["id","vendor_id","kind","status","file"],"type":"object"},"accounting_ApForm1099":{"properties":{"explain":{"properties":{"steps":{"items":{"properties":{"cite":{"type":"string"},"formula":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"}},"required":["steps"],"type":"object"},"forms":{"items":{"properties":{"boxes":{"additionalProperties":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"type":"object"},"entity_code":{"type":["string","null"]},"entity_id":{"type":"integer"},"filed":{"properties":{"boxes":{"type":"object"},"corrected":{"type":"boolean"},"filed_at":{"format":"date-time","type":"string"},"source":{"enum":["iris","pub1220"],"type":"string"}},"type":["object","null"]},"filing_status":{"description":"Against the latest IRIS or Pub 1220 export: changed means the live amounts differ from what was filed.","enum":["not_filed","filed","changed"],"type":"string"},"form":{"enum":["NEC","MISC"],"type":"string"},"reasons":{"items":{"type":"string"},"type":"array"},"required":{"type":"boolean"},"vendor_id":{"type":"integer"},"vendor_name":{"type":["string","null"]}},"required":["entity_id","entity_code","vendor_id","vendor_name","form","boxes","required","reasons"],"type":"object"},"type":"array"},"summary_1096":{"description":"Form 1096-style totals per payer entity and form: required forms and the total reported.","items":{"properties":{"entity_code":{"type":["string","null"]},"entity_id":{"type":"integer"},"form":{"enum":["NEC","MISC"],"type":"string"},"forms":{"type":"integer"},"total":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["entity_id","entity_code","form","forms","total"],"type":"object"},"type":"array"},"year":{"type":"integer"}},"required":["year","forms","explain","summary_1096"],"type":"object"},"accounting_ApHold":{"properties":{"code":{"description":"Hold code; ach_returned: the bank returned an ACH payment on this bill (ACH notice import), overridable with release_payments.","type":"string"},"message":{"type":"string"},"overridden":{"type":"boolean"}},"required":["code","message","overridden"],"type":"object"},"accounting_ApLienWaiver":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"party":{"type":"string"},"payment_id":{"type":["integer","null"]},"payment_no":{"type":"integer"},"project_id":{"type":["integer","null"]},"received_at":{"format":"date","type":"string"},"scope":{"type":"string"},"through_date":{"format":"date","type":["string","null"]},"vendor_id":{"type":"integer"}},"required":["id","vendor_id","project_id","party","kind","scope","payment_no","through_date","amount","received_at","created_at","payment_id"],"type":"object"},"accounting_ApMatchException":{"properties":{"age_bucket":{"enum":["0_7","8_14","15_30","31_plus",null],"type":["string","null"]},"age_days":{"type":["integer","null"]},"amount":{"description":"Money at stake: |price variance|, the excess quantity at the bill price, the unreceived or unordered line amount, or the over-commitment.","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bill_id":{"type":"integer"},"bill_number":{"type":["string","null"]},"bill_revision":{"type":"integer"},"bill_status":{"type":["string","null"]},"commitment_id":{"type":["integer","null"]},"commitment_line_item_id":{"type":["integer","null"]},"commitment_type":{"type":["string","null"]},"cost_type_id":{"type":["integer","null"]},"details":{"additionalProperties":true,"description":"Figures behind the exception as of the last evaluation (quantities, prices, tolerance applied).","type":"object"},"detected_at":{"format":"date-time","type":"string"},"entity_id":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":["string","null"]},"last_evaluated_at":{"format":"date-time","type":"string"},"line_no":{"description":"Bill line; null for the whole bill (over_commitment).","type":["integer","null"]},"message":{"type":"string"},"override_reason":{"type":["string","null"]},"project_id":{"type":["integer","null"]},"project_name":{"type":["string","null"]},"resolution":{"description":"receipt, re_evaluated, bill_corrected, bill_returned or override.","type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"resolved_by_id":{"type":["integer","null"]},"status":{"enum":["open","resolved","overridden"],"type":"string"},"type":{"enum":["qty_over","price_over","no_receipt","no_po","over_commitment"],"type":"string"},"vendor_id":{"type":"integer"},"vendor_name":{"type":["string","null"]}},"required":["id","bill_id","bill_number","invoice_number","bill_status","bill_revision","line_no","type","status","entity_id","vendor_id","vendor_name","project_id","project_name","commitment_type","commitment_id","commitment_line_item_id","cost_type_id","amount","message","details","detected_at","last_evaluated_at","age_days","age_bucket","resolution","resolved_at","resolved_by_id","override_reason"],"type":"object"},"accounting_ApMatchExceptionShow":{"properties":{"age_bucket":{"enum":["0_7","8_14","15_30","31_plus",null],"type":["string","null"]},"age_days":{"type":["integer","null"]},"amount":{"description":"Money at stake: |price variance|, the excess quantity at the bill price, the unreceived or unordered line amount, or the over-commitment.","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bill":{"properties":{"id":{"type":"integer"},"invoice_number":{"type":["string","null"]},"line":{"properties":{"amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cost_type_id":{"type":["integer","null"]},"description":{"type":["string","null"]},"line_no":{"type":"integer"},"quantity":{"type":["string","null"]},"unit_price":{"type":["string","null"]}},"required":["line_no","description","quantity","unit_price","amount","cost_type_id"],"type":["object","null"]},"number":{"type":"string"},"revision":{"type":"integer"},"status":{"type":"string"},"total":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","number","invoice_number","status","revision","total","line"],"type":"object"},"bill_id":{"type":"integer"},"bill_number":{"type":["string","null"]},"bill_revision":{"type":"integer"},"bill_status":{"type":["string","null"]},"can_override":{"description":"The exception is open and the caller is not a maker of the bill (ap_approve is still checked on override).","type":"boolean"},"commitment_id":{"type":["integer","null"]},"commitment_line_item_id":{"type":["integer","null"]},"commitment_type":{"type":["string","null"]},"cost_type_id":{"type":["integer","null"]},"details":{"additionalProperties":true,"description":"Figures behind the exception as of the last evaluation (quantities, prices, tolerance applied).","type":"object"},"detected_at":{"format":"date-time","type":"string"},"entity_id":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":["string","null"]},"last_evaluated_at":{"format":"date-time","type":"string"},"line_no":{"description":"Bill line; null for the whole bill (over_commitment).","type":["integer","null"]},"message":{"type":"string"},"other_bills":{"description":"Other posted or pending bill lines on the same PO line.","items":{"properties":{"amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bill_id":{"type":"integer"},"kind":{"type":"string"},"line_no":{"type":"integer"},"number":{"type":"string"},"quantity":{"type":["string","null"]},"status":{"type":"string"}},"required":["bill_id","number","status","kind","line_no","quantity","amount"],"type":"object"},"type":"array"},"other_exceptions":{"items":{"properties":{"amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"id":{"type":"integer"},"line_no":{"type":["integer","null"]},"message":{"type":"string"},"status":{"enum":["open","resolved","overridden"],"type":"string"},"type":{"enum":["qty_over","price_over","no_receipt","no_po","over_commitment"],"type":"string"}},"required":["id","line_no","type","status","amount","message"],"type":"object"},"type":"array"},"override_reason":{"type":["string","null"]},"po":{"properties":{"commitment_type":{"type":["string","null"]},"id":{"type":"integer"},"line":{"properties":{"amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"description":{"type":["string","null"]},"id":{"type":"integer"},"quantity":{"type":["string","null"]},"unit_cost":{"type":["string","null"]},"uom":{"type":["string","null"]}},"required":["id","description","quantity","uom","unit_cost","amount"],"type":["object","null"]},"number":{"type":"string"},"title":{"type":["string","null"]}},"required":["commitment_type","id","number","title","line"],"type":["object","null"]},"project_id":{"type":["integer","null"]},"project_name":{"type":["string","null"]},"receipts":{"items":{"properties":{"amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"number":{"type":"string"},"quantity":{"type":"string"},"receipt_date":{"format":"date","type":"string"},"receipt_id":{"type":"integer"},"voided":{"type":"boolean"}},"required":["receipt_id","number","receipt_date","quantity","amount","voided"],"type":"object"},"type":"array"},"resolution":{"description":"receipt, re_evaluated, bill_corrected, bill_returned or override.","type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"resolved_by_id":{"type":["integer","null"]},"status":{"enum":["open","resolved","overridden"],"type":"string"},"type":{"enum":["qty_over","price_over","no_receipt","no_po","over_commitment"],"type":"string"},"vendor_id":{"type":"integer"},"vendor_name":{"type":["string","null"]}},"required":["id","bill_id","bill_number","invoice_number","bill_status","bill_revision","line_no","type","status","entity_id","vendor_id","vendor_name","project_id","project_name","commitment_type","commitment_id","commitment_line_item_id","cost_type_id","amount","message","details","detected_at","last_evaluated_at","age_days","age_bucket","resolution","resolved_at","resolved_by_id","override_reason","can_override","po","receipts","other_bills","bill","other_exceptions"],"type":"object"},"accounting_ApPayment":{"properties":{"ach_trace_number":{"description":"ACH: trace number in the last generated NACHA file.","type":["string","null"]},"amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"applications":{"items":{"properties":{"amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bill_id":{"type":"integer"},"bill_number":{"type":"string"},"credit_id":{"type":["integer","null"]},"date":{"format":"date","type":"string"},"discount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"id":{"type":"integer"},"invoice_number":{"type":["string","null"]},"payment_id":{"type":["integer","null"]},"voided":{"type":"boolean"},"withholding":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","bill_id","payment_id","credit_id","date","amount","discount","withholding","voided","bill_number","invoice_number"],"type":"object"},"type":"array"},"cash_account_id":{"type":"integer"},"check_number":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"customer_id":{"type":["integer","null"]},"discount_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"entity_id":{"type":"integer"},"entry_id":{"type":["integer","null"]},"id":{"type":"integer"},"joint_payees":{"items":{"properties":{"amount":{"type":"string"},"name":{"type":"string"}},"required":["name","amount"],"type":"object"},"type":"array"},"memo":{"type":["string","null"]},"method":{"enum":["check","ach","wire","virtual_card","owner_direct"],"type":"string"},"payment_date":{"format":"date","type":"string"},"run_id":{"type":["integer","null"]},"status":{"enum":["draft","posted","void"],"type":"string"},"vendor_id":{"type":"integer"},"vendor_name":{"type":["string","null"]},"void_entry_id":{"type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_at":{"format":"date-time","type":["string","null"]},"withholding_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","run_id","vendor_id","vendor_name","entity_id","method","check_number","payment_date","cash_account_id","amount","discount_amount","withholding_amount","joint_payees","customer_id","status","memo","entry_id","voided_at","void_entry_id","void_reason","applications","created_at","ach_trace_number"],"type":"object"},"accounting_ApPaymentCandidate":{"properties":{"bill_id":{"type":"integer"},"discount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"due_date":{"format":"date","type":"string"},"holds":{"items":{"$ref":"#/components/schemas/accounting_ApHold"},"type":"array"},"invoice_number":{"type":["string","null"]},"number":{"type":"string"},"open_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"payable":{"type":"boolean"},"payable_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vendor_id":{"type":"integer"},"vendor_name":{"type":["string","null"]}},"required":["bill_id","number","vendor_id","vendor_name","invoice_number","due_date","open_amount","payable_amount","discount","holds","payable"],"type":"object"},"accounting_ApPaymentRun":{"properties":{"ach_file_id_modifier":{"description":"File id modifier of the last NACHA file: A, then B, C… on each audited re-send.","type":["string","null"]},"ach_generated_at":{"description":"When the NACHA file was last generated (null: never).","format":"date-time","type":["string","null"]},"ach_resend_reason":{"type":["string","null"]},"ach_resend_requested_by_id":{"description":"Pending requester; null when there is no pending resend.","type":["integer","null"]},"cash_account_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"memo":{"type":["string","null"]},"number":{"type":"string"},"pay_date":{"format":"date","type":"string"},"payment_count":{"type":"integer"},"payments":{"items":{"$ref":"#/components/schemas/accounting_ApPayment"},"type":"array"},"prepared_by_id":{"type":"integer"},"released_at":{"format":"date-time","type":["string","null"]},"released_by_id":{"type":["integer","null"]},"status":{"enum":["draft","posted"],"type":"string"},"total":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","number","status","pay_date","cash_account_id","memo","prepared_by_id","released_by_id","released_at","total","payment_count","payments","created_at","ach_generated_at","ach_file_id_modifier"],"type":"object"},"accounting_ApPaymentRunCreated":{"properties":{"cash_account_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"held":{"items":{"properties":{"bill_id":{"type":"integer"},"holds":{"items":{"$ref":"#/components/schemas/accounting_ApHold"},"type":"array"},"number":{"type":"string"},"vendor_id":{"type":"integer"}},"required":["bill_id","number","vendor_id","holds"],"type":"object"},"type":"array"},"id":{"type":"integer"},"memo":{"type":["string","null"]},"number":{"type":"string"},"pay_date":{"format":"date","type":"string"},"payment_count":{"type":"integer"},"payments":{"items":{"$ref":"#/components/schemas/accounting_ApPayment"},"type":"array"},"prepared_by_id":{"type":"integer"},"released_at":{"format":"date-time","type":["string","null"]},"released_by_id":{"type":["integer","null"]},"status":{"enum":["draft","posted"],"type":"string"},"total":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","number","status","pay_date","cash_account_id","memo","prepared_by_id","released_by_id","released_at","total","payment_count","payments","created_at","held"],"type":"object"},"accounting_ApPortalGrant":{"properties":{"active":{"type":"boolean"},"email":{"type":"string"},"granted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"revocation_note":{"type":["string","null"]},"revoked_at":{"format":"date-time","type":["string","null"]},"role":{"enum":["member","admin"],"type":"string"},"vendor_id":{"type":"integer"}},"required":["id","vendor_id","role","email","active"],"type":"object"},"accounting_ApPortalInvitation":{"properties":{"accepted_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"email":{"type":"string"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"revocation_note":{"type":["string","null"]},"revoked_at":{"format":"date-time","type":["string","null"]},"role":{"enum":["member","admin"],"type":"string"},"status":{"enum":["pending","accepted","revoked","expired"],"type":"string"},"vendor_id":{"type":"integer"}},"required":["id","vendor_id","email","role","status"],"type":"object"},"accounting_ApPortalInvitationCreated":{"allOf":[{"$ref":"#/components/schemas/accounting_ApPortalInvitation"},{"properties":{"activation_url":{"type":"string"},"secret":{"description":"The one-time activation secret. Shown only in this response; deliver it to the invitee out of band.","type":"string"}},"required":["secret"],"type":"object"}]},"accounting_ApReceipt":{"properties":{"commitment_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"entity_id":{"type":["integer","null"]},"entry_id":{"type":["integer","null"]},"id":{"type":"integer"},"lines":{"items":{"properties":{"amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"commitment_line_item_id":{"type":"integer"},"id":{"type":"integer"},"quantity":{"type":"string"}},"required":["id","commitment_line_item_id","quantity","amount"],"type":"object"},"type":"array"},"number":{"type":"string"},"project_id":{"type":"integer"},"receipt_date":{"format":"date","type":"string"},"vendor_id":{"type":"integer"},"void_entry_id":{"type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_at":{"format":"date-time","type":["string","null"]}},"required":["id","number","commitment_id","project_id","vendor_id","entity_id","receipt_date","entry_id","voided_at","void_entry_id","void_reason","lines","created_at"],"type":"object"},"accounting_ApRemittance":{"properties":{"content_sha256":{"type":"string"},"payment_id":{"type":"integer"},"sends":{"items":{"properties":{"content_sha256":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"email_message_id":{"type":["integer","null"]},"id":{"type":"integer"},"recipient":{"type":["string","null"]},"resend":{"type":"boolean"},"status":{"enum":["sent","failed","no_recipient"],"type":"string"}},"type":"object"},"type":"array"},"subject":{"type":"string"},"text":{"type":"string"},"totals":{"properties":{"applied":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"discount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"net":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"retainage_held":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"withholding":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["applied","discount","withholding","net","retainage_held"],"type":"object"}},"required":["payment_id","subject","text","totals","sends"],"type":"object"},"accounting_ApSettings":{"properties":{"ach_company_id":{"type":["string","null"]},"ach_company_name":{"type":["string","null"]},"ach_destination_name":{"type":["string","null"]},"ach_destination_routing":{"type":["string","null"]},"ach_prenote_required":{"description":"Payment control (manage_grants to change): live ACH to a vendor or employee account needs a prenote settled at least three banking days (Nacha Rules 2.6); otherwise 409 ach_prenote_required.","type":"boolean"},"approval_bands":{"items":{"properties":{"approvals":{"type":"integer"},"final_role":{"type":["string","null"]},"min":{"type":"string"}},"required":["min","approvals"],"type":"object"},"type":"array"},"backup_withholding_account_id":{"type":["integer","null"]},"backup_withholding_policy":{"description":"hold: payments subject to backup withholding (no TIN, or past a B notice's withholding date) are also put on a backup_withholding hold; overriding the hold pays with 24% withheld.","enum":["withhold","hold"],"type":"string"},"bank_change_hold_days":{"type":"integer"},"cash_account_id":{"description":"Default pay-from: the GL account of an active, non-card bank account (banking). Routing, account number and check numbering come from that bank account.","type":["integer","null"]},"discount_posting_mode":{"type":"string"},"lien_waiver_mode":{"type":"string"},"match_cost_type_tolerances":{"description":"Per cost type overrides of the price (match_tolerance_pct/amount) and quantity tolerances; a null or omitted field uses the company value.","items":{"properties":{"cost_type_id":{"type":"integer"},"price_amount":{"type":["string","null"]},"price_pct":{"type":["string","null"]},"qty":{"type":["string","null"]},"qty_pct":{"type":["string","null"]}},"required":["cost_type_id"],"type":"object"},"type":"array"},"match_qty_tolerance":{"description":"Three-way match quantity tolerance as an absolute quantity. Default 0 (no quantity tolerance).","type":"string"},"match_qty_tolerance_pct":{"description":"Three-way match quantity tolerance: percent of received-not-invoiced. Both this and match_qty_tolerance must hold (whichever is less). Default 0.","type":"string"},"match_receipt_policy":{"description":"When bill quantities are checked against receipts: receipt_accrual (default; only with receipt accrual and an RNI account), required (every unit-priced PO line) or off.","enum":["receipt_accrual","required","off"],"type":"string"},"match_require_po":{"description":"Job-coded bill lines with no purchase order or subcontract are no_po exceptions. Default false.","type":"boolean"},"match_tolerance_amount":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"match_tolerance_pct":{"type":"string"},"over_commitment_action":{"type":"string"},"prompt_pay_days":{"type":["integer","null"]},"receipt_accrual":{"type":"boolean"},"rni_account_id":{"type":["integer","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["over_commitment_action","match_tolerance_pct","match_tolerance_amount","receipt_accrual","discount_posting_mode","bank_change_hold_days","lien_waiver_mode","approval_bands","rni_account_id","backup_withholding_account_id","backup_withholding_policy","cash_account_id","ach_company_id","ach_company_name","ach_destination_routing","ach_destination_name","prompt_pay_days","updated_at","ach_prenote_required","match_qty_tolerance_pct","match_qty_tolerance","match_cost_type_tolerances","match_receipt_policy","match_require_po"],"type":"object"},"accounting_ApTieOut":{"properties":{"ap":{"properties":{"control":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"difference":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"subledger":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["subledger","control","difference"],"type":"object"},"as_of":{"format":"date","type":"string"},"in_balance":{"type":"boolean"},"retainage":{"properties":{"control":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"difference":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"subledger":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["subledger","control","difference"],"type":"object"}},"required":["as_of","ap","retainage","in_balance"],"type":"object"},"accounting_ApVendor":{"properties":{"coi_expired":{"type":"boolean"},"coi_expires_at":{"format":"date","type":["string","null"]},"compliance_hold":{"type":"boolean"},"is_1099":{"type":"boolean"},"name":{"type":["string","null"]},"open_balance":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"payment_method":{"type":"string"},"retainage_held":{"description":"Money, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"stop_pay":{"type":"boolean"},"vendor_id":{"type":"integer"},"w9_status":{"type":"string"}},"required":["vendor_id","name","is_1099","w9_status","payment_method","compliance_hold","coi_expires_at","coi_expired","stop_pay","open_balance","retainage_held"],"type":"object"},"accounting_ApVendorAutomation":{"properties":{"remittance_email":{"type":["string","null"]},"sender_addresses":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":["string","null"]},"vendor_id":{"type":"integer"}},"required":["vendor_id","sender_addresses"],"type":"object"},"accounting_ApVendorShow":{"properties":{"bills":{"items":{"$ref":"#/components/schemas/accounting_ApBill"},"type":"array"},"compliance":{"items":{"$ref":"#/components/schemas/accounting_ApCompliance"},"type":"array"},"compliance_hold":{"type":"boolean"},"is_1099":{"type":"boolean"},"lien_waivers":{"items":{"$ref":"#/components/schemas/accounting_ApLienWaiver"},"type":"array"},"name":{"type":"string"},"profile_id":{"type":["integer","null"]},"vendor_id":{"type":"integer"},"w9_status":{"type":["string","null"]}},"required":["vendor_id","name","profile_id","is_1099","w9_status","compliance_hold","compliance","lien_waivers","bills"],"type":"object"},"accounting_ApVirtualCard":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bank_transaction_id":{"type":["integer","null"]},"currency":{"type":"string"},"entity_id":{"type":"integer"},"error":{"type":["string","null"]},"exp_month":{"type":["integer","null"]},"exp_year":{"type":["integer","null"]},"id":{"type":"integer"},"issued_at":{"format":"date-time","type":["string","null"]},"last4":{"type":["string","null"]},"payment_id":{"type":"integer"},"provider":{"type":"string"},"settled_amount":{"type":["string","null"]},"settled_on":{"format":"date","type":["string","null"]},"settlement_id":{"type":["string","null"]},"status":{"enum":["pending_issue","issued","issue_failed","settled","settlement_mismatch","canceled"],"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":["string","null"]}},"type":"object"}},"required":["id","payment_id","status","amount","currency"],"type":"object"},"accounting_ApprovalDelegation":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"doc_types":{"items":{"enum":["ap_bill","payment_batch","journal_entry"]},"type":"array"},"ends_at":{"format":"date-time","type":"string"},"entity_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"from_user_id":{"type":"integer"},"id":{"type":"integer"},"max_amount":{"pattern":"^\\d+\\.\\d{2}$","type":["string","null"]},"reason":{"type":"string"},"revoked_at":{"format":"date-time","type":["string","null"]},"starts_at":{"format":"date-time","type":"string"},"to_user_id":{"type":"integer"}},"required":["id","from_user_id","to_user_id","doc_types","max_amount","entity_ids","starts_at","ends_at","reason","created_by_id","revoked_at","created_at"],"type":"object"},"accounting_ApprovalRule":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"doc_type":{"enum":["ap_bill","payment_batch","journal_entry"]},"entity_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"max_amount":{"pattern":"^\\d+\\.\\d{2}$","type":["string","null"]},"min_amount":{"pattern":"^\\d+\\.\\d{2}$","type":["string","null"]},"name":{"type":"string"},"priority":{"type":"integer"},"project_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"steps":{"items":{"additionalProperties":false,"properties":{"approvers":{"items":{"pattern":"^(grant:(any|owner|controller|accountant|ap_clerk)|project:[^:]{1,80}|user:\\d{1,10})$","type":"string"},"maxItems":10,"minItems":1,"type":"array"},"quorum":{"maximum":10,"minimum":1,"type":"integer"}},"required":["approvers"],"type":"object"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"vendor_risk":{"items":{"enum":["new_vendor","compliance_hold","bank_changed"]},"type":"array"}},"required":["id","doc_type","name","priority","min_amount","max_amount","entity_ids","project_ids","vendor_risk","steps","is_active","created_by_id","created_at","updated_at"],"type":"object"},"accounting_ArBillingRequest":{"properties":{"billing":{"oneOf":[{"additionalProperties":false,"properties":{"input":{"additionalProperties":false,"properties":{"lines":{"items":{"additionalProperties":false,"properties":{"cost":{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"cost_type":{"enum":["labor","material","equipment","subcontract","other"],"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"quantity":{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"rate_code":{"description":"Prices quantity at the terms' labor_rates entry (422 when unknown). Without rate_code give cost; labor needs a rate_code when the terms define labor_rates, and a line with rate_code takes no cost (422).","type":"string"},"taxable":{"type":"boolean"},"ticket_id":{"type":"string"}},"required":["id","cost_type","description"],"type":"object"},"maxItems":200,"minItems":1,"type":"array"},"tax_code_id":{"type":"integer"}},"required":["lines"],"type":"object"},"method":{"const":"tm"}},"required":["method","input"],"type":"object"},{"additionalProperties":false,"properties":{"input":{"additionalProperties":false,"properties":{"costs":{"items":{"additionalProperties":false,"properties":{"amount":{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"cost_type":{"type":"string"},"id":{"type":"string"},"reimbursable":{"type":"boolean"}},"required":["id","amount","reimbursable"],"type":"object"},"maxItems":500,"minItems":1,"type":"array"},"fee_basis":{"description":"A fixed fee's basis this period, of the terms' kind (422 otherwise): {kind: poc, cost_to_date, eac} or {kind: schedule, earned_to_date}.","type":"object"},"fee_billed_before":{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"}},"required":["costs"],"type":"object"},"method":{"const":"cost_plus"}},"required":["method","input"],"type":"object"},{"additionalProperties":false,"properties":{"input":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"overrun_approved":{"type":"boolean"},"period_quantity":{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"previous_quantity":{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"prime_contract_line_item_id":{"description":"A unit item of the approved terms (422 otherwise).","type":"integer"}},"required":["prime_contract_line_item_id","period_quantity"],"type":"object"},"maxItems":500,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"method":{"const":"unit_price"}},"required":["method","input"],"type":"object"},{"additionalProperties":false,"properties":{"input":{"additionalProperties":false,"properties":{"final_cost":{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"}},"required":["final_cost"],"type":"object"},"method":{"const":"gmp"}},"required":["method","input"],"type":"object"},{"additionalProperties":false,"properties":{"input":{"additionalProperties":false,"properties":{"accepted":{"description":"Milestone ids (of the approved schedule) the owner accepted.","items":{"type":"string"},"maxItems":200,"minItems":1,"type":"array"},"billed":{"description":"Milestones billed outside AR; those on AR invoices count as billed anyway.","items":{"type":"string"},"maxItems":200,"type":"array"}},"required":["accepted"],"type":"object"},"method":{"const":"milestone"}},"required":["method","input"],"type":"object"}]},"due_date":{"format":"date","type":"string"},"entity_id":{"type":"integer"},"invoice_date":{"format":"date","type":"string"},"memo":{"maxLength":2000,"type":"string"},"posting_date":{"format":"date","type":"string"},"prime_contract_id":{"type":"integer"},"request_key":{"format":"uuid","type":"string"},"revenue_account_id":{"type":"integer"},"source_reference":{"maxLength":200,"type":"string"}},"required":["request_key","prime_contract_id","invoice_date","billing"],"type":"object"},"accounting_ArCashApplication":{"properties":{"actor_user_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"applications":{"items":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bucket":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"journal_line_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"type":"object"},"type":"array"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"journal_entry_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"kind":{"enum":["apply","transfer"],"type":"string"},"posting_date":{"format":"date","type":"string"},"receipt_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"type":"object"},"accounting_ArCashApplicationInput":{"additionalProperties":false,"properties":{"applications":{"items":{"additionalProperties":false,"properties":{"amount":{"pattern":"^-?\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"bucket":{"enum":["current","retainage"],"type":"string"},"invoice_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"journal_line_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["invoice_id","invoice_revision","journal_line_id","bucket","amount"],"type":"object"},"maxItems":400,"minItems":1,"type":"array"},"kind":{"description":"apply: positive amounts from unapplied cash (Dr CUSTOMER_DEPOSITS / Cr receivable). transfer: signed amounts netting to zero that move this receipt's allocations between lines.","enum":["apply","transfer"],"type":"string"},"posting_date":{"format":"date","type":"string"},"request_key":{"format":"uuid","type":"string"}},"required":["request_key","kind","posting_date","applications"],"type":"object"},"accounting_ArCollectionNote":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"follow_up_date":{"format":"date","nullable":true,"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"kind":{"enum":["note","call","email"],"type":"string"},"note":{"type":"string"},"promise_amount":{"nullable":true,"pattern":"^\\d+\\.\\d{2}$","type":"string"},"promise_date":{"format":"date","nullable":true,"type":"string"}},"type":"object"},"accounting_ArCollectionNoteInput":{"additionalProperties":false,"properties":{"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"follow_up_date":{"format":"date","nullable":true,"type":"string"},"invoice_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"kind":{"default":"note","enum":["note","call","email"],"type":"string"},"note":{"maxLength":4000,"minLength":1,"type":"string"},"promise_amount":{"nullable":true,"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"promise_date":{"format":"date","nullable":true,"type":"string"}},"required":["entity_id","note"],"type":"object"},"accounting_ArContractBillingTerms":{"properties":{"approved_at":{"format":"date-time","nullable":true,"type":"string"},"approved_by_id":{"nullable":true,"type":"integer"},"billing_method":{"enum":["progress","tm","cost_plus","unit_price","gmp","milestone"],"type":"string"},"contract_retainage_pct":{"nullable":true,"type":"string"},"prime_contract_id":{"type":"integer"},"proposed":{"description":"A change waiting for approval (unit_items carry the snapshotted bid).","nullable":true,"type":"object"},"proposed_at":{"format":"date-time","nullable":true,"type":"string"},"proposed_by_id":{"nullable":true,"type":"integer"},"revision":{"description":"0 before any terms are proposed; approve names the revision it approves.","type":"integer"},"terms":{"description":"The approved terms billing uses (null: none; billing is then 422).","nullable":true,"type":"object"}},"required":["prime_contract_id","billing_method","contract_retainage_pct","revision","terms","approved_by_id","approved_at","proposed","proposed_by_id","proposed_at"],"type":"object"},"accounting_ArContractBillingTermsInput":{"additionalProperties":false,"description":"A prime contract's billing terms; contract billing reads caps, fees, markups, rates, retainage, unit items and milestones only from the approved terms.","properties":{"contract_amount":{"description":"Milestone billing: the amount the percent milestones split.","nullable":true,"pattern":"^\\d{1,16}(\\.\\d{1,6})?$","type":"string"},"fee":{"description":"{kind: pct, pct, pct_by_cost_type?, cap_amount?} or {kind: fixed, amount, basis: poc | schedule}. The GMP settlement needs a pct fee.","nullable":true,"type":"object"},"gmp":{"description":"Cost-plus guaranteed maximum price (cumulative cost plus fee billed is capped at it), and the GMP settlement's.","nullable":true,"pattern":"^\\d{1,16}(\\.\\d{1,6})?$","type":"string"},"gmp_setup":{"description":"GMP contract provisions for cost-of-work applications (cost_plus contracts with a gmp): fee_on_change_orders_pct (fixed fee), general_conditions ({mode: cost} or {mode: lump_sum, amount, cost_code_ids}), contingency ({contractor_amount, owner_amount}), allowances ([{key, name, amount, cost_code_ids}]), markups ([{name, pct, basis: cost|cost_plus_fee}]), category_nte ([{cost_type, amount}]), non_reimbursable_cost_code_ids, burden_reimbursable (default true), retainage_step_down ({at_pct, reduced_pct}), stored_retainage_pct.","properties":{"allowances":{"items":{"type":"object"},"type":"array"},"burden_reimbursable":{"type":"boolean"},"category_nte":{"items":{"type":"object"},"type":"array"},"contingency":{"type":["object","null"]},"fee_on_change_orders_pct":{"type":["string","null"]},"general_conditions":{"type":["object","null"]},"markups":{"items":{"type":"object"},"type":"array"},"non_reimbursable_cost_code_ids":{"items":{"type":"integer"},"type":"array"},"retainage_step_down":{"type":["object","null"]},"stored_retainage_pct":{"type":["string","null"]}},"type":["object","null"]},"labor_rates":{"description":"T&M rates a ticket line prices its quantity at (rate_code); codes are unique.","items":{"additionalProperties":false,"properties":{"code":{"maxLength":200,"type":"string"},"rate":{"pattern":"^\\d{1,16}(\\.\\d{1,6})?$","type":"string"}},"required":["code","rate"],"type":"object"},"maxItems":200,"type":"array"},"markups":{"additionalProperties":{"pattern":"^\\d{1,3}(\\.\\d{1,4})?$","type":"string"},"description":"T&M markup percent by cost type (labor, material, equipment, subcontract, other).","type":"object"},"milestones":{"description":"Milestone schedule; ids are unique.","items":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d{1,16}(\\.\\d{1,6})?$","type":"string"},"id":{"type":"string"},"name":{"type":"string"},"pct":{"pattern":"^\\d{1,3}(\\.\\d{1,4})?$","type":"string"}},"required":["id","name"],"type":"object"},"maxItems":200,"type":"array"},"nte":{"description":"T&M not-to-exceed; null is uncapped.","nullable":true,"pattern":"^\\d{1,16}(\\.\\d{1,6})?$","type":"string"},"retainage_pct":{"description":"Null: the prime contract's retainage_percent.","nullable":true,"pattern":"^\\d{1,3}(\\.\\d{1,4})?$","type":"string"},"savings_share_pct":{"description":"GMP settlement: the contractor's share of savings below the GMP.","nullable":true,"pattern":"^\\d{1,3}(\\.\\d{1,4})?$","type":"string"},"unit_items":{"description":"Unit-price items: the contract's line items; their quantity, unit cost, unit and description are snapshotted as the bid when proposed (422 for a line item of another contract or one without quantity and unit cost).","items":{"additionalProperties":false,"properties":{"prime_contract_line_item_id":{"type":"integer"},"tolerance_pct":{"pattern":"^\\d{1,3}(\\.\\d{1,4})?$","type":"string"}},"required":["prime_contract_line_item_id"],"type":"object"},"maxItems":500,"type":"array"}},"type":"object"},"accounting_ArCreate":{"additionalProperties":false,"properties":{"correction":{"additionalProperties":false,"properties":{"invoice_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["invoice_id","revision"],"type":"object"},"invoice":{"$ref":"#/components/schemas/accounting_ArInvoiceInput"},"request_key":{"format":"uuid","type":"string"}},"required":["request_key","invoice"],"type":"object"},"accounting_ArCreditApplication":{"properties":{"actor_user_id":{"type":"integer"},"amount":{"pattern":"^-?\\d{1,16}\\.\\d{2}$","type":"string"},"bucket":{"enum":["current","retainage"],"type":"string"},"credit_memo_id":{"type":"integer"},"id":{"type":"integer"},"invoice_id":{"type":"integer"},"invoice_revision":{"type":"integer"},"journal_entry_id":{"type":"integer"},"journal_line_id":{"type":"integer"},"posting_date":{"format":"date","type":"string"}},"required":["id","credit_memo_id","invoice_id","journal_line_id","bucket","amount","posting_date","journal_entry_id"],"type":"object"},"accounting_ArCreditApplicationInput":{"additionalProperties":false,"properties":{"applications":{"items":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"bucket":{"enum":["current","retainage"],"type":"string"},"invoice_id":{"type":"integer"},"invoice_revision":{"type":"integer"},"journal_line_id":{"type":"integer"}},"required":["invoice_id","invoice_revision","journal_line_id","bucket","amount"],"type":"object"},"maxItems":400,"minItems":1,"type":"array"},"posting_date":{"format":"date","type":"string"},"request_key":{"format":"uuid","type":"string"}},"required":["request_key","posting_date","applications"],"type":"object"},"accounting_ArCustomer":{"properties":{"balances":{"items":{"properties":{"currency":{"type":"string"},"current":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"retainage":{"pattern":"^\\d+\\.\\d{2}$","type":"string"}},"required":["currency","current","retainage"],"type":"object"},"type":"array"},"customer":{"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"invoices":{"items":{"$ref":"#/components/schemas/accounting_ArInvoice"},"type":"array"},"profile":{"$ref":"#/components/schemas/accounting_ArCustomerProfile"},"total":{"type":"integer"}},"required":["customer","balances","total","invoices"],"type":"object"},"accounting_ArCustomerProfile":{"nullable":true,"properties":{"billing_address":{"nullable":true,"type":"string"},"billing_contact_name":{"nullable":true,"type":"string"},"billing_email":{"nullable":true,"type":"string"},"credit_limit":{"nullable":true,"pattern":"^\\d+\\.\\d{2}$","type":"string"},"due_days":{"nullable":true,"type":"integer"},"is_customer":{"type":"boolean"},"term_code":{"nullable":true,"type":"string"},"term_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"type":"object"},"accounting_ArDeposit":{"properties":{"bank_account_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"currency":{"type":"string"},"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"journal_entry_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"number":{"type":"string"},"posting_date":{"format":"date","type":"string"},"receipt_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"total":{"pattern":"^\\d+\\.\\d{2}$","type":"string"}},"type":"object"},"accounting_ArDepositInput":{"additionalProperties":false,"properties":{"bank_account_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"posting_date":{"format":"date","type":"string"},"receipt_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"maxItems":500,"minItems":1,"type":"array","uniqueItems":true},"request_key":{"format":"uuid","type":"string"}},"required":["request_key","entity_id","bank_account_id","posting_date","receipt_ids"],"type":"object"},"accounting_ArDisputeInput":{"additionalProperties":false,"properties":{"disputed":{"type":"boolean"},"reason":{"description":"Required when disputed.","maxLength":1000,"nullable":true,"type":"string"}},"required":["disputed"],"type":"object"},"accounting_ArError":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"},"accounting_ArInvoice":{"additionalProperties":false,"properties":{"applications":{"items":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d{1,16}\\.\\d{2}$","type":"string"},"bucket":{"enum":["current","retainage"],"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"journal_line_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"posting_date":{"description":"The receipt's posting date, or the later cash application's date for rows added after entry.","format":"date","type":"string"},"receipt_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"receipt_number":{"type":"string"},"reversal":{"$ref":"#/components/schemas/accounting_ArReversal"}},"required":["id","receipt_id","receipt_number","journal_line_id","bucket","amount","posting_date","reversal"],"type":"object"},"type":"array"},"approved_at":{"format":"date-time","nullable":true,"type":"string"},"approved_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"available_credit":{"description":"Posted, unreversed credit memos: on-account amount less applications and posted refunds.","type":["string","null"]},"cancellation_reason":{"nullable":true,"type":"string"},"corrects_invoice_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"credit_applications":{"description":"On-account credit memos applied to this invoice (while each stands).","items":{"properties":{"amount":{"pattern":"^-?\\d{1,16}\\.\\d{2}$","type":"string"},"bucket":{"type":"string"},"credit_memo_id":{"type":"integer"},"id":{"type":"integer"},"journal_line_id":{"type":"integer"},"posting_date":{"format":"date","type":"string"}},"type":"object"},"type":"array"},"credit_reason":{"description":"Credit memos only.","enum":["return","write_off","discount","tax_adjustment",null],"nullable":true,"type":"string"},"credited_current":{"description":"Current AR settled by credit memos, including any sales tax they reverse.","pattern":"^\\d+\\.\\d{2}$","type":"string"},"currency":{"type":"string"},"current_amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"dispute_reason":{"nullable":true,"type":"string"},"disputed":{"type":"boolean"},"due_date":{"format":"date","type":"string"},"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_date":{"format":"date","type":"string"},"journal_entry_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"kind":{"enum":["standard","retainage_release","credit_memo"],"type":"string"},"lines":{"items":{"additionalProperties":false,"properties":{"account_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"bucket":{"enum":["current","retainage",null],"nullable":true,"type":"string"},"cost_code_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"description":{"maxLength":500,"minLength":1,"type":"string"},"dimension_value_ids":{"description":"User-defined dimension values (AcctDimensionValue ids).","items":{"type":"integer"},"type":["array","null"]},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"line_no":{"maximum":2147483647,"minimum":1,"type":"integer"},"payment_application_line_id":{"description":"The pay-app (G703) line a bridged pay-app invoice line bills","type":["integer","null"]},"project_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"releases_invoice_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"releases_journal_line_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"retainage_amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"tax_amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"tax_category":{"description":"Contractor tax category: CA fixtures are retail sales while materials are consumed; untaxed material on a consumer-model job defaults to use tax (AP).","enum":["material","fixture","labor","equipment",null],"nullable":true,"type":"string"},"tax_code_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["account_id","project_id","cost_code_id","description","amount","retainage_amount","id","line_no","releases_invoice_id","releases_journal_line_id","bucket","tax_code_id","tax_amount","payment_application_line_id","tax_category","dimension_value_ids"],"type":"object"},"type":"array"},"memo":{"maxLength":2000,"nullable":true,"type":"string"},"number":{"type":"string"},"on_account_amount":{"description":"Credit memos: lines that settle no invoice (amount plus tax), held as customer credit on account.","type":["string","null"]},"open_current":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"open_retainage":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"outside_contract_reason":{"nullable":true,"type":"string"},"paid_current":{"pattern":"^\\d{1,16}\\.\\d{2}$","type":"string"},"paid_retainage":{"pattern":"^\\d{1,16}\\.\\d{2}$","type":"string"},"payment_application_id":{"description":"Owner pay app this invoice bills (a credit memo for a negative pay app). Cleared when the invoice is cancelled.","maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"posting_date":{"format":"date","type":"string"},"prepared_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"prime_contract_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"project_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"released_retainage":{"description":"Retainage moved to current AR by posted, unreversed release lines; open_retainage is net of it.","pattern":"^\\d{1,16}\\.\\d{2}$","type":"string"},"retainage_amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"reversal":{"$ref":"#/components/schemas/accounting_ArReversal"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_reference":{"maxLength":200,"minLength":1,"type":"string"},"source_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["ar_invoice"],"type":"string"},"status":{"enum":["draft","pending_approval","approved","posted","reversed","cancelled"],"type":"string"},"tax_amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"tax_override_reason":{"nullable":true,"type":"string"},"tax_warnings":{"description":"Sales tax findings at entry: overridden blocks (prefixed Override:), expired exemption certificates, untaxed billing on retailer or gross-receipts jobs.","items":{"type":"string"},"type":"array"},"total":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"}},"required":["entity_id","customer_id","source_reference","invoice_date","posting_date","due_date","memo","lines","id","number","source_type","source_id","source_revision","revision","status","currency","total","retainage_amount","current_amount","open_current","open_retainage","prepared_by_id","approved_by_id","approved_at","journal_entry_id","paid_current","paid_retainage","corrects_invoice_id","reversal","applications","kind","payment_application_id","prime_contract_id","project_id","released_retainage","tax_amount","disputed","dispute_reason","credited_current","credit_reason","cancellation_reason","tax_override_reason","tax_warnings","outside_contract_reason"],"type":"object"},"accounting_ArInvoiceInput":{"additionalProperties":false,"properties":{"credit_reason":{"default":null,"description":"Credit memos only (null means return). return: lines debit revenue accounts. write_off and discount: lines may also debit expense accounts (bad debt, discounts) or a contra-asset allowance. tax_adjustment: lines debit a sales tax liability account directly and carry no tax code.","enum":["return","write_off","discount","tax_adjustment",null],"nullable":true,"type":"string"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"due_date":{"description":"Omitted or null: invoice date plus the customer profile's payment terms (net 30 without terms).","format":"date","nullable":true,"type":"string"},"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_date":{"format":"date","type":"string"},"kind":{"default":"standard","description":"retainage_release: every line releases open retainage (Dr AR_CONTROL / Cr RETAINAGE_RECEIVABLE, no revenue), refused above the open retainage. credit_memo: every line credits open receivable of a posted invoice (Dr the line account, plus the tax code's liability when the line has one / Cr AR or retainage for amount plus tax), refused above the line's open amount.","enum":["standard","retainage_release","credit_memo"],"type":"string"},"lines":{"items":{"$ref":"#/components/schemas/accounting_ArInvoiceLineInput"},"maxItems":200,"minItems":1,"type":"array"},"memo":{"maxLength":2000,"nullable":true,"type":"string"},"outside_contract_reason":{"description":"A standard invoice to the owner of a live (not deleted or terminated) prime contract, any billing method, is 409 unless it gives this reason for billing outside the contract; the independent approver accepts it (the approval audit event records the reason and approver). A manual invoice on a non-progress contract's project is 409 even with a reason (bill it through ar/invoices/from_billing).","maxLength":1000,"minLength":3,"nullable":true,"type":"string"},"posting_date":{"format":"date","type":"string"},"source_reference":{"maxLength":200,"minLength":1,"type":"string"},"tax_override_reason":{"description":"Charges sales tax that the job tax profile (consumer-model state) or a valid customer exemption certificate forbids. Without it such an invoice is refused with 422; with it the findings are kept in tax_warnings and the independent approver accepts the override (the approval audit event records the reason and approver).","maxLength":1000,"minLength":3,"nullable":true,"type":"string"}},"required":["entity_id","customer_id","source_reference","invoice_date","posting_date","lines"],"type":"object"},"accounting_ArInvoiceLineInput":{"additionalProperties":false,"description":"Give account_id for a revenue line, or releases_invoice_id + releases_journal_line_id (retainage_amount 0) for a retainage release line. A credit_memo line gives account_id (revenue debited) plus releases_invoice_id + releases_journal_line_id (the posted current or retainage receivable line credited).","properties":{"account_id":{"description":"Revenue account; null on a retainage release line. On a credit memo line, the account debited (see credit_reason).","maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"cost_code_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"description":{"maxLength":500,"minLength":1,"type":"string"},"dimension_value_ids":{"description":"User-defined dimension values (AcctDimensionValue ids), at most one per dimension; see oas-dimensions.json.","items":{"minimum":1,"type":"integer"},"maxItems":20,"type":["array","null"]},"project_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"releases_invoice_id":{"description":"Retainage release: posted invoice whose retainage moves to current AR.","maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"releases_journal_line_id":{"description":"Retainage release: that invoice's retainage-receivable journal line (see open_items). Its account, project and cost code are used.","maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"retainage_amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"tax_category":{"description":"Contractor tax category: CA fixtures are retail sales while materials are consumed; untaxed material on a consumer-model job defaults to use tax (AP).","enum":["material","fixture","labor","equipment",null],"nullable":true,"type":"string"},"tax_code_id":{"description":"Active sales tax code; its components' rates on the line amount credit their liability accounts and add to current AR. On a credit memo line (not tax_adjustment), the tax is debited back to the liability accounts and credited to the current AR line with the amount. Not on retainage release lines.","maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["description","amount"],"type":"object"},"accounting_ArOpenItems":{"additionalProperties":false,"properties":{"accounts":{"items":{"additionalProperties":false,"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"number":{"type":"string"}},"required":["id","number","name"],"type":"object"},"type":"array"},"currency":{"type":"string"},"items":{"items":{"additionalProperties":false,"properties":{"bucket":{"enum":["current","retainage"],"type":"string"},"description":{"nullable":true,"type":"string"},"due_date":{"format":"date","type":"string"},"invoice_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_number":{"type":"string"},"invoice_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"journal_line_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"open":{"pattern":"^\\d{1,16}\\.\\d{2}$","type":"string"},"project_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["invoice_id","invoice_number","invoice_revision","due_date","journal_line_id","bucket","description","project_id","open"],"type":"object"},"type":"array"},"per_page":{"maximum":25,"minimum":1,"type":"integer"},"total":{"type":"integer"}},"required":["total","currency","accounts","items","per_page"],"type":"object"},"accounting_ArPayAppBridge":{"additionalProperties":false,"properties":{"dimension_value_ids":{"description":"User-defined dimension values (one per dimension) for the revenue lines. A pay-app invoice cannot be edited, so a dimension its revenue account requires must be given here.","items":{"maximum":2147483647,"minimum":1,"type":"integer"},"maxItems":20,"type":"array"},"due_date":{"description":"Defaults to invoice_date plus the owner's profile terms (net 30 without terms).","format":"date","type":"string"},"entity_id":{"description":"Defaults to the entity the project is assigned to (job cost scope), else the accounting default entity; another entity than the project's is refused.","maximum":2147483647,"minimum":1,"type":"integer"},"invoice_date":{"description":"Defaults to the pay app billing date, else period end.","format":"date","type":"string"},"payment_application_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"posting_date":{"description":"Defaults to invoice_date (a re-bill after reversal: no earlier than the reversal date).","format":"date","type":"string"},"revenue_account_id":{"description":"Defaults to the CONTRACT_REVENUE account.","maximum":2147483647,"minimum":1,"type":"integer"}},"required":["payment_application_id"],"type":"object"},"accounting_ArReceipt":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d{1,16}\\.\\d{2}$","type":"string"},"applications":{"items":{"additionalProperties":false,"properties":{"amount":{"description":"Negative only on the from-side of a transfer.","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bucket":{"enum":["current","retainage"],"type":"string"},"cash_application_id":{"description":"Null for allocations made at entry.","maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"journal_line_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","invoice_id","invoice_revision","journal_line_id","bucket","amount"],"type":"object"},"type":"array"},"approved_at":{"format":"date-time","nullable":true,"type":"string"},"approved_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"cancellation_reason":{"nullable":true,"type":"string"},"cash_account_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"check_no":{"nullable":true,"type":"string"},"contributor_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"corrects_receipt_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"currency":{"type":"string"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"journal_entry_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"method":{"default":"check","enum":["check","ach","wire","card","cash","other"],"type":"string"},"number":{"type":"string"},"payer":{"nullable":true,"type":"string"},"posting_date":{"format":"date","type":"string"},"prepared_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"reference":{"type":"string"},"reversal":{"$ref":"#/components/schemas/accounting_ArReversal"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["ar_receipt"],"type":"string"},"status":{"enum":["draft","approved","posted","reversed","cancelled"],"type":"string"},"unapplied_amount":{"description":"Cash still held in CUSTOMER_DEPOSITS (entry remainder less later applications).","pattern":"^\\d+\\.\\d{2}$","type":"string"}},"required":["id","number","entity_id","customer_id","reference","posting_date","currency","amount","cash_account_id","revision","source_type","source_id","source_revision","status","prepared_by_id","contributor_ids","approved_by_id","approved_at","journal_entry_id","corrects_receipt_id","reversal","applications","cancellation_reason"],"type":"object"},"accounting_ArReceiptCreate":{"additionalProperties":false,"properties":{"receipt":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"applications":{"description":"Allocations at entry; any remainder of amount posts to CUSTOMER_DEPOSITS as unapplied cash.","items":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"bucket":{"enum":["current","retainage"],"type":"string"},"invoice_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"journal_line_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["invoice_id","invoice_revision","journal_line_id","bucket","amount"],"type":"object"},"maxItems":400,"minItems":0,"type":"array"},"cash_account_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"check_no":{"maxLength":50,"nullable":true,"type":"string"},"correction":{"additionalProperties":false,"nullable":true,"properties":{"receipt_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["receipt_id","revision"],"type":"object"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"method":{"default":"check","enum":["check","ach","wire","card","cash","other"],"type":"string"},"payer":{"maxLength":200,"nullable":true,"type":"string"},"posting_date":{"format":"date","type":"string"},"reference":{"maxLength":200,"minLength":1,"type":"string"}},"required":["entity_id","customer_id","cash_account_id","reference","posting_date","amount","applications"],"type":"object"},"request_key":{"format":"uuid","type":"string"}},"required":["request_key","receipt"],"type":"object"},"accounting_ArReceiptTransition":{"additionalProperties":false,"description":"Cancel requires a reason. Draft cancellation uses arEnter; cancelling approved receipts additionally requires independent arApprove.","properties":{"action":{"enum":["approve","post","cancel"],"type":"string"},"reason":{"maxLength":1000,"minLength":1,"type":"string"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["revision","action"],"type":"object"},"accounting_ArRefund":{"properties":{"amount":{"pattern":"^-?\\d{1,16}\\.\\d{2}$","type":"string"},"approved_at":{"format":"date-time","type":["string","null"]},"approved_by_id":{"type":["integer","null"]},"bank_account_id":{"type":"integer"},"credit_memo_id":{"type":["integer","null"]},"currency":{"type":"string"},"customer_id":{"type":"integer"},"entity_id":{"type":"integer"},"id":{"type":"integer"},"journal_entry_id":{"type":["integer","null"]},"memo":{"type":["string","null"]},"method":{"type":"string"},"number":{"type":"string"},"posting_date":{"format":"date","type":"string"},"prepared_by_id":{"type":"integer"},"reason":{"type":["string","null"]},"receipt_id":{"type":["integer","null"]},"reference":{"type":["string","null"]},"reversal_date":{"format":"date","type":["string","null"]},"reversal_entry_id":{"type":["integer","null"]},"status":{"enum":["draft","posted","cancelled","reversed"],"type":"string"}},"required":["id","number","entity_id","customer_id","amount","status","posting_date"],"type":"object"},"accounting_ArRefundCreate":{"additionalProperties":false,"properties":{"refund":{"additionalProperties":false,"description":"Exactly one of receipt_id (its unapplied cash) or credit_memo_id (an on-account credit memo).","properties":{"amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"bank_account_id":{"type":"integer"},"credit_memo_id":{"type":["integer","null"]},"memo":{"maxLength":2000,"type":["string","null"]},"method":{"default":"check","enum":["check","ach","wire","card","cash","other"],"type":"string"},"posting_date":{"format":"date","type":"string"},"receipt_id":{"type":["integer","null"]},"reference":{"maxLength":200,"type":["string","null"]}},"required":["bank_account_id","posting_date","amount"],"type":"object"},"request_key":{"format":"uuid","type":"string"}},"required":["request_key","refund"],"type":"object"},"accounting_ArRefundTransition":{"additionalProperties":false,"properties":{"action":{"enum":["post","cancel","reverse"],"type":"string"},"date":{"description":"Reversal date (reverse only).","format":"date","type":"string"},"reason":{"description":"Required to cancel or reverse.","maxLength":1000,"minLength":1,"type":"string"}},"required":["action"],"type":"object"},"accounting_ArReversal":{"additionalProperties":false,"nullable":true,"properties":{"actor_user_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"journal_entry_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"posting_date":{"format":"date","type":"string"},"reason":{"type":"string"},"source_revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","source_revision","posting_date","reason","journal_entry_id","actor_user_id"],"type":"object"},"accounting_ArReverseInput":{"additionalProperties":false,"properties":{"date":{"format":"date","type":"string"},"nsf":{"default":false,"description":"Receipt returned by the bank (NSF): unwinds later applications and, when deposited, takes the item back out of the bank. Audited as nsf_returned.","type":"boolean"},"reason":{"maxLength":1000,"minLength":1,"type":"string"},"request_key":{"format":"uuid","type":"string"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["request_key","revision","date","reason"],"type":"object"},"accounting_ArStatement":{"properties":{"as_of":{"format":"date","type":"string"},"balance_due":{"description":"open_current less unapplied cash; unreleased retainage is not due.","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"customer":{"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"invoices":{"items":{"$ref":"#/components/schemas/accounting_ArInvoice"},"type":"array"},"on_account_credits":{"description":"Open on-account credit memos as of the date (positive), netted in open_current.","type":"string"},"open_current":{"description":"Open current AR as of the date, net of owner-direct payment credits.","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"open_total":{"description":"open_current plus retainage_not_due.","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"owner_direct_credits":{"description":"Owner-direct AP payments credited to this customer's AR, included in open_current.","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"profile":{"allOf":[{"$ref":"#/components/schemas/accounting_ArCustomerProfile"}],"description":"Null for an entity-restricted grant whose entities have no AR activity with the customer.","nullable":true},"retainage_not_due":{"description":"Unreleased retainage held as of the date; shown, not due.","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"unapplied_cash":{"pattern":"^\\d+\\.\\d{2}$","type":"string"}},"type":"object"},"accounting_ArTransition":{"additionalProperties":false,"description":"Return requires a reason and arApprove; it works from pending_approval or approved (unposted), clears the approval and advances the revision. Cancel requires a reason; it works from draft or pending_approval (arEnter) or approved (arApprove), is idempotent, keeps the content, and releases the invoice's pay app, correction link and source reference so they can be billed again. Approved invoices cannot be edited. Submit validates an open posting period. Post is idempotent for the stored revision.","properties":{"action":{"enum":["submit","return","approve","post","cancel"],"type":"string"},"reason":{"maxLength":1000,"minLength":1,"type":"string"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["revision","action"],"type":"object"},"accounting_ArUpdate":{"additionalProperties":false,"properties":{"invoice":{"$ref":"#/components/schemas/accounting_ArInvoiceInput"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["revision","invoice"],"type":"object"},"accounting_AssetAdjustment":{"properties":{"accumulated_delta":{"description":"Change to accumulated depreciation (negative when a partial disposal removes it).","type":"string"},"asset_id":{"type":"integer"},"cost_delta":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"date":{"format":"date","type":"string"},"entry_id":{"type":["integer","null"]},"entry_number":{"type":["string","null"]},"from_entity_id":{"type":["integer","null"]},"gain_loss":{"type":["string","null"]},"id":{"type":"integer"},"kind":{"enum":["addition","impairment","transfer","partial_disposal","estimate_change"],"type":"string"},"memo":{"type":["string","null"]},"prior_life_months":{"description":"estimate_change: the book life in force before it.","type":["integer","null"]},"prior_method":{"description":"estimate_change: the book method in force before it.","type":["string","null"]},"prior_salvage":{"description":"estimate_change: the salvage value in force before it.","type":["string","null"]},"proceeds":{"type":["string","null"]},"to_entity_id":{"type":["integer","null"]}},"required":["id","asset_id","kind","date","cost_delta","accumulated_delta","proceeds","gain_loss","from_entity_id","to_entity_id","memo","entry_id","created_at"],"type":"object"},"accounting_AssetClass":{"properties":{"accumulated_account_id":{"type":"integer"},"asset_account_id":{"type":"integer"},"book_convention":{"enum":["full_month","next_month","mid_month","half_year"],"type":"string"},"book_life_months":{"type":"integer"},"book_method":{"enum":["SL","DDB","DB150","SYD","UOP"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"expense_account_id":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"},"tax_recovery_class":{"type":["string","null"]}},"required":["id","name","asset_account_id","accumulated_account_id","expense_account_id","book_method","book_life_months","book_convention","tax_recovery_class","created_at"],"type":"object"},"accounting_AssetImportResult":{"properties":{"applied":{"type":"boolean"},"cost":{"type":"string"},"errors":{"items":{"properties":{"message":{"type":"string"},"row":{"type":"integer"}},"required":["row","message"],"type":"object"},"type":"array"},"opening_accumulated":{"type":"string"},"rows":{"type":"integer"},"tie_out":{"properties":{"as_of":{"format":"date","type":"string"},"difference":{"type":"string"},"gl":{"type":"string"},"register":{"type":"string"}},"required":["as_of","gl","register","difference"],"type":["object","null"]}},"required":["applied","rows","cost","opening_accumulated","errors","tie_out"],"type":"object"},"accounting_BackupNotice":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"cure_kind":{"enum":["w9","ssa_card","letter_147c","letter_685c","letter_096c",null],"type":["string","null"]},"cured_at":{"format":"date","type":["string","null"]},"id":{"type":"integer"},"letter_due_by":{"description":"notice_date + 15 IRS business days (Pub 1281).","format":"date","type":"string"},"letter_sent_at":{"format":"date","type":["string","null"]},"notice_date":{"format":"date","type":"string"},"notice_number":{"enum":[1,2],"type":"integer"},"tax_year":{"type":["integer","null"]},"updated_at":{"format":"date-time","type":"string"},"vendor_id":{"type":"integer"},"vendor_name":{"type":["string","null"]},"withhold_from":{"description":"notice_date + 30 IRS business days: 24% backup withholding applies to AP payments from this date until cured.","format":"date","type":"string"}},"required":["id","vendor_id","vendor_name","notice_number","notice_date","tax_year","letter_due_by","withhold_from","letter_sent_at","cured_at","cure_kind","created_by_id","created_at","updated_at"],"type":"object"},"accounting_BankAccount":{"properties":{"account_number_masked":{"description":"****1234; full numbers only via /reveal","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"currency":{"description":"Always the company base currency.","type":"string"},"entity_id":{"type":["integer","null"]},"feed":{"description":"Live bank feed mapping (null when not fed).","properties":{"connection_id":{"type":"integer"},"feed_account_id":{"type":["string","null"]},"health":{"type":["object","null"]},"institution_name":{"type":["string","null"]},"last_success_at":{"format":"date-time","type":["string","null"]},"start_date":{"format":"date","type":["string","null"]},"status":{"type":["string","null"]}},"type":["object","null"]},"gl_account_id":{"type":"integer"},"gl_account_name":{"type":"string"},"gl_account_number":{"type":"string"},"has_csv_mapping":{"type":"boolean"},"id":{"type":"integer"},"institution":{"type":["string","null"]},"is_active":{"type":"boolean"},"kind":{"enum":["checking","savings","money_market","credit_card","cash"],"type":"string"},"low_balance_threshold":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"match_window_days":{"type":"integer"},"name":{"type":"string"},"next_check_number":{"type":["integer","null"]},"pending_bank_change":{"description":"A requested account/routing number change waiting for a second manage_vendor_banking user (POST .../bank_change). Masked values only.","properties":{"change_hash":{"description":"Send back with the decision; a change replaced since you reviewed it is refused (409).","pattern":"^[0-9a-f]{64}$","type":"string"},"changes":{"items":{"properties":{"field":{"enum":["account_number","routing_number"],"type":"string"},"from":{"type":["string","null"]},"to":{"type":["string","null"]}},"required":["field","from","to"],"type":"object"},"type":"array"},"requested_by_id":{"type":"integer"}},"required":["requested_by_id","changes","change_hash"],"type":["object","null"]},"positive_pay_options":{"description":"Positive pay layout: CSV (format csv or omitted: columns, dateFormat, header, statusCodes) or fixed-width (format fixed with template: recordLength, dateFormat, statusCodes, detail/header/trailer fields of source, start, length, align, pad, value).","type":["object","null"]},"receipt_required_over":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"routing_number_masked":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","kind","entity_id","gl_account_id","gl_account_number","gl_account_name","institution","account_number_masked","routing_number_masked","currency","is_active","next_check_number","receipt_required_over","match_window_days","low_balance_threshold","has_csv_mapping","positive_pay_options","pending_bank_change","created_at","updated_at"],"type":"object"},"accounting_BankFeedConnection":{"description":"A linked bank login (provider Item). The provider access token and the sync cursor are never returned.","properties":{"accounts":{"items":{"properties":{"currency":{"description":"Provider ISO currency; unknown or unofficial currency cannot be mapped.","pattern":"^[A-Z]{3}$","type":["string","null"]},"id":{"type":"string"},"mask":{"type":["string","null"]},"name":{"type":"string"},"subtype":{"type":["string","null"]},"type":{"type":"string"}},"required":["id","name","mask","type","subtype","currency"],"type":"object"},"type":"array"},"bank_accounts":{"items":{"properties":{"feed_account_id":{"type":["string","null"]},"id":{"type":"integer"},"name":{"type":"string"},"start_date":{"format":"date","type":["string","null"]}},"required":["id","name","feed_account_id","start_date"],"type":"object"},"type":"array"},"consecutive_failures":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"entity_id":{"type":["integer","null"]},"health":{"properties":{"label":{"type":"string"},"state":{"enum":["live","stale","reconnect","expiring","error","pending","disconnected"],"type":"string"}},"required":["state","label"],"type":"object"},"id":{"type":"integer"},"institution_name":{"type":["string","null"]},"last_error":{"type":["string","null"]},"last_stats":{"description":"Counts from the last successful sync: added, modified, removed, pending_skipped, unmapped, before_start, exceptions.","type":"object"},"last_success_at":{"format":"date-time","type":["string","null"]},"last_sync_at":{"format":"date-time","type":["string","null"]},"new_accounts_available":{"type":"boolean"},"provider":{"enum":["plaid","fake"],"type":"string"},"status":{"enum":["active","login_required","expiring","revoked","error","disconnected"],"type":"string"},"status_detail":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","provider","entity_id","institution_name","status","status_detail","health","new_accounts_available","accounts","bank_accounts","last_sync_at","last_success_at","consecutive_failures","last_error","last_stats","created_at","updated_at"],"type":"object"},"accounting_BankRule":{"properties":{"account_id":{"type":"integer"},"amount_max":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"amount_min":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"bank_account_id":{"type":["integer","null"]},"cost_code_id":{"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"description_contains":{"type":"string"},"direction":{"enum":["in","out","any"],"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"memo":{"type":["string","null"]},"name":{"type":"string"},"priority":{"type":"integer"},"project_id":{"type":["integer","null"]},"times_applied":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor_id":{"type":["integer","null"]}},"required":["id","name","bank_account_id","priority","is_active","direction","description_contains","amount_min","amount_max","account_id","project_id","cost_code_id","vendor_id","memo","times_applied","created_at","updated_at"],"type":"object"},"accounting_BankTransaction":{"properties":{"amount":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"approved_at":{"format":"date-time","type":["string","null"]},"approved_by_id":{"description":"The second person who released the check or approved the document; null when posted below the threshold.","type":["integer","null"]},"bank_account_id":{"type":"integer"},"bank_account_name":{"type":"string"},"check_number":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"date":{"format":"date","type":"string"},"id":{"type":"integer"},"journal_entry_id":{"type":["integer","null"]},"kind":{"enum":["deposit","check","withdrawal","transfer","card_charge","card_credit"],"type":"string"},"lines":{"items":{"$ref":"#/components/schemas/accounting_BankTransactionLine"},"type":"array"},"memo":{"type":["string","null"]},"number":{"type":"string"},"payee":{"type":["string","null"]},"payee_vendor_id":{"type":["integer","null"]},"positive_pay_issued_at":{"format":"date-time","type":["string","null"]},"positive_pay_void_at":{"format":"date-time","type":["string","null"]},"receipt_missing":{"type":"boolean"},"reference":{"type":["string","null"]},"statement_line_id":{"type":["integer","null"]},"status":{"enum":["pending_approval","posted","void"],"type":"string"},"to_bank_account_id":{"type":["integer","null"]},"updated_at":{"format":"date-time","type":"string"},"void_date":{"format":"date","type":["string","null"]},"void_journal_entry_id":{"type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_at":{"format":"date-time","type":["string","null"]}},"required":["id","number","kind","status","bank_account_id","bank_account_name","date","amount","payee","payee_vendor_id","memo","reference","check_number","to_bank_account_id","journal_entry_id","void_journal_entry_id","void_date","void_reason","voided_at","statement_line_id","approved_by_id","approved_at","positive_pay_issued_at","positive_pay_void_at","receipt_missing","lines","created_at","updated_at"],"type":"object"},"accounting_BankTransactionLine":{"properties":{"account_id":{"type":"integer"},"amount":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cost_code_id":{"type":["integer","null"]},"cost_type_id":{"type":["integer","null"]},"customer_id":{"type":["integer","null"]},"equipment_id":{"type":["integer","null"]},"has_receipt":{"type":"boolean"},"line_no":{"type":"integer"},"memo":{"type":["string","null"]},"project_id":{"type":["integer","null"]},"receipt_missing":{"type":"boolean"},"reportable_1099":{"type":"boolean"},"vendor_id":{"type":["integer","null"]}},"required":["line_no","account_id","amount","memo","project_id","cost_code_id","cost_type_id","vendor_id","customer_id","equipment_id","has_receipt","receipt_missing"],"type":"object"},"accounting_Budget":{"properties":{"approved_at":{"format":"date-time","type":["string","null"]},"approved_by_id":{"minimum":1,"type":["integer","null"]},"copy_source":{"description":"blank, csv, version:<id>[+scenario:<id>] or actuals:<fiscal year>[x<pct>%]","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":["integer","null"]},"description":{"type":["string","null"]},"fiscal_year":{"type":"integer"},"id":{"minimum":1,"type":"integer"},"line_count":{"minimum":0,"type":"integer"},"lines":{"description":"Show only (entity-scoped grants see their entities' lines)","items":{"properties":{"account_id":{"minimum":1,"type":"integer"},"amount":{"description":"Normal-balance sign: revenue and expense budgets are both positive; balance-sheet lines are month-end balances","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cost_code_id":{"minimum":1,"type":["integer","null"]},"department_id":{"minimum":1,"type":["integer","null"]},"entity_id":{"minimum":1,"type":["integer","null"]},"id":{"minimum":1,"type":"integer"},"period":{"pattern":"^\\d{4}-\\d{2}$","type":"string"},"project_id":{"minimum":1,"type":["integer","null"]}},"required":["id","account_id","entity_id","department_id","period","amount"],"type":"object"},"type":"array"},"locked_at":{"format":"date-time","type":["string","null"]},"locked_by_id":{"minimum":1,"type":["integer","null"]},"name":{"type":"string"},"returned_reason":{"type":["string","null"]},"status":{"description":"Version lifecycle (oas-fpa.json): only a draft changes or is deleted; approval needs a user who did not prepare it; a locked version never changes","enum":["draft","submitted","approved","locked"]},"submitted_at":{"format":"date-time","type":["string","null"]},"submitted_by_id":{"minimum":1,"type":["integer","null"]},"total":{"description":"Import response only: sum of the imported amounts","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["id","fiscal_year","name","version","line_count","created_by_id","created_at"],"type":"object"},"accounting_BudgetGrid":{"properties":{"budget":{"$ref":"#/components/schemas/accounting_BudgetVersion"},"editable":{"type":"boolean"},"months":{"items":{"pattern":"^\\d{4}-\\d{2}$","type":"string"},"type":"array"},"rows":{"items":{"properties":{"account":{"oneOf":[{"$ref":"#/components/schemas/accounting_AccountRef"},{"type":"null"}]},"amounts":{"items":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"type":"array"},"cost_code_id":{"minimum":1,"type":["integer","null"]},"department_id":{"minimum":1,"type":["integer","null"]},"dimension_value_id":{"minimum":1,"type":["integer","null"]},"entity_id":{"minimum":1,"type":["integer","null"]},"key":{"type":"string"},"kind":{"enum":["income_statement","balance_sheet"]},"project_id":{"minimum":1,"type":["integer","null"]},"total":{"description":"Income statement: the year's sum; balance sheet: the last month's balance","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["key","account","kind","entity_id","department_id","project_id","cost_code_id","dimension_value_id","amounts","total"],"type":"object"},"type":"array"},"totals":{"properties":{"income_statement":{"items":{"description":"Net income budget per month (income less cost and expense)","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"type":"array"}},"required":["income_statement"],"type":"object"}},"required":["budget","months","editable","rows","totals"],"type":"object"},"accounting_BudgetScenarioCompare":{"properties":{"budget":{"$ref":"#/components/schemas/accounting_BudgetVersion"},"net_income":{"properties":{"base":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"scenarios":{"items":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"scenario_id":{"minimum":1,"type":"integer"}},"required":["scenario_id","amount"],"type":"object"},"type":"array"}},"required":["base","scenarios"],"type":"object"},"rows":{"items":{"properties":{"account":{"$ref":"#/components/schemas/accounting_AccountRef"},"base":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"scenarios":{"items":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"change":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"scenario_id":{"minimum":1,"type":"integer"}},"required":["scenario_id","amount","change"],"type":"object"},"type":"array"}},"required":["account","base","scenarios"],"type":"object"},"type":"array"},"scenarios":{"items":{"properties":{"id":{"minimum":1,"type":"integer"},"kind":{"type":"string"},"name":{"type":"string"}},"required":["id","name","kind"],"type":"object"},"type":"array"}},"required":["budget","scenarios","rows","net_income"],"type":"object"},"accounting_BudgetVariance":{"properties":{"budget":{"$ref":"#/components/schemas/accounting_BudgetVersion"},"entity_id":{"minimum":1,"type":["integer","null"]},"explain":{"items":{"properties":{"formula":{"type":"string"},"label":{"type":"string"}},"required":["label","formula"],"type":"object"},"type":"array"},"months":{"items":{"type":"string"},"type":"array"},"net_income":{"properties":{"actual":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"variance":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budget","actual","variance"],"type":"object"},"project_id":{"minimum":1,"type":["integer","null"]},"rows":{"items":{"properties":{"account":{"$ref":"#/components/schemas/accounting_AccountRef"},"actual":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"by_month":{"items":{"properties":{"actual":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"period":{"type":"string"}},"required":["period","budget","actual"],"type":"object"},"type":"array"},"favorable":{"type":["boolean","null"]},"kind":{"enum":["income_statement","balance_sheet"]},"variance":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"variance_pct":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]}},"required":["account","kind","budget","actual","variance","variance_pct","favorable","by_month"],"type":"object"},"type":"array"},"scenario":{"oneOf":[{"properties":{"id":{"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},{"type":"null"}]}},"required":["budget","scenario","months","entity_id","project_id","rows","net_income","explain"],"type":"object"},"accounting_BudgetVersion":{"properties":{"approved_at":{"format":"date-time","type":["string","null"]},"approved_by_id":{"minimum":1,"type":["integer","null"]},"copy_source":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":["integer","null"]},"description":{"type":["string","null"]},"fiscal_year":{"type":"integer"},"id":{"minimum":1,"type":"integer"},"line_count":{"minimum":0,"type":"integer"},"locked_at":{"format":"date-time","type":["string","null"]},"locked_by_id":{"minimum":1,"type":["integer","null"]},"name":{"type":"string"},"returned_reason":{"type":["string","null"]},"status":{"enum":["draft","submitted","approved","locked"]},"submitted_at":{"format":"date-time","type":["string","null"]},"submitted_by_id":{"minimum":1,"type":["integer","null"]},"total":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["id","fiscal_year","name","version","line_count","created_by_id","created_at","status","description","copy_source","submitted_by_id","submitted_at","approved_by_id","approved_at","locked_by_id","locked_at","returned_reason"],"type":"object"},"accounting_BuilderReportDoc":{"additionalProperties":false,"description":"A ReportDoc (the report library shape) whose key is builder_<source> for a preview or definition_<id> for a saved definition.","properties":{"checks":{"items":{"additionalProperties":false,"properties":{"detail":{"type":["string","null"]},"difference":{"description":"A money amount with two decimals (\"12.50\"), or a bare item count (\"3\") for checks that count exceptions.","pattern":"^-?\\d+(\\.\\d{2})?$","type":"string"},"label":{"type":"string"},"ok":{"type":"boolean"}},"required":["label","ok","difference"],"type":"object"},"type":"array"},"columns":{"items":{"additionalProperties":false,"properties":{"fmt":{"enum":["text","money","pct","int","date"]},"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label","fmt"],"type":"object"},"type":"array"},"explain":{"items":{"properties":{"cite":{"type":"string"},"formula":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"generatedAt":{"format":"date-time","type":"string"},"key":{"type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"params":{"additionalProperties":{"type":["string","null"]},"type":"object"},"rows":{"items":{"additionalProperties":false,"properties":{"cellHrefs":{"additionalProperties":{"type":"string"},"description":"Per-cell drill-down links (column key to in-app link) for pivot and comparison columns","type":"object"},"cells":{"additionalProperties":{"type":["string","number","null"]},"type":"object"},"depth":{"minimum":0,"type":"integer"},"href":{"description":"In-app drill-down link","type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["header","line","account","subtotal","total","detail","note"]},"tone":{"enum":["ok","warn","risk",null]}},"required":["id","kind","depth","cells"],"type":"object"},"type":"array"},"subtitle":{"description":"Dates and scope; ends with the entity, job and department filters applied, e.g. `As of 2026-10-31 · Entity: E1 Main · Job: Riverside`","type":"string"},"title":{"type":"string"}},"required":["key","title","subtitle","params","columns","rows","checks","notes","explain","generatedAt"],"type":"object"},"accounting_CashAdjustment":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"date":{"format":"date","type":"string"},"entity_id":{"minimum":1,"type":["integer","null"]},"id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":["integer","null"]},"reason":{"type":"string"},"void_reason":{"type":["string","null"]},"voided_at":{"format":"date-time","type":["string","null"]},"voided_by_id":{"minimum":1,"type":["integer","null"]}},"required":["id","date","amount","reason","entity_id","project_id","created_by_id","created_at","voided_at","voided_by_id","void_reason"],"type":"object"},"accounting_CashForecast":{"properties":{"accounts":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"as_of":{"format":"date","type":"string"},"closing":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"explain":{"items":{"properties":{"formula":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value","formula"],"type":"object"},"type":"array"},"floor":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"low_point":{"anyOf":[{"properties":{"balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"week_end":{"format":"date","type":"string"}},"required":["week_end","balance"],"type":"object"},{"type":"null"}]},"opening":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"trailing_net":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"weeks":{"items":{"properties":{"below_floor":{"type":"boolean"},"closing":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"flows":{"items":{"properties":{"amount":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"date":{"format":"date","type":"string"},"label":{"type":"string"},"source":{"enum":["scheduled","recurring","trend","ap","ap_run","ar","payroll"],"type":"string"}},"required":["date","amount","source","label"],"type":"object"},"type":"array"},"inflows":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"net":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"opening":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"outflows":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"week_end":{"format":"date","type":"string"},"week_start":{"format":"date","type":"string"}},"required":["week_start","week_end","opening","inflows","outflows","net","closing","below_floor","flows"],"type":"object"},"type":"array"}},"required":["as_of","opening","closing","floor","trailing_net","low_point","accounts","weeks","explain"],"type":"object"},"accounting_CashLine":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"basis":{"description":"How the date and amount were derived","type":"string"},"date":{"format":"date","type":"string"},"entity_id":{"minimum":1,"type":["integer","null"]},"href":{"description":"App link to the source document","type":["string","null"]},"label":{"type":"string"},"party_id":{"minimum":1,"type":["integer","null"]},"project_id":{"minimum":1,"type":["integer","null"]},"ref_id":{"minimum":1,"type":["integer","null"]},"ref_type":{"type":["string","null"]},"source":{"enum":["ar","ar_retainage","billing","ap","ap_run","ap_retainage","commitment","payroll","recurring","scheduled","debt","lease","manual","scenario"]}},"required":["date","amount","source","label","ref_type","ref_id","project_id","party_id","entity_id","basis","href"],"type":"object"},"accounting_CashPosition":{"properties":{"accounts":{"items":{"properties":{"account_number_masked":{"type":["string","null"]},"bank_account_id":{"type":"integer"},"book_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cleared_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"gl_account_number":{"type":"string"},"kind":{"enum":["checking","savings","money_market","credit_card","cash"],"type":"string"},"last_reconciliation":{"anyOf":[{"properties":{"id":{"type":"integer"},"statement_date":{"format":"date","type":"string"},"statement_ending_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","statement_date","statement_ending_balance"],"type":"object"},{"type":"null"}]},"last_statement":{"anyOf":[{"properties":{"closing_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"date":{"format":"date","type":["string","null"]}},"required":["date","closing_balance"],"type":"object"},{"type":"null"}]},"name":{"type":"string"},"outstanding_deposits":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"outstanding_payments":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"reconciled_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"reconciliation_in_progress_id":{"type":["integer","null"]},"unmatched_count":{"type":"integer"}},"required":["bank_account_id","name","kind","gl_account_number","account_number_masked","book_balance","reconciled_balance","cleared_balance","outstanding_deposits","outstanding_payments","last_reconciliation","reconciliation_in_progress_id","last_statement","unmatched_count"],"type":"object"},"type":"array"},"as_of":{"format":"date","type":"string"},"totals":{"properties":{"cards_owed":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cash":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"net_cash":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"outstanding_deposits":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"outstanding_payments":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"unmatched":{"type":"integer"}},"required":["cash","cards_owed","net_cash","outstanding_deposits","outstanding_payments","unmatched"],"type":"object"}},"required":["as_of","totals","accounts"],"type":"object"},"accounting_CashScenarioCompare":{"properties":{"as_of":{"format":"date","type":"string"},"buckets":{"items":{"properties":{"base":{"properties":{"closing":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"net":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["net","closing"],"type":"object"},"end":{"format":"date","type":"string"},"index":{"type":"integer"},"scenarios":{"items":{"properties":{"closing":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"net":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"scenario_id":{"minimum":1,"type":"integer"}},"required":["scenario_id","net","closing"],"type":"object"},"type":"array"},"start":{"format":"date","type":"string"}},"required":["index","start","end","base","scenarios"],"type":"object"},"type":"array"},"granularity":{"enum":["week","month"]},"opening":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"scenarios":{"items":{"properties":{"id":{"minimum":1,"type":"integer"},"kind":{"type":"string"},"name":{"type":"string"}},"required":["id","name","kind"],"type":"object"},"type":"array"},"totals":{"properties":{"base":{"properties":{"closing":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"inflows":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"low_point":{"oneOf":[{"properties":{"balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"end":{"format":"date","type":"string"}},"required":["end","balance"],"type":"object"},{"type":"null"}]},"outflows":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["inflows","outflows","closing","low_point"],"type":"object"},"scenarios":{"items":{"properties":{"closing":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"inflows":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"low_point":{"oneOf":[{"properties":{"balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"end":{"format":"date","type":"string"}},"required":["end","balance"],"type":"object"},{"type":"null"}]},"outflows":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"scenario_id":{"minimum":1,"type":"integer"}},"required":["scenario_id","inflows","outflows","closing","low_point"],"type":"object"},"type":"array"}},"required":["base","scenarios"],"type":"object"}},"required":["as_of","granularity","opening","scenarios","buckets","totals"],"type":"object"},"accounting_Certificate":{"additionalProperties":false,"properties":{"actor_id":{"minimum":1,"type":"integer"},"certificate_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"company_id":{"minimum":1,"type":"integer"},"counts":{"additionalProperties":{"minimum":0,"type":"integer"},"type":"object"},"destroyed_at":{"format":"date-time","type":"string"},"export_completed_at":{"format":"date-time","type":"string"},"export_id":{"format":"uuid","type":"string"},"export_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"guards_restored":{"const":true},"scope":{"type":"string"},"version":{"const":1}},"required":["version","company_id","export_id","export_sha256","export_completed_at","actor_id","destroyed_at","counts","scope","guards_restored","certificate_sha256"],"type":"object"},"accounting_Check":{"properties":{"bank_account_masked":{"type":["string","null"]},"check_number":{"description":"Paper check number from the shared check register","type":["string","null"]},"deduction_lines":{"items":{"properties":{"amount":{"description":"Decimal string","type":"string"},"code":{"type":"string"},"type":{"type":"string"}},"required":["code","type","amount"],"type":"object"},"type":"array"},"deductions":{"description":"Decimal string","type":"string"},"dt_hours":{"type":"string"},"employee_id":{"type":"integer"},"employee_name":{"type":["string","null"]},"employee_number":{"type":["string","null"]},"employee_taxes":{"description":"Decimal string","type":"string"},"employer_cost":{"description":"Decimal string","type":"string"},"employer_entity_id":{"description":"Employer of record: the entity with its own EIN, null = the company employer in payroll setup.","type":["integer","null"]},"exceptions":{"type":"array"},"explain":{"items":{"type":"object"},"type":"array"},"gross":{"description":"Decimal string","type":"string"},"hours":{"type":"string"},"id":{"type":"integer"},"net":{"description":"Decimal string","type":"string"},"ot_hours":{"type":"string"},"pay_date":{"type":"string"},"payment_method":{"type":"string"},"regular_hours":{"type":"string"},"ssn_masked":{"type":["string","null"]},"suta_state":{"type":["string","null"]},"taxes":{"items":{"properties":{"amount":{"description":"Decimal string","type":"string"},"code":{"type":"string"},"jurisdiction":{"type":"string"},"payer":{"type":"string"}},"required":["code","jurisdiction","payer","amount"],"type":"object"},"type":"array"},"void_entry_id":{"type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_at":{"type":["string","null"]}},"required":["id","employee_id","gross","net","taxes","deduction_lines","employer_entity_id","voided_at","void_reason","void_entry_id"],"type":"object"},"accounting_CheckPrint":{"properties":{"amount":{"type":"string"},"amount_numeric":{"type":"string"},"amount_words":{"type":"string"},"check_number":{"type":"string"},"date":{"format":"date","type":"string"},"legend":{"type":["string","null"]},"memo":{"type":["string","null"]},"micr":{"properties":{"font_text":{"type":"string"},"text":{"type":"string"}},"required":["text","font_text"],"type":"object"},"payee_address":{"items":{"type":"string"},"type":"array"},"payee_line":{"type":"string"},"stub":{"items":{"properties":{"date":{"format":"date","type":"string"},"discount":{"type":"string"},"gross":{"type":"string"},"net":{"type":"string"},"reference":{"type":"string"}},"required":["reference","gross","discount","net"],"type":"object"},"type":"array"}},"required":["check_number","date","amount","amount_numeric","amount_words","payee_line","payee_address","memo","legend","micr","stub"],"type":"object"},"accounting_CloseCockpit":{"additionalProperties":false,"properties":{"blocking":{"items":{"additionalProperties":false,"properties":{"blocked_id":{"type":["integer","null"]},"blocked_name":{"type":["string","null"]},"blocker_id":{"type":["integer","null"]},"blocker_name":{"type":["string","null"]},"tasks":{"items":{"additionalProperties":false,"properties":{"blocked_task_id":{"type":"integer"},"blocking_task_id":{"type":"integer"}},"required":["blocked_task_id","blocking_task_id"],"type":"object"},"type":"array"}},"required":["blocker_id","blocker_name","blocked_id","blocked_name","tasks"],"type":"object"},"type":"array"},"close_blockers":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"href":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"type":"array"},"critical_path":{"description":"Task ids, first to last: the longest chain of unfinished dependent tasks.","items":{"type":"integer"},"type":"array"},"entity_id":{"type":["integer","null"]},"period":{"additionalProperties":false,"properties":{"end_date":{"format":"date","type":["string","null"]},"id":{"type":"integer"},"name":{"type":"string"},"start_date":{"format":"date","type":["string","null"]},"status":{"type":"string"}},"required":["id","name","start_date","end_date","status"],"type":"object"},"progress":{"additionalProperties":false,"properties":{"by_category":{"items":{"additionalProperties":false,"properties":{"category":{"type":"string"},"reviewed":{"type":"integer"},"total":{"type":"integer"}},"required":["category","total","reviewed"],"type":"object"},"type":"array"},"by_status":{"additionalProperties":{"type":"integer"},"type":"object"},"overdue":{"type":"integer"},"percent":{"type":"integer"},"required_open":{"type":"integer"},"reviewed":{"type":"integer"},"total":{"type":"integer"}},"required":["total","reviewed","percent","overdue","required_open","by_status","by_category"],"type":"object"},"reconciliations":{"additionalProperties":false,"properties":{"auto_reconciled":{"type":"integer"},"by_status":{"additionalProperties":{"type":"integer"},"type":"object"},"items_over_90":{"type":"integer"},"missing":{"type":"integer"},"open_items":{"type":"integer"},"stale":{"type":"integer"},"total":{"type":"integer"}},"required":["total","by_status","stale","auto_reconciled","missing","open_items","items_over_90"],"type":"object"},"settings":{"additionalProperties":false,"properties":{"default_template_id":{"type":["integer","null"]},"require_flux":{"description":"GL and whole-period close need every flux variance above threshold explained, reviewed and current (oas-flux.json). Omitted on PUT = unchanged.","type":"boolean"},"require_recs":{"type":"boolean"},"require_tasks":{"type":"boolean"}},"required":["require_tasks","require_recs","default_template_id"],"type":"object"},"tasks":{"items":{"$ref":"#/components/schemas/accounting_CloseTask"},"type":"array"},"today":{"format":"date","type":"string"}},"required":["period","entity_id","today","settings","progress","critical_path","blocking","reconciliations","close_blockers","tasks"],"type":"object"},"accounting_CloseGenerateResult":{"additionalProperties":false,"properties":{"created":{"type":"integer"},"kept":{"type":"integer"}},"required":["created","kept"],"type":"object"},"accounting_CloseSettings":{"additionalProperties":false,"properties":{"default_template_id":{"type":["integer","null"]},"require_flux":{"description":"GL and whole-period close need every flux variance above threshold explained, reviewed and current (oas-flux.json). Omitted on PUT = unchanged.","type":"boolean"},"require_recs":{"type":"boolean"},"require_tasks":{"type":"boolean"},"revision":{"type":"integer"},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["require_tasks","require_recs","default_template_id","revision","updated_at"],"type":"object"},"accounting_CloseSyncResult":{"additionalProperties":false,"properties":{"completed":{"type":"integer"},"reconciled":{"type":"integer"},"stale":{"type":"integer"}},"required":["completed","stale","reconciled"],"type":"object"},"accounting_CloseTask":{"additionalProperties":false,"properties":{"auto_completed":{"type":"boolean"},"category":{"type":"string"},"close_module":{"type":["string","null"]},"critical":{"type":"boolean"},"depends_on":{"items":{"type":"string"},"type":"array"},"due_date":{"format":"date","type":["string","null"]},"entity_id":{"type":["integer","null"]},"evidence":{"type":["string","null"]},"evidence_checked_at":{"format":"date-time","type":["string","null"]},"evidence_message":{"type":["string","null"]},"evidence_status":{"enum":["passed","failed","unavailable",null],"type":["string","null"]},"id":{"type":"integer"},"instructions":{"type":["string","null"]},"key":{"type":"string"},"open_dependencies":{"items":{"type":"string"},"type":"array"},"overdue":{"type":"boolean"},"owner_id":{"type":["integer","null"]},"period_id":{"type":"integer"},"prep_note":{"type":["string","null"]},"prepared_at":{"format":"date-time","type":["string","null"]},"prepared_by_id":{"type":["integer","null"]},"required":{"type":"boolean"},"review_note":{"type":["string","null"]},"reviewed_at":{"format":"date-time","type":["string","null"]},"reviewed_by_id":{"type":["integer","null"]},"reviewer_id":{"type":["integer","null"]},"stale_at":{"format":"date-time","type":["string","null"]},"stale_reason":{"type":["string","null"]},"status":{"enum":["not_started","in_progress","prepared","reviewed"],"type":"string"},"title":{"type":"string"}},"required":["id","period_id","entity_id","key","title","category","close_module","owner_id","reviewer_id","due_date","depends_on","evidence","required","instructions","status","prepared_by_id","prepared_at","prep_note","reviewed_by_id","reviewed_at","review_note","auto_completed","evidence_status","evidence_message","evidence_checked_at","stale_at","stale_reason","overdue","open_dependencies","critical"],"type":"object"},"accounting_CloseTemplate":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":["string","null"]},"description":{"type":["string","null"]},"id":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"revision":{"type":"integer"},"tasks":{"items":{"$ref":"#/components/schemas/accounting_CloseTemplateTask"},"type":"array"},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["id","name","description","is_active","revision","created_at","updated_at","tasks"],"type":"object"},"accounting_CloseTemplateTask":{"additionalProperties":false,"properties":{"category":{"enum":["subledger_close","accruals","reconciliations","reporting","review","other"],"type":"string"},"close_module":{"type":["string","null"]},"depends_on":{"items":{"type":"string"},"type":"array"},"due_day_offset":{"type":"integer"},"evidence":{"type":["string","null"]},"instructions":{"type":["string","null"]},"key":{"type":"string"},"owner_id":{"type":["integer","null"]},"required":{"type":"boolean"},"reviewer_id":{"type":["integer","null"]},"title":{"type":"string"}},"required":["key","title","category","close_module","owner_id","reviewer_id","due_day_offset","depends_on","evidence","required","instructions"],"type":"object"},"accounting_CollCustomer":{"properties":{"as_of":{"format":"date","type":"string"},"customer":{"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"days_to_pay":{"nullable":true,"pattern":"^-?\\d+\\.\\d$","type":"string"},"disputes":{"items":{"$ref":"#/components/schemas/accounting_CollDispute"},"type":"array"},"dunning_sends":{"items":{"$ref":"#/components/schemas/accounting_CollSend"},"type":"array"},"profile":{"$ref":"#/components/schemas/accounting_CollProfile"},"promises":{"items":{"$ref":"#/components/schemas/accounting_CollPromise"},"type":"array"}},"required":["customer","as_of","profile","days_to_pay","disputes","promises","dunning_sends"],"type":"object"},"accounting_CollDispute":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"created_at":{"format":"date-time","type":"string"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"days_open":{"nullable":true,"type":"integer"},"description":{"nullable":true,"type":"string"},"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"raised_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"reason_code":{"enum":["pricing","quantity","quality","not_received","duplicate","retainage","change_order","documentation","other"],"type":"string"},"resolution":{"nullable":true,"type":"string"},"resolved_at":{"format":"date-time","nullable":true,"type":"string"},"resolved_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"source":{"enum":["staff","portal"],"type":"string"},"status":{"enum":["open","resolved","withdrawn"],"type":"string"}},"required":["id","entity_id","customer_id","invoice_id","reason_code","amount","description","status","source","raised_by_id","resolution","resolved_by_id","resolved_at","created_at","days_open"],"type":"object"},"accounting_CollDisputeAction":{"additionalProperties":false,"properties":{"action":{"enum":["resolve","withdraw"],"type":"string"},"resolution":{"maxLength":4000,"minLength":1,"type":"string"}},"required":["action","resolution"],"type":"object"},"accounting_CollDisputeInput":{"additionalProperties":false,"properties":{"dispute":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"description":{"maxLength":4000,"minLength":1,"nullable":true,"type":"string"},"invoice_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"reason_code":{"enum":["pricing","quantity","quality","not_received","duplicate","retainage","change_order","documentation","other"],"type":"string"}},"required":["invoice_id","reason_code","amount"],"type":"object"},"request_key":{"format":"uuid","type":"string"}},"required":["request_key","dispute"],"type":"object"},"accounting_CollError":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"},"accounting_CollPayment":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"confirmed_at":{"format":"date-time","nullable":true,"type":"string"},"convenience_fee":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"failure_reason":{"nullable":true,"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"method":{"enum":["ach","card"],"type":"string"},"payout_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"processor_fee":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"provider":{"enum":["fake"],"type":"string"},"provider_ref":{"type":"string"},"receipt_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"settled_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"enum":["pending","succeeded","failed","settled","held"],"type":"string"},"surcharge":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total_charged":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","entity_id","customer_id","provider","provider_ref","method","currency","amount","surcharge","convenience_fee","total_charged","processor_fee","status","receipt_id","payout_id","failure_reason","invoice_ids","confirmed_at","settled_at","created_at"],"type":"object"},"accounting_CollPolicy":{"properties":{"customer_class":{"type":"string"},"escalation_user_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"revision":{"type":"integer"},"steps":{"items":{"$ref":"#/components/schemas/accounting_CollPolicyStep"},"type":"array"}},"required":["id","customer_class","name","is_active","escalation_user_id","revision","steps"],"type":"object"},"accounting_CollPolicyInput":{"additionalProperties":false,"properties":{"policy":{"additionalProperties":false,"properties":{"customer_class":{"pattern":"^[a-z0-9_-]{1,40}$","type":"string"},"escalation_user_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"is_active":{"type":"boolean"},"name":{"maxLength":200,"minLength":1,"type":"string"},"steps":{"items":{"additionalProperties":false,"properties":{"body":{"maxLength":4000,"minLength":1,"type":"string"},"channel":{"enum":["email"],"type":"string"},"escalate":{"type":"boolean"},"offset_days":{"maximum":365,"minimum":-60,"type":"integer"},"subject":{"maxLength":200,"minLength":1,"type":"string"}},"required":["offset_days","subject","body"],"type":"object"},"maxItems":12,"minItems":1,"type":"array"}},"required":["customer_class","name","steps"],"type":"object"}},"required":["policy"],"type":"object"},"accounting_CollPolicyStep":{"properties":{"body":{"type":"string"},"channel":{"enum":["email"],"type":"string"},"escalate":{"type":"boolean"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"is_active":{"type":"boolean"},"offset_days":{"type":"integer"},"subject":{"type":"string"}},"required":["id","offset_days","channel","subject","body","escalate","is_active"],"type":"object"},"accounting_CollPortalAccess":{"properties":{"active":{"type":"boolean"},"allow_payments":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"grant_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"revoked_at":{"format":"date-time","nullable":true,"type":"string"},"revoked_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["id","grant_id","customer_id","allow_payments","active","created_by_id","created_at","revoked_at","revoked_by_id"],"type":"object"},"accounting_CollPortalAccessInput":{"additionalProperties":false,"properties":{"portal_access":{"additionalProperties":false,"properties":{"allow_payments":{"type":"boolean"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"grant_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["grant_id","customer_id"],"type":"object"},"request_key":{"format":"uuid","type":"string"}},"required":["portal_access"],"type":"object"},"accounting_CollProfile":{"properties":{"collector_user_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"customer_class":{"type":"string"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"follow_up_date":{"format":"date","nullable":true,"type":"string"},"hold_reason":{"nullable":true,"type":"string"},"on_hold":{"type":"boolean"}},"required":["customer_id","customer_class","collector_user_id","on_hold","hold_reason","follow_up_date"],"type":"object"},"accounting_CollProfileInput":{"additionalProperties":false,"properties":{"profile":{"additionalProperties":false,"properties":{"collector_user_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"customer_class":{"pattern":"^[a-z0-9_-]{1,40}$","type":"string"},"follow_up_date":{"format":"date","nullable":true,"type":"string"},"hold_reason":{"maxLength":1000,"minLength":1,"nullable":true,"type":"string"},"on_hold":{"type":"boolean"}},"type":"object"}},"required":["profile"],"type":"object"},"accounting_CollPromise":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"note":{"nullable":true,"type":"string"},"promised_date":{"format":"date","type":"string"},"received_amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"resolved_date":{"format":"date","nullable":true,"type":"string"},"source":{"enum":["staff","portal"],"type":"string"},"start_date":{"format":"date","type":"string"},"status":{"enum":["open","kept","broken","cancelled"],"type":"string"}},"required":["id","entity_id","customer_id","invoice_ids","start_date","promised_date","amount","received_amount","status","source","note","created_by_id","resolved_date","created_at"],"type":"object"},"accounting_CollPromiseInput":{"additionalProperties":false,"properties":{"promise":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"maxItems":50,"type":"array"},"note":{"maxLength":1000,"minLength":1,"nullable":true,"type":"string"},"promised_date":{"format":"date","type":"string"}},"required":["entity_id","customer_id","promised_date","amount"],"type":"object"},"request_key":{"format":"uuid","type":"string"}},"required":["request_key","promise"],"type":"object"},"accounting_CollReason":{"additionalProperties":false,"properties":{"reason":{"maxLength":1000,"minLength":1,"type":"string"}},"required":["reason"],"type":"object"},"accounting_CollRun":{"properties":{"as_of":{"format":"date","type":"string"},"failed":{"type":"integer"},"paused":{"additionalProperties":{"type":"integer"},"type":"object"},"promises":{"properties":{"broken":{"type":"integer"},"kept":{"type":"integer"}},"required":["kept","broken"],"type":"object"},"resume_at":{"format":"date-time","nullable":true,"type":"string"},"sent":{"type":"integer"},"skipped":{"type":"integer"},"status":{"enum":["ran","disabled","not_business_day","quiet_hours","no_policy"],"type":"string"},"suppressed":{"type":"integer"}},"required":["as_of","status","resume_at","sent","skipped","failed","suppressed","paused","promises"],"type":"object"},"accounting_CollSend":{"properties":{"created_at":{"format":"date-time","type":"string"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"escalated_to_user_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"invoice_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"offset_days":{"type":"integer"},"reason":{"nullable":true,"type":"string"},"run_date":{"format":"date","type":"string"},"scheduled_date":{"format":"date","type":"string"},"status":{"enum":["sent","skipped","failed"],"type":"string"},"step_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","entity_id","customer_id","invoice_id","step_id","offset_days","scheduled_date","run_date","status","reason","escalated_to_user_id","created_at"],"type":"object"},"accounting_CollSettings":{"properties":{"ach_enabled":{"type":"boolean"},"business_days":{"items":{"maximum":7,"minimum":1,"type":"integer"},"type":"array"},"card_enabled":{"type":"boolean"},"clearing_account_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"convenience_fee":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"convenience_fee_enabled":{"type":"boolean"},"dunning_enabled":{"type":"boolean"},"fee_account_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"fee_income_account_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"holidays":{"items":{"format":"date","type":"string"},"type":"array"},"payout_account_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"portal_payments_enabled":{"type":"boolean"},"promise_grace_days":{"minimum":0,"type":"integer"},"provider":{"enum":["fake"],"type":"string"},"quiet_end":{"pattern":"^\\d{2}:\\d{2}$","type":"string"},"quiet_start":{"pattern":"^\\d{2}:\\d{2}$","type":"string"},"revision":{"minimum":0,"type":"integer"},"surcharge_enabled":{"type":"boolean"},"surcharge_pct":{"pattern":"^\\d+\\.\\d{4}$","type":"string"}},"required":["revision","dunning_enabled","quiet_start","quiet_end","business_days","holidays","promise_grace_days","portal_payments_enabled","provider","ach_enabled","card_enabled","clearing_account_id","payout_account_id","fee_account_id","surcharge_enabled","surcharge_pct","convenience_fee_enabled","convenience_fee","fee_income_account_id"],"type":"object"},"accounting_CollSettingsInput":{"additionalProperties":false,"properties":{"revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"settings":{"additionalProperties":false,"properties":{"ach_enabled":{"type":"boolean"},"business_days":{"items":{"maximum":7,"minimum":1,"type":"integer"},"maxItems":7,"type":"array"},"card_enabled":{"type":"boolean"},"clearing_account_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"convenience_fee":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"convenience_fee_enabled":{"type":"boolean"},"dunning_enabled":{"type":"boolean"},"fee_account_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"fee_income_account_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"holidays":{"items":{"format":"date","type":"string"},"maxItems":100,"type":"array"},"payout_account_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"portal_payments_enabled":{"type":"boolean"},"promise_grace_days":{"maximum":60,"minimum":0,"type":"integer"},"quiet_end":{"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","type":"string"},"quiet_start":{"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","type":"string"},"surcharge_enabled":{"type":"boolean"},"surcharge_pct":{"pattern":"^\\d{1,2}(\\.\\d{1,4})?$","type":"string"}},"type":"object"}},"required":["settings"],"type":"object"},"accounting_CollWorklistRow":{"properties":{"broken_promises":{"minimum":0,"type":"integer"},"collector_user_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"customer_class":{"type":"string"},"customer_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"customer_name":{"type":"string"},"days_to_pay":{"nullable":true,"pattern":"^-?\\d+\\.\\d$","type":"string"},"disputed_amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"follow_up_date":{"format":"date","nullable":true,"type":"string"},"last_activity_at":{"format":"date-time","nullable":true,"type":"string"},"oldest_days_past_due":{"minimum":0,"type":"integer"},"on_hold":{"type":"boolean"},"open_current":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"open_disputes":{"minimum":0,"type":"integer"},"open_promise":{"nullable":true,"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"promised_date":{"format":"date","type":"string"}},"required":["id","promised_date","amount"],"type":"object"},"past_due":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"risk":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"score":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"terms_days":{"type":"integer"}},"required":["customer_id","customer_name","customer_class","collector_user_id","on_hold","follow_up_date","open_current","past_due","oldest_days_past_due","disputed_amount","open_disputes","open_promise","broken_promises","days_to_pay","terms_days","score","risk","last_activity_at"],"type":"object"},"accounting_Connection":{"additionalProperties":false,"properties":{"authorized":{"description":"OAuth tokens are stored (encrypted, row-bound); they are never returned.","type":"boolean"},"config":{"type":"object"},"entity_id":{"minimum":1,"type":"integer"},"external_tenant":{"type":["string","null"]},"health":{"enum":["ok","error","needs_authorization","never_synced"]},"id":{"minimum":1,"type":"integer"},"last_error":{"type":["string","null"]},"last_sync_at":{"type":["string","null"]},"mode":{"description":"live_api pulls over the vendor API (QuickBooks Online only); file_import sources sync by uploading their export files.","enum":["live_api","file_import"]},"name":{"type":"string"},"provider":{"enum":["qbo","spectrum","sage300cre","intacct","foundation","csv"]},"provider_label":{"type":"string"},"runs":{"description":"Latest five sync runs.","items":{"$ref":"#/components/schemas/accounting_SyncRun"},"type":"array"},"status":{"enum":["active","error","disconnected"]}},"required":["id","entity_id","provider","provider_label","mode","name","status","external_tenant","authorized","config","last_sync_at","last_error","health","runs"],"type":"object"},"accounting_ConsolidationSettings":{"properties":{"ic_tolerance":{"description":"Decimal string with two places","type":"string"},"updated_at":{"format":"date-time","type":["string","null"]},"updated_by_id":{"minimum":1,"type":["integer","null"]}},"required":["ic_tolerance"],"type":"object"},"accounting_CredentialType":{"enum":["cpa","payroll_specialist","tax_advisor"],"type":"string"},"accounting_Dashboard":{"properties":{"as_of":{"format":"date","type":["string","null"]},"available":{"items":{"$ref":"#/components/schemas/accounting_DashboardWidgetInfo"},"type":"array"},"customized":{"type":"boolean"},"hidden":{"description":"Saved widgets the caller's grant can no longer read (not shown)","items":{"type":"string"},"type":"array"},"preset":{"enum":["cfo","controller","project_manager","ap_clerk"]},"widgets":{"items":{"properties":{"data":{"additionalProperties":true,"description":"Widget data by kind: kpi {value, fmt, sub, tone, href}; trend {points}; bar {bars, fmt}; table {columns, rows}; aging {buckets, retainage, total}; list {items, empty}. Money is a 2-dp string; every href is the source page.","type":["object","null"]},"error":{"type":["string","null"]},"key":{"type":"string"},"kind":{"enum":["kpi","trend","bar","table","aging","list"]},"size":{"enum":["s","m","l"]},"title":{"type":"string"}},"required":["key","size","title","kind","data","error"],"type":"object"},"type":"array"}},"required":["preset","customized","as_of","hidden","widgets","available"],"type":"object"},"accounting_DashboardWidgetInfo":{"properties":{"description":{"type":"string"},"key":{"type":"string"},"kind":{"enum":["kpi","trend","bar","table","aging","list"]},"title":{"type":"string"}},"required":["key","title","kind","description"],"type":"object"},"accounting_DaysToPay":{"properties":{"as_of":{"format":"date","type":"string"},"customers":{"items":{"properties":{"count":{"type":"integer"},"customer_id":{"minimum":1,"type":["integer","null"]},"customer_name":{"type":["string","null"]},"lag_days":{"type":"integer"},"mean_days_late":{"type":"integer"},"mean_days_to_pay":{"type":"integer"},"median_days_late":{"type":"integer"},"median_days_to_pay":{"type":"integer"},"samples":{"items":{"properties":{"days_late":{"type":"integer"},"days_to_pay":{"type":"integer"},"due_date":{"format":"date","type":"string"},"invoice_date":{"format":"date","type":"string"},"invoice_id":{"minimum":1,"type":"integer"},"paid_date":{"format":"date","type":"string"}},"required":["invoice_id","invoice_date","due_date","paid_date","days_to_pay","days_late"],"type":"object"},"type":"array"}},"required":["customer_id","customer_name","count","mean_days_to_pay","median_days_to_pay","mean_days_late","median_days_late","lag_days","samples"],"type":"object"},"type":"array"},"lookback_days":{"type":"integer"},"method":{"enum":["median","mean"]}},"required":["as_of","method","lookback_days","customers"],"type":"object"},"accounting_DebtSchedule":{"properties":{"account_id":{"description":"Long-term liability holding the principal","minimum":1,"type":"integer"},"current_account_id":{"description":"Current liability credited by the reclass; null = the CURRENT_PORTION_LTD role account","minimum":1,"type":["integer","null"]},"entity_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"is_active":{"type":"boolean"},"kind":{"enum":["note","lease"]},"name":{"type":"string"},"payments":{"items":{"properties":{"due_date":{"format":"date","type":"string"},"principal":{"description":"Positive amount, at most 2 dp","type":"string"}},"required":["due_date","principal"],"type":"object"},"type":"array"}},"required":["id","entity_id","name","kind","account_id","current_account_id","payments","is_active"],"type":"object"},"accounting_Deduction":{"properties":{"amount":{"description":"Decimal string","type":["string","null"]},"code":{"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"kind":{"enum":["deduction","garnishment","match"],"type":"string"},"params":{"type":["object","null"]},"pct_of_gross":{"type":["string","null"]},"type":{"type":"string"}},"required":["id","kind","code","type","amount","pct_of_gross","params","is_active"],"type":"object"},"accounting_DepreciationPreview":{"properties":{"items":{"items":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"asset_id":{"type":"integer"},"name":{"type":"string"},"number":{"type":"string"},"posted_to_date":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["asset_id","number","name","posted_to_date","amount"],"type":"object"},"type":"array"},"lines":{"items":{"$ref":"#/components/schemas/accounting_PreviewLine"},"type":"array"},"period_id":{"type":"integer"},"period_name":{"type":"string"},"total_amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["period_id","period_name","total_amount","items","lines"],"type":"object"},"accounting_DepreciationRun":{"properties":{"asset_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"entry_id":{"type":["integer","null"]},"entry_number":{"type":["string","null"]},"entry_status":{"type":["string","null"]},"id":{"type":"integer"},"period_id":{"type":"integer"},"period_name":{"type":["string","null"]},"posting_date":{"format":"date","type":"string"},"total_amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","period_id","period_name","posting_date","total_amount","asset_count","entry_id","entry_number","entry_status","created_by_id","created_at"],"type":"object"},"accounting_DepreciationRunShow":{"properties":{"asset_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"entry_id":{"type":["integer","null"]},"entry_number":{"type":["string","null"]},"entry_status":{"type":["string","null"]},"id":{"type":"integer"},"lines":{"items":{"properties":{"account_id":{"type":"integer"},"account_name":{"type":"string"},"account_number":{"type":"string"},"asset_id":{"type":["integer","null"]},"credit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"debit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"equipment_id":{"type":["integer","null"]},"line_no":{"type":"integer"},"memo":{"type":["string","null"]}},"required":["line_no","account_id","account_number","account_name","asset_id","equipment_id","debit","credit","memo"],"type":"object"},"type":"array"},"period_id":{"type":"integer"},"period_name":{"type":["string","null"]},"posting_date":{"format":"date","type":"string"},"total_amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","period_id","period_name","posting_date","total_amount","asset_count","entry_id","entry_number","entry_status","created_by_id","created_at","lines"],"type":"object"},"accounting_Disposal":{"properties":{"accumulated_before":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"adjusted_basis":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"amount_realized":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"asset_id":{"type":"integer"},"catch_up_depreciation":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"catch_up_through":{"type":"string"},"date":{"format":"date","type":"string"},"entry_id":{"type":["integer","null"]},"entry_number":{"type":["string","null"]},"explain":{"items":{"properties":{"cite":{"type":"string"},"formula":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"gain":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"lines":{"items":{"$ref":"#/components/schemas/accounting_PreviewLine"},"type":"array"},"loss":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"posted":{"type":"boolean"},"tax_disposition":{"oneOf":[{"type":"null"},{"properties":{"accumulated_at_disposal":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"deduction":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"tax_year":{"type":"integer"}},"required":["tax_year","deduction","accumulated_at_disposal"],"type":"object"}]}},"required":["posted","asset_id","date","accumulated_before","catch_up_depreciation","catch_up_through","adjusted_basis","amount_realized","gain","loss","tax_disposition","entry_id","entry_number","lines","explain"],"type":"object"},"accounting_Dispute":{"properties":{"as_of":{"format":"date","type":"string"},"assignee_user_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"difference":{"description":"Decimal string with two places","type":"string"},"entity_a_id":{"minimum":1,"type":"integer"},"entity_b_id":{"minimum":1,"type":"integer"},"entry_id":{"minimum":1,"type":["integer","null"]},"events":{"items":{"properties":{"actor_id":{"minimum":1,"type":"integer"},"body":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"data":{},"id":{"minimum":1,"type":"integer"},"kind":{"type":"string"}},"type":"object"},"type":"array"},"id":{"minimum":1,"type":"integer"},"proposal":{"type":["object","null"]},"proposed_at":{"format":"date-time","type":["string","null"]},"proposed_by_id":{"minimum":1,"type":["integer","null"]},"raised_by_id":{"minimum":1,"type":"integer"},"resolution":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"resolved_by_id":{"minimum":1,"type":["integer","null"]},"responsible_entity_id":{"minimum":1,"type":["integer","null"]},"status":{"enum":["open","adjustment_pending","resolved","withdrawn"],"type":"string"}},"required":["id","entity_a_id","entity_b_id","currency","difference","status"],"type":"object"},"accounting_EliminationRun":{"properties":{"created":{"type":"boolean"},"journal_entry":{"oneOf":[{"$ref":"#/components/schemas/accounting_JournalEntryShow"},{"type":"null"}]},"pl_journal_entry":{"description":"The period's intercompany revenue and cost elimination (ASC 810-10-45-1): income-statement lines naming a counterparty entity, reversed out in the elimination entity at the period end. Not auto-reversing; null when the period has no intercompany P&L.","oneOf":[{"$ref":"#/components/schemas/accounting_JournalEntryShow"},{"type":"null"}]},"pl_mismatches":{"description":"Entity pairs (by entity code) whose counterparty P&L lines do not net to zero for the period; left in consolidation, not eliminated.","items":{"properties":{"a":{"type":"string"},"b":{"type":"string"},"difference":{"type":"string"}},"required":["a","b","difference"],"type":"object"},"type":"array"}},"required":["journal_entry","created","pl_journal_entry","pl_mismatches"],"type":"object"},"accounting_Employee":{"properties":{"address":{"type":["string","null"]},"apprentice_level":{"type":["string","null"]},"bank_account_masked":{"type":["string","null"]},"bank_account_type":{"type":["string","null"]},"birth_year":{"type":["integer","null"]},"city":{"type":["string","null"]},"classification":{"type":["string","null"]},"deductions":{"items":{"$ref":"#/components/schemas/accounting_Deduction"},"type":"array"},"first_name":{"type":"string"},"flsa_exempt":{"description":"Salaried only: false = non-exempt, overtime on hours over 40 at 1.5 × weekly salary ÷ 40. A pay-rate field: changes wait for a second person.","type":"boolean"},"has_bank_routing":{"type":"boolean"},"hire_date":{"type":["string","null"]},"home_local_code":{"type":["string","null"]},"hourly_rate":{"type":["string","null"]},"id":{"type":"integer"},"last_name":{"type":"string"},"middle_initial":{"type":["string","null"]},"number":{"type":"string"},"pay_group_code":{"type":["string","null"]},"pay_group_id":{"type":"integer"},"pay_type":{"enum":["hourly","salary"],"type":"string"},"payment_method":{"type":"string"},"pending_bank_change_id":{"description":"PATCH only: bank_routing_number, bank_account_number and bank_account_type become this pending bank change","type":["integer","null"]},"pending_rate_change_id":{"description":"PATCH only: pay-rate fields become this pending rate change","type":["integer","null"]},"plan_credit_per_hour":{"type":["string","null"]},"reciprocity_states":{"items":{"type":"string"},"type":"array"},"resident_locality":{"type":["string","null"]},"resident_state":{"type":"string"},"revealed":{"description":"Only with ?reveal=true and view_payroll_pii; audited","properties":{"bank_account_number":{"type":["string","null"]},"bank_routing_number":{"type":["string","null"]},"ssn":{"type":["string","null"]}},"required":["ssn","bank_routing_number","bank_account_number"],"type":"object"},"salary_allocation":{"type":["array","null"]},"salary_per_period":{"description":"Decimal string","type":["string","null"]},"ssn_masked":{"description":"Masked; full SSN only via ?reveal=true","pattern":"^\\*\\*\\*-\\*\\*-\\d{4}$","type":["string","null"]},"state":{"type":["string","null"]},"state_w4":{"type":["object","null"]},"status":{"type":"string"},"term_date":{"type":["string","null"]},"union_local_id":{"type":["integer","null"]},"user_id":{"type":["integer","null"]},"w4":{"type":["object","null"]},"wc_class_code":{"type":["string","null"]},"work_state":{"type":"string"},"worker_type":{"enum":["J","RA"],"type":"string"},"workforce_person_id":{"type":["integer","null"]},"zip":{"type":["string","null"]}},"required":["id","number","first_name","last_name","pay_group_id","pay_type","ssn_masked","bank_account_masked","flsa_exempt"],"type":"object"},"accounting_Entity":{"properties":{"address":{"type":["string","null"]},"city":{"type":["string","null"]},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"intercompany_due_from_account_id":{"minimum":1,"type":["integer","null"]},"intercompany_due_to_account_id":{"minimum":1,"type":["integer","null"]},"is_active":{"type":"boolean"},"is_elimination":{"description":"The consolidation elimination book: takes only CL entries; never the default entity. Set at creation only; at most one per company.","type":"boolean"},"legal_name":{"type":["string","null"]},"name":{"type":"string"},"phone":{"type":["string","null"]},"retained_earnings_account_id":{"description":"Retained earnings this entity's year-end close posts to (a postable retained earnings or equity account); null uses the company's RETAINED_EARNINGS account.","minimum":1,"type":["integer","null"]},"state":{"type":["string","null"]},"tax_id_last4":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"zip":{"type":["string","null"]}},"required":["id","code","name","legal_name","is_active","intercompany_due_to_account_id","intercompany_due_from_account_id","is_elimination","tax_id_last4","address","city","state","zip","phone","created_at","updated_at","retained_earnings_account_id"],"type":"object"},"accounting_EntityCurrencies":{"properties":{"base_currency":{"pattern":"^[A-Z]{3}$","type":"string"},"entities":{"items":{"$ref":"#/components/schemas/accounting_EntityCurrency"},"type":"array"}},"required":["base_currency","entities"],"type":"object"},"accounting_EntityCurrency":{"properties":{"code":{"type":"string"},"functional_currency":{"pattern":"^[A-Z]{3}$","type":"string"},"functional_is_base":{"type":"boolean"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_elimination":{"type":"boolean"},"name":{"type":"string"}},"required":["id","code","name","functional_currency","functional_is_base"],"type":"object"},"accounting_EquipmentRate":{"properties":{"created_at":{"format":"date-time","type":"string"},"effective_from":{"format":"date","type":"string"},"entity_id":{"description":"Entity that owns the unit and takes the recovery credit.","type":["integer","null"]},"equipment_id":{"type":"integer"},"id":{"type":"integer"},"job_cost_account_id":{"type":"integer"},"rate":{"pattern":"^-?\\d+\\.\\d{6}$","type":"string"},"rate_type":{"enum":["operating","standby","idle"],"type":"string"},"recovery_account_id":{"type":"integer"},"source":{"type":"string"},"unit":{"enum":["hour","day","week","month"],"type":"string"}},"required":["id","equipment_id","entity_id","rate_type","unit","rate","effective_from","source","job_cost_account_id","recovery_account_id","created_at"],"type":"object"},"accounting_EquipmentRecovery":{"properties":{"asset_number":{"type":["string","null"]},"cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"equipment_id":{"type":"integer"},"name":{"type":"string"},"over_under":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"recovery":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["equipment_id","name","asset_number","recovery","cost","over_under"],"type":"object"},"accounting_EquipmentRecoveryReport":{"properties":{"class_key":{"type":["string","null"]},"classes":{"items":{"properties":{"class_key":{"type":"string"},"cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"over_under":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"recovery":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"units":{"type":"integer"}},"required":["class_key","units","cost","recovery","over_under"],"type":"object"},"type":"array"},"from":{"format":"date","type":"string"},"tie_out":{"properties":{"cost_accounts":{"items":{"properties":{"account_id":{"type":"integer"},"account_name":{"type":["string","null"]},"account_number":{"type":["string","null"]},"coded":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"gl":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"uncoded":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["account_id","account_number","account_name","gl","coded","uncoded"],"type":"object"},"type":"array"},"cost_coded":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"recovery_accounts":{"items":{"properties":{"account_id":{"type":"integer"},"account_name":{"type":["string","null"]},"account_number":{"type":["string","null"]},"attributed":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"gl":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"unattributed":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["account_id","account_number","account_name","gl","attributed","unattributed"],"type":"object"},"type":"array"},"recovery_attributed":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["recovery_accounts","cost_accounts","recovery_attributed","cost_coded"],"type":"object"},"to":{"format":"date","type":"string"},"totals":{"properties":{"cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"over_under":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"recovery":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["cost","recovery","over_under"],"type":"object"},"units":{"items":{"properties":{"asset_number":{"type":["string","null"]},"by_period":{"items":{"properties":{"cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"over_under":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"period":{"type":"string"},"recovery":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["period","cost","recovery","over_under"],"type":"object"},"type":"array"},"class_key":{"type":"string"},"cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cost_by_account":{"items":{"properties":{"account_id":{"type":"integer"},"account_name":{"type":["string","null"]},"account_number":{"type":["string","null"]},"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["account_id","account_number","account_name","amount"],"type":"object"},"type":"array"},"current_hourly_rate":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"equipment_id":{"type":"integer"},"name":{"type":"string"},"operating_hours":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"over_under":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"recovery":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"suggested_hourly_rate":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]}},"required":["equipment_id","name","asset_number","class_key","cost","recovery","over_under","cost_by_account","by_period","operating_hours","current_hourly_rate","suggested_hourly_rate"],"type":"object"},"type":"array"}},"required":["from","to","class_key","units","classes","totals","tie_out"],"type":"object"},"accounting_EquipmentTrueup":{"properties":{"approved_at":{"format":"date-time","type":["string","null"]},"approved_by_id":{"type":["integer","null"]},"cancel_reason":{"type":["string","null"]},"class_key":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"entry_id":{"type":["integer","null"]},"evidence_hash":{"type":"string"},"id":{"type":"integer"},"lines":{"items":{"properties":{"account_id":{"type":"integer"},"cost_code_id":{"type":["integer","null"]},"credit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"debit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"entity_id":{"type":"integer"},"equipment_id":{"type":["integer","null"]},"memo":{"type":"string"},"project_id":{"type":["integer","null"]}},"required":["account_id","entity_id","project_id","cost_code_id","equipment_id","debit","credit","memo"],"type":"object"},"type":"array"},"overhead_account_id":{"type":["integer","null"]},"period_id":{"type":"integer"},"policy":{"enum":["jobs","overhead"],"type":"string"},"prepared_at":{"format":"date-time","type":"string"},"prepared_by_id":{"type":"integer"},"reversal_entry_id":{"type":["integer","null"]},"status":{"enum":["prepared","posted","cancelled","superseded","reversed"],"type":"string"},"total_trueup":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"units":{"items":{"properties":{"cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"disposition":{"enum":["jobs","overhead","balanced","skipped"],"type":"string"},"equipment_id":{"type":"integer"},"name":{"type":"string"},"reason":{"type":["string","null"]},"recovery":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"recovery_account_id":{"type":["integer","null"]},"true_up":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["equipment_id","name","cost","recovery","true_up","disposition","reason","recovery_account_id"],"type":"object"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","period_id","class_key","policy","overhead_account_id","status","evidence_hash","total_trueup","units","lines","prepared_by_id","prepared_at","approved_by_id","approved_at","entry_id","reversal_entry_id","cancel_reason","created_at","updated_at"],"type":"object"},"accounting_EquipmentTrueupPrepared":{"properties":{"approved_at":{"format":"date-time","type":["string","null"]},"approved_by_id":{"type":["integer","null"]},"cancel_reason":{"type":["string","null"]},"class_key":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"entry_id":{"type":["integer","null"]},"evidence_hash":{"type":"string"},"id":{"type":"integer"},"lines":{"items":{"properties":{"account_id":{"type":"integer"},"cost_code_id":{"type":["integer","null"]},"credit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"debit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"entity_id":{"type":"integer"},"equipment_id":{"type":["integer","null"]},"memo":{"type":"string"},"project_id":{"type":["integer","null"]}},"required":["account_id","entity_id","project_id","cost_code_id","equipment_id","debit","credit","memo"],"type":"object"},"type":"array"},"overhead_account_id":{"type":["integer","null"]},"period_id":{"type":"integer"},"policy":{"enum":["jobs","overhead"],"type":"string"},"prepared_at":{"format":"date-time","type":"string"},"prepared_by_id":{"type":"integer"},"reversal_entry_id":{"type":["integer","null"]},"status":{"enum":["prepared","posted","cancelled","superseded","reversed"],"type":"string"},"total_trueup":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"unchanged":{"description":"True when an identical prepared run was returned.","type":"boolean"},"units":{"items":{"properties":{"cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"disposition":{"enum":["jobs","overhead","balanced","skipped"],"type":"string"},"equipment_id":{"type":"integer"},"name":{"type":"string"},"reason":{"type":["string","null"]},"recovery":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"recovery_account_id":{"type":["integer","null"]},"true_up":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["equipment_id","name","cost","recovery","true_up","disposition","reason","recovery_account_id"],"type":"object"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","period_id","class_key","policy","overhead_account_id","status","evidence_hash","total_trueup","units","lines","prepared_by_id","prepared_at","approved_by_id","approved_at","entry_id","reversal_entry_id","cancel_reason","created_at","updated_at","unchanged"],"type":"object"},"accounting_EquipmentUsage":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cost_code_id":{"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"date":{"format":"date","type":"string"},"entity_id":{"description":"Entity the usage posted in.","type":["integer","null"]},"entry_id":{"type":["integer","null"]},"equipment_id":{"type":"integer"},"id":{"type":"integer"},"memo":{"type":["string","null"]},"project_id":{"type":"integer"},"quantity":{"pattern":"^-?\\d+\\.\\d{6}$","type":"string"},"rate":{"pattern":"^-?\\d+\\.\\d{6}$","type":"string"},"rate_id":{"type":"integer"},"rate_type":{"type":"string"},"status":{"enum":["posted","voided"],"type":"string"},"unit":{"type":"string"},"void_entry_id":{"type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_on":{"format":"date","type":["string","null"]}},"required":["id","equipment_id","project_id","cost_code_id","date","rate_id","rate_type","unit","quantity","rate","amount","memo","entry_id","entity_id","status","voided_on","void_reason","void_entry_id","created_at"],"type":"object"},"accounting_EquipmentUsageResult":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"lines":{"items":{"$ref":"#/components/schemas/accounting_PreviewLine"},"type":"array"},"rate":{"$ref":"#/components/schemas/accounting_EquipmentRate"},"usage":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/accounting_EquipmentUsage"}]}},"required":["usage","rate","amount","lines"],"type":"object"},"accounting_EquityRun":{"properties":{"approved_at":{"format":"date-time","type":["string","null"]},"approved_by_id":{"minimum":1,"type":["integer","null"]},"as_of":{"format":"date","type":"string"},"cancel_reason":{"type":["string","null"]},"carrying_before":{"description":"Decimal string with two places","type":"string"},"entry_id":{"minimum":1,"type":["integer","null"]},"evidence_hash":{"type":"string"},"id":{"minimum":1,"type":"integer"},"income_source":{"enum":["ledger","manual"],"type":"string"},"investee_entity_id":{"minimum":1,"type":"integer"},"investee_net_income":{"description":"Decimal string with two places","type":"string"},"investee_oci":{"description":"Decimal string with two places","type":"string"},"investor_entity_id":{"minimum":1,"type":"integer"},"ownership_id":{"minimum":1,"type":"integer"},"period_id":{"minimum":1,"type":"integer"},"post_income":{"description":"Decimal string with two places","type":"string"},"post_oci":{"description":"Decimal string with two places","type":"string"},"prepared_at":{"format":"date-time","type":"string"},"prepared_by_id":{"minimum":1,"type":"integer"},"recognized_income":{"description":"Decimal string with two places","type":"string"},"revision":{"type":"integer"},"segments":{"items":{"type":"object"},"type":"array"},"share_of_income":{"description":"Decimal string with two places","type":"string"},"share_of_oci":{"description":"Decimal string with two places","type":"string"},"source_note":{"type":["string","null"]},"status":{"enum":["prepared","posted","cancelled","superseded"],"type":"string"},"suspended_after":{"description":"Decimal string with two places","type":"string"},"suspended_before":{"description":"Decimal string with two places","type":"string"},"unchanged":{"type":"boolean"}},"required":["id","investor_entity_id","investee_entity_id","period_id","revision","status"],"type":"object"},"accounting_Errors":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"},"accounting_Escalation":{"properties":{"business_days_waiting":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"detail":{"type":["object","null"]},"doc_id":{"type":"integer"},"doc_revision":{"type":"integer"},"doc_type":{"$ref":"#/components/schemas/accounting_EscalationDocType"},"id":{"type":"integer"},"kind":{"enum":["reminder","escalation"]},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"reroute_step_ids":{"items":{"type":"integer"},"type":"array"},"run_date":{"format":"date","type":"string"},"seq":{"type":"integer"},"status":{"enum":["sent","skipped"]}},"required":["id","doc_type","doc_id","doc_revision","kind","seq","run_date","business_days_waiting","recipient_ids","reroute_step_ids","detail","status","created_at"],"type":"object"},"accounting_EscalationDocType":{"enum":["ap_bill","payment_batch","journal_entry","bank_transfer","vendor_bank_change","budget","fx_revaluation"]},"accounting_EscalationPolicy":{"properties":{"doc_type":{"$ref":"#/components/schemas/accounting_EscalationDocType"},"escalate_after_days":{"type":"integer"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"max_levels":{"type":"integer"},"reminder_every_days":{"type":"integer"},"target":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","doc_type","is_active","reminder_every_days","escalate_after_days","max_levels","target","updated_at"],"type":"object"},"accounting_EscalationRun":{"properties":{"as_of":{"format":"date","type":"string"},"duplicates":{"type":"integer"},"emails":{"type":"integer"},"escalations":{"type":"integer"},"reminders":{"type":"integer"},"rerouted":{"type":"integer"},"skipped":{"type":"integer"},"status":{"enum":["ran","disabled","not_business_day"]}},"required":["as_of","status","reminders","escalations","rerouted","emails","skipped","duplicates"],"type":"object"},"accounting_EscalationSettings":{"properties":{"business_days":{"items":{"type":"integer"},"type":"array"},"enabled":{"type":"boolean"},"holidays":{"items":{"type":"string"},"type":"array"},"revision":{"type":"integer"},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["enabled","business_days","holidays","revision","updated_at"],"type":"object"},"accounting_ExchangeRate":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":["integer","null"]},"effective_date":{"format":"date","type":"string"},"from_currency":{"pattern":"^[A-Z]{3}$","type":"string"},"id":{"type":"integer"},"immutable":{"type":"boolean"},"import_ref":{"type":["string","null"]},"rate":{"type":"string"},"rate_type":{"enum":["spot","average","historical"],"type":"string"},"source":{"enum":["manual","csv","provider"],"type":"string"},"to_currency":{"pattern":"^[A-Z]{3}$","type":"string"},"updated_at":{"format":"date-time","type":"string"},"used_at":{"format":"date-time","type":["string","null"]}},"required":["id","rate_type","from_currency","to_currency","rate","effective_date","source","used_at","immutable"],"type":"object"},"accounting_ExchangeRateInput":{"additionalProperties":false,"properties":{"effective_date":{"format":"date","type":"string"},"from_currency":{"default":"EUR","pattern":"^[A-Z]{3}$","type":"string"},"rate":{"pattern":"^\\d{1,14}(\\.\\d{1,10})?$","type":"string"},"rate_type":{"default":"spot","enum":["spot","average","historical"],"type":"string"},"to_currency":{"default":"USD","pattern":"^[A-Z]{3}$","type":"string"}},"required":["from_currency","to_currency","effective_date","rate"],"type":"object"},"accounting_ExportDetail":{"additionalProperties":false,"properties":{"completed_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"download_url":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"job_id":{"minimum":1,"type":"integer"},"manifest":{"anyOf":[{"$ref":"#/components/schemas/accounting_ExportManifest"},{"type":"null"}]},"sha256":{"anyOf":[{"pattern":"^[a-f0-9]{64}$","type":"string"},{"type":"null"}]},"status":{"enum":["queued","processing","complete","failed"]}},"required":["id","job_id","status","sha256","created_at","completed_at","manifest","download_url"],"type":"object"},"accounting_ExportManifest":{"additionalProperties":false,"properties":{"attachments":{"type":"string"},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"encoding":{"type":"string"},"export_id":{"format":"uuid","type":"string"},"snapshot":{"type":"string"},"tables":{"items":{"additionalProperties":false,"properties":{"columns":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"rows":{"minimum":0,"type":"integer"},"sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["name","columns","rows","sha256"],"type":"object"},"type":"array"},"version":{"const":1}},"required":["version","company_id","export_id","snapshot","created_at","encoding","attachments","tables"],"type":"object"},"accounting_ExportSummary":{"additionalProperties":false,"properties":{"completed_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"job_id":{"minimum":1,"type":"integer"},"sha256":{"anyOf":[{"pattern":"^[a-f0-9]{64}$","type":"string"},{"type":"null"}]},"status":{"enum":["queued","processing","complete","failed"]}},"required":["id","job_id","status","sha256","created_at","completed_at"],"type":"object"},"accounting_FadeChange":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"exceeds":{"type":"boolean"},"from_period":{"format":"date","type":"string"},"pct_points":{"pattern":"^-?\\d+\\.\\d{4}$","type":"string"},"to_period":{"format":"date","type":"string"}},"required":["from_period","to_period","pct_points","amount","exceeds"],"type":"object"},"accounting_FiscalYear":{"properties":{"end_date":{"format":"date","type":"string"},"id":{"minimum":1,"type":"integer"},"periods":{"items":{"$ref":"#/components/schemas/accounting_Period"},"type":"array"},"start_date":{"format":"date","type":"string"},"status":{"enum":["open","soft_closed","closed"]},"year":{"type":"integer"}},"required":["id","year","start_date","end_date","status","periods"],"type":"object"},"accounting_FixedAsset":{"properties":{"accumulated_account_id":{"type":"integer"},"accumulated_depreciation":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"acquisition_date":{"format":"date","type":"string"},"acquisition_entry_id":{"type":["integer","null"]},"ads_recovery_years":{"type":["string","null"]},"ap_bill_line_id":{"description":"Capitalized from this posted AP bill line (no acquisition entry).","type":["integer","null"]},"asset_account_id":{"type":"integer"},"bonus_pct":{"type":"integer"},"book_convention":{"enum":["full_month","next_month","mid_month","half_year"],"type":"string"},"book_life_months":{"type":"integer"},"book_method":{"enum":["SL","DDB","DB150","SYD","UOP"],"type":"string"},"business_use_pct":{"pattern":"^-?\\d+\\.\\d{6}$","type":"string"},"category":{"type":["string","null"]},"class_id":{"type":["integer","null"]},"cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"created_at":{"format":"date-time","type":"string"},"current_cost":{"description":"Cost plus posted adjustments (additions, impairments, partial disposals).","type":"string"},"description":{"type":["string","null"]},"disposal_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"disposal_entry_id":{"type":["integer","null"]},"disposal_gain_loss":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"disposal_proceeds":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"disposed_on":{"format":"date","type":["string","null"]},"entity_id":{"type":"integer"},"equipment_id":{"type":["integer","null"]},"equipment_name":{"type":["string","null"]},"expense_account_id":{"type":"integer"},"id":{"type":"integer"},"in_service_date":{"format":"date","type":"string"},"name":{"type":"string"},"net_book_value":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"number":{"type":"string"},"opening_accumulated":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"opening_through":{"description":"YYYY-MM: opening_accumulated is depreciation through this month; the schedule spreads the rest over the remaining life.","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","type":["string","null"]},"salvage":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"section_179":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"status":{"enum":["active","disposed","voided"],"type":"string"},"tax_convention":{"enum":["HY","MQ"],"type":"string"},"tax_recovery_class":{"type":["string","null"]},"tax_system":{"enum":["GDS","ADS"],"type":"string"},"total_units":{"description":"UOP: total estimated units over the life.","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"void_entry_id":{"type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_on":{"format":"date","type":["string","null"]}},"required":["id","number","name","description","category","entity_id","status","equipment_id","equipment_name","asset_account_id","accumulated_account_id","expense_account_id","acquisition_date","in_service_date","cost","salvage","book_method","book_life_months","book_convention","opening_accumulated","opening_through","accumulated_depreciation","net_book_value","tax_recovery_class","tax_system","tax_convention","ads_recovery_years","business_use_pct","section_179","bonus_pct","acquisition_entry_id","disposed_on","disposal_proceeds","disposal_costs","disposal_gain_loss","disposal_entry_id","created_at","updated_at","current_cost","class_id","ap_bill_line_id","total_units","voided_on","void_reason","void_entry_id"],"type":"object"},"accounting_FixedAssetShow":{"properties":{"accumulated_account_id":{"type":"integer"},"accumulated_depreciation":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"acquisition_date":{"format":"date","type":"string"},"acquisition_entry_id":{"type":["integer","null"]},"adjustments":{"items":{"$ref":"#/components/schemas/accounting_AssetAdjustment"},"type":"array"},"ads_recovery_years":{"type":["string","null"]},"ap_bill_line_id":{"description":"Capitalized from this posted AP bill line (no acquisition entry).","type":["integer","null"]},"asset_account_id":{"type":"integer"},"bonus_pct":{"type":"integer"},"book_convention":{"enum":["full_month","next_month","mid_month","half_year"],"type":"string"},"book_life_months":{"type":"integer"},"book_method":{"enum":["SL","DDB","DB150","SYD","UOP"],"type":"string"},"book_schedule":{"properties":{"depreciable_base":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"explain":{"items":{"properties":{"cite":{"type":"string"},"formula":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"years":{"items":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"fiscal_year":{"type":"integer"}},"required":["fiscal_year","amount"],"type":"object"},"type":"array"}},"required":["depreciable_base","years","explain"],"type":"object"},"book_tax_differences":{"items":{"properties":{"book":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cumulative_temporary_difference":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"difference":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"tax":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"year":{"type":"integer"}},"required":["year","book","tax","difference","cumulative_temporary_difference"],"type":"object"},"type":"array"},"business_use_pct":{"pattern":"^-?\\d+\\.\\d{6}$","type":"string"},"category":{"type":["string","null"]},"class_id":{"type":["integer","null"]},"cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"created_at":{"format":"date-time","type":"string"},"current_cost":{"description":"Cost plus posted adjustments (additions, impairments, partial disposals).","type":"string"},"description":{"type":["string","null"]},"disposal_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"disposal_entry_id":{"type":["integer","null"]},"disposal_gain_loss":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"disposal_proceeds":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"disposed_on":{"format":"date","type":["string","null"]},"entity_id":{"type":"integer"},"equipment_id":{"type":["integer","null"]},"equipment_name":{"type":["string","null"]},"expense_account_id":{"type":"integer"},"history":{"items":{"properties":{"account_id":{"type":"integer"},"account_number":{"type":"string"},"credit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"debit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"entry_id":{"type":"integer"},"entry_number":{"type":["string","null"]},"entry_status":{"type":"string"},"memo":{"type":["string","null"]},"posting_date":{"format":"date","type":"string"},"source_type":{"type":"string"}},"required":["entry_id","entry_number","posting_date","source_type","entry_status","account_id","account_number","debit","credit","memo"],"type":"object"},"type":"array"},"id":{"type":"integer"},"in_service_date":{"format":"date","type":"string"},"meter_readings":{"items":{"properties":{"period":{"type":"string"},"units":{"type":"string"}},"required":["period","units"],"type":"object"},"type":"array"},"name":{"type":"string"},"net_book_value":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"number":{"type":"string"},"opening_accumulated":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"opening_through":{"description":"YYYY-MM: opening_accumulated is depreciation through this month; the schedule spreads the rest over the remaining life.","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","type":["string","null"]},"salvage":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"section_179":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"status":{"enum":["active","disposed","voided"],"type":"string"},"tax_convention":{"enum":["HY","MQ"],"type":"string"},"tax_recovery_class":{"type":["string","null"]},"tax_schedule":{"oneOf":[{"type":"null"},{"properties":{"bonus":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"convention":{"type":"string"},"depreciable_basis":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"explain":{"items":{"properties":{"cite":{"type":"string"},"formula":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"first_year_total":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"method":{"type":"string"},"section_179":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"unadjusted_basis":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"years":{"items":{"properties":{"accumulated":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rate_pct":{"type":"string"},"recovery_year":{"type":"integer"},"tax_year":{"type":"integer"}},"required":["tax_year","recovery_year","rate_pct","amount","accumulated"],"type":"object"},"type":"array"}},"required":["method","convention","unadjusted_basis","section_179","bonus","depreciable_basis","first_year_total","years","explain"],"type":"object"}]},"tax_system":{"enum":["GDS","ADS"],"type":"string"},"total_units":{"description":"UOP: total estimated units over the life.","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"void_entry_id":{"type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_on":{"format":"date","type":["string","null"]}},"required":["id","number","name","description","category","entity_id","status","equipment_id","equipment_name","asset_account_id","accumulated_account_id","expense_account_id","acquisition_date","in_service_date","cost","salvage","book_method","book_life_months","book_convention","opening_accumulated","opening_through","accumulated_depreciation","net_book_value","tax_recovery_class","tax_system","tax_convention","ads_recovery_years","business_use_pct","section_179","bonus_pct","acquisition_entry_id","disposed_on","disposal_proceeds","disposal_costs","disposal_gain_loss","disposal_entry_id","created_at","updated_at","book_schedule","tax_schedule","book_tax_differences","history","current_cost","class_id","ap_bill_line_id","total_units","voided_on","void_reason","void_entry_id","adjustments","meter_readings"],"type":"object"},"accounting_FluxAnalysis":{"properties":{"budget":{"properties":{"fiscal_year":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"},"version":{"type":"integer"}},"type":["object","null"]},"entity_ids":{"items":{"type":"integer"},"type":"array"},"period":{"$ref":"#/components/schemas/accounting_FluxPeriodRef"},"prior_period":{"$ref":"#/components/schemas/accounting_FluxPeriodRef"},"prior_year_period":{"$ref":"#/components/schemas/accounting_FluxPeriodRef"},"rows":{"items":{"$ref":"#/components/schemas/accounting_FluxRow"},"type":"array"},"settings":{"$ref":"#/components/schemas/accounting_FluxSettings"},"summary":{"properties":{"explained":{"type":"integer"},"requiring":{"type":"integer"},"reviewed":{"type":"integer"},"rows":{"type":"integer"},"stale":{"type":"integer"},"unexplained":{"type":"integer"}},"required":["rows","requiring","unexplained","explained","reviewed","stale"],"type":"object"}},"required":["period","prior_period","prior_year_period","budget","settings","entity_ids","summary","rows"],"type":"object"},"accounting_FluxComparison":{"properties":{"base":{"type":["string","null"]},"comparison":{"enum":["prior_period","prior_year","budget"]},"exceeds":{"type":"boolean"},"variance":{"type":["string","null"]},"variance_pct":{"description":"variance / |base| * 100 to 2 dp; null on a zero base or a comparison not made","type":["string","null"]}},"required":["comparison","base","variance","variance_pct","exceeds"],"type":"object"},"accounting_FluxExplanation":{"properties":{"account_id":{"type":"integer"},"balance_credit":{"type":["string","null"]},"balance_debit":{"type":["string","null"]},"dimension_value_id":{"type":["integer","null"]},"entity_id":{"type":"integer"},"explanation":{"type":"string"},"figures":{"description":"Figures when last explained or reviewed: current, prior_period, prior_year, budget (null = no approved budget).","type":"object"},"id":{"type":"integer"},"period_id":{"type":"integer"},"prepared_at":{"format":"date-time","type":["string","null"]},"prepared_by_id":{"type":"integer"},"review_note":{"type":["string","null"]},"reviewed_at":{"format":"date-time","type":["string","null"]},"reviewed_by_id":{"type":["integer","null"]},"revision":{"type":"integer"}},"required":["id","period_id","entity_id","account_id","dimension_value_id","explanation","revision","figures","prepared_by_id","prepared_at","reviewed_by_id","reviewed_at","review_note"],"type":"object"},"accounting_FluxPeriodRef":{"properties":{"end_date":{"format":"date","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"start_date":{"format":"date","type":"string"}},"required":["id","name","start_date","end_date"],"type":["object","null"]},"accounting_FluxRow":{"properties":{"account":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"normal_balance":{"type":"string"},"number":{"type":"string"},"type":{"type":"string"}},"required":["id","number","name","type","normal_balance"],"type":"object"},"budget":{"type":["string","null"]},"comparisons":{"items":{"$ref":"#/components/schemas/accounting_FluxComparison"},"type":"array"},"current":{"type":"string"},"dimension":{"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]},"dimension_value":{"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]},"entity_id":{"type":"integer"},"explanation":{"oneOf":[{"$ref":"#/components/schemas/accounting_FluxExplanation"},{"type":"null"}]},"key":{"type":"string"},"kind":{"enum":["income_statement","balance_sheet"]},"prior_period":{"type":"string"},"prior_year":{"type":"string"},"requires_explanation":{"type":"boolean"},"stale_reason":{"type":["string","null"]},"status":{"enum":["none","explained","reviewed","stale"]},"threshold":{"properties":{"amount":{"type":"string"},"floor":{"type":"string"},"mode":{"enum":["both","either"]},"percent":{"type":"string"},"source":{"enum":["account","account_type","default"]}},"required":["amount","percent","mode","floor","source"],"type":"object"}},"required":["key","entity_id","kind","account","dimension","dimension_value","current","prior_period","prior_year","budget","comparisons","threshold","requires_explanation","status","stale_reason","explanation"],"type":"object"},"accounting_FluxSettings":{"properties":{"compare_budget":{"type":"boolean"},"compare_prior_period":{"type":"boolean"},"compare_prior_year":{"type":"boolean"},"default_amount":{"type":"string"},"default_percent":{"type":"string"},"materiality_floor":{"type":"string"},"revision":{"type":"integer"},"threshold_mode":{"enum":["both","either"]},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["default_amount","default_percent","threshold_mode","materiality_floor","compare_prior_period","compare_prior_year","compare_budget","revision","updated_at"],"type":"object"},"accounting_FluxThreshold":{"properties":{"account_id":{"type":["integer","null"]},"account_type":{"type":["string","null"]},"amount":{"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"percent":{"type":"string"},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["id","account_type","account_id","amount","percent","is_active","updated_at"],"type":"object"},"accounting_Forecast":{"properties":{"asOf":{"format":"date","type":"string"},"basis":{"type":"string"},"currency":{"type":"string"},"entity":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"lines":{"items":{"allOf":[{"$ref":"#/components/schemas/accounting_Totals"},{"properties":{"code":{"type":"string"},"costCodeId":{"description":"null for the Unassigned cost code row (uncoded posted actuals)","nullable":true,"type":"integer"},"eacBelowFloor":{"type":"boolean"},"explain":{"items":{"properties":{"formula":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"flags":{"description":"Line flags: unforecast_budget (no PM input and revised budget exceeds actual + remaining commitments, so EAC uses the budget), commitment_overrun, eac_below_actual_plus_committed, over_budget","items":{"type":"string"},"type":"array"},"name":{"type":"string"},"notBudgeted":{"description":"A project cost code with actuals or commitments but no budget line: shown with a budget of 0","type":"boolean"},"pm":{"description":"Latest PM input dated on or before asOf for this cost code","nullable":true,"properties":{"approvedAt":{"format":"date-time","nullable":true,"type":"string"},"approvedById":{"nullable":true,"type":"integer"},"asOf":{"format":"date","type":"string"},"costToComplete":{"allOf":[{"$ref":"#/components/schemas/accounting_Money"}],"nullable":true},"id":{"type":"integer"},"reason":{"type":"string"},"revision":{"type":"integer"},"updatedAt":{"format":"date-time","type":"string"},"updatedById":{"type":"integer"}},"required":["id","asOf","costToComplete","reason","revision","updatedById","updatedAt","approvedById","approvedAt"],"type":"object"},"sources":{"items":{"properties":{"amount":{"$ref":"#/components/schemas/accounting_Money"},"bucket":{"type":"string"},"costCodeId":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"href":{"type":"string"},"id":{"type":"integer"},"type":{"type":"string"}},"required":["type","id","costCodeId","amount","bucket","href","date"],"type":"object"},"type":"array"}},"required":["costCodeId","code","name","sources","explain","eacBelowFloor","notBudgeted","pm"],"type":"object"}]},"type":"array"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"totals":{"$ref":"#/components/schemas/accounting_Totals"}},"required":["project","entity","asOf","currency","basis","totals","lines"],"type":"object"},"accounting_FpaCashForecast":{"properties":{"accounts":{"items":{"properties":{"balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"gl_account_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name","gl_account_id","balance"],"type":"object"},"type":"array"},"as_of":{"format":"date","type":"string"},"buckets":{"items":{"properties":{"below_floor":{"type":"boolean"},"by_source":{"additionalProperties":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"type":"object"},"closing":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"end":{"format":"date","type":"string"},"index":{"type":"integer"},"inflows":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"lines":{"items":{"$ref":"#/components/schemas/accounting_CashLine"},"type":"array"},"net":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"opening":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"outflows":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"start":{"format":"date","type":"string"}},"required":["index","start","end","opening","inflows","outflows","net","closing","below_floor","by_source","lines"],"type":"object"},"type":"array"},"closing":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"entity_ids":{"oneOf":[{"items":{"minimum":1,"type":"integer"},"type":"array"},{"type":"null"}]},"excluded":{"items":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"date":{"format":"date","type":["string","null"]},"label":{"type":"string"},"reason":{"enum":["beyond_horizon","disputed","no_completion_date","unapplied_credit","vendor_credit","foreign_currency"]},"ref_id":{"minimum":1,"type":["integer","null"]},"ref_type":{"type":["string","null"]},"source":{"enum":["ar","ar_retainage","billing","ap","ap_run","ap_retainage","commitment","payroll","recurring","scheduled","debt","lease","manual","scenario"]}},"required":["source","reason","label","ref_type","ref_id","amount","date"],"type":"object"},"type":"array"},"explain":{"items":{"properties":{"formula":{"type":"string"},"label":{"type":"string"}},"required":["label","formula"],"type":"object"},"type":"array"},"floor":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"granularity":{"enum":["week","month"]},"horizon_end":{"format":"date","type":"string"},"inflows":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"low_point":{"oneOf":[{"properties":{"balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"end":{"format":"date","type":"string"}},"required":["end","balance"],"type":"object"},{"type":"null"}]},"opening":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"outflows":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"payroll_included":{"type":"boolean"},"scenario":{"oneOf":[{"properties":{"adjustments":{"type":"integer"},"id":{"minimum":1,"type":"integer"},"kind":{"type":"string"},"name":{"type":"string"}},"required":["id","name","kind","adjustments"],"type":"object"},{"type":"null"}]},"settings":{"$ref":"#/components/schemas/accounting_FpaSettings"},"ties":{"additionalProperties":{"additionalProperties":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"type":"object"},"description":"Per source: open items, the part inside the horizon and what is beyond it or excluded","type":"object"}},"required":["as_of","granularity","horizon_end","opening","inflows","outflows","closing","floor","low_point","scenario","payroll_included","entity_ids","accounts","buckets","excluded","ties","settings","explain"],"type":"object"},"accounting_FpaSettings":{"properties":{"customer_terms_days":{"type":"integer"},"default_duration_months":{"type":"integer"},"dtp_lookback_days":{"type":"integer"},"dtp_method":{"enum":["median","mean"]},"fade_threshold_amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"fade_threshold_pct":{"pattern":"^-?\\d+\\.\\d{4}$","type":"string"},"honor_discounts":{"type":"boolean"},"payroll_average_runs":{"type":"integer"},"retainage_release_days":{"type":"integer"},"saved":{"description":"False while the defaults apply","type":"boolean"},"vendor_pay_days":{"type":"integer"}},"required":["dtp_method","dtp_lookback_days","honor_discounts","customer_terms_days","vendor_pay_days","default_duration_months","retainage_release_days","payroll_average_runs","fade_threshold_pct","fade_threshold_amount","saved"],"type":"object"},"accounting_FxSetup":{"properties":{"created":{"items":{"properties":{"account_id":{"type":"integer"},"number":{"type":"string"},"role":{"type":"string"}},"required":["role","account_id","number"],"type":"object"},"type":"array"}},"required":["created"],"type":"object"},"accounting_GeneralLedger":{"properties":{"account_id":{"minimum":1,"type":["integer","null"]},"closing_balance":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"from":{"format":"date","type":"string"},"next_cursor":{"description":"Cursor for the next page (null on the last page)","type":["string","null"]},"opening_balance":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"rows":{"items":{"properties":{"account_id":{"minimum":1,"type":"integer"},"account_name":{"type":"string"},"account_number":{"type":"string"},"cost_code_id":{"minimum":1,"type":["integer","null"]},"credit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"customer_id":{"minimum":1,"type":["integer","null"]},"debit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"department_id":{"minimum":1,"type":["integer","null"]},"entity_id":{"minimum":1,"type":"integer"},"entry_id":{"minimum":1,"type":"integer"},"entry_memo":{"type":["string","null"]},"entry_number":{"type":["string","null"]},"entry_status":{"enum":["posted","reversed"]},"journal":{"enum":["GJ","AP","AR","PR","CM","JC","FA","CL","IC","WIP"]},"line_id":{"minimum":1,"type":"integer"},"memo":{"type":["string","null"]},"posting_date":{"format":"date","type":"string"},"project_id":{"minimum":1,"type":["integer","null"]},"running_balance":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"source_id":{"minimum":1,"type":["integer","null"]},"source_type":{"type":"string"},"vendor_id":{"minimum":1,"type":["integer","null"]}},"required":["line_id","entry_id","entry_number","entry_status","posting_date","journal","entry_memo","account_id","account_number","account_name","memo","debit","credit","running_balance","entity_id","project_id","cost_code_id","department_id","vendor_id","customer_id","source_type","source_id"],"type":"object"},"type":"array"},"to":{"format":"date","type":"string"},"total_credit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total_debit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["account_id","from","to","opening_balance","closing_balance","total_debit","total_credit","rows","next_cursor"],"type":"object"},"accounting_GmpApplication":{"properties":{"billed_at":{"format":"date-time","type":["string","null"]},"certification_note":{"type":["string","null"]},"certified_at":{"format":"date-time","type":["string","null"]},"certified_by_id":{"type":["integer","null"]},"contributor_ids":{"items":{"type":"integer"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"current_due":{"pattern":"^-?\\d{1,16}\\.\\d{2}$","type":"string"},"earned_to_date":{"pattern":"^-?\\d{1,16}\\.\\d{2}$","type":"string"},"entity_id":{"type":"integer"},"exclusions":{"additionalProperties":{"type":"string"},"description":"Disallowed job cost entries: entry id -> reason.","type":"object"},"final":{"type":"boolean"},"id":{"type":"integer"},"invoice_id":{"type":["integer","null"]},"number":{"type":"integer"},"period_end":{"format":"date","type":"string"},"prepared_by_id":{"type":"integer"},"prime_contract_id":{"type":"integer"},"project_id":{"type":"integer"},"result":{"description":"The computed application: summary (G702-style), rows (continuation by cost code), pieces (this period's billing lines), cumulative, disallowed, nteTrims, contingency, allowances, posting (role lines), explain, warnings, errors, inputs.","type":["object","null"]},"result_hash":{"type":["string","null"]},"retainage_to_date":{"pattern":"^-?\\d{1,16}\\.\\d{2}$","type":"string"},"return_reason":{"type":["string","null"]},"returned_at":{"format":"date-time","type":["string","null"]},"reviewer_date":{"format":"date","type":["string","null"]},"reviewer_name":{"type":["string","null"]},"reviewer_role":{"type":["string","null"]},"revision":{"type":"integer"},"status":{"enum":["draft","submitted","returned","certified","billed","void"],"type":"string"},"stored":{"items":{"type":"object"},"type":"array"},"submitted_at":{"format":"date-time","type":["string","null"]},"terms_revision":{"type":["integer","null"]},"updated_at":{"format":"date-time","type":"string"},"void_reason":{"type":["string","null"]},"voided_at":{"format":"date-time","type":["string","null"]}},"required":["id","prime_contract_id","number","period_end","status","revision","current_due"],"type":"object"},"accounting_GovAccessReview":{"properties":{"cancel_reason":{"type":["string","null"]},"completed_at":{"format":"date-time","type":["string","null"]},"completed_by_id":{"type":["integer","null"]},"counts":{"$ref":"#/components/schemas/accounting_GovReviewCounts"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"dormant_days":{"type":"integer"},"due_on":{"format":"date","type":"string"},"entity_id":{"type":["integer","null"]},"id":{"type":"integer"},"kind":{"enum":["quarterly","ad_hoc"],"type":"string"},"period":{"type":["string","null"]},"reviewers":{"items":{"$ref":"#/components/schemas/accounting_GovNamedUser"},"type":"array"},"snapshot_at":{"format":"date-time","type":"string"},"status":{"enum":["open","completed","cancelled"],"type":"string"},"summary":{"description":"Decision counts stored at completion: items, keep, modify, revoke, dormant, sod_conflicts, drift, note","type":["object","null"]},"title":{"type":"string"}},"required":["id","kind","title","period","entity_id","status","due_on","dormant_days","reviewers","snapshot_at","created_by_id","created_at","completed_at","completed_by_id","cancel_reason","counts","summary"],"type":"object"},"accounting_GovAccessReviewDetail":{"properties":{"cancel_reason":{"type":["string","null"]},"completed_at":{"format":"date-time","type":["string","null"]},"completed_by_id":{"type":["integer","null"]},"counts":{"$ref":"#/components/schemas/accounting_GovReviewCounts"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"dormant_days":{"type":"integer"},"due_on":{"format":"date","type":"string"},"entity_id":{"type":["integer","null"]},"id":{"type":"integer"},"items":{"items":{"$ref":"#/components/schemas/accounting_GovAccessReviewItem"},"type":"array"},"kind":{"enum":["quarterly","ad_hoc"],"type":"string"},"period":{"type":["string","null"]},"reviewers":{"items":{"$ref":"#/components/schemas/accounting_GovNamedUser"},"type":"array"},"snapshot_at":{"format":"date-time","type":"string"},"status":{"enum":["open","completed","cancelled"],"type":"string"},"summary":{"type":["object","null"]},"title":{"type":"string"}},"required":["id","kind","title","period","entity_id","status","due_on","dormant_days","reviewers","snapshot_at","created_by_id","created_at","completed_at","completed_by_id","cancel_reason","counts","summary","items"],"type":"object"},"accounting_GovAccessReviewInput":{"additionalProperties":false,"properties":{"dormant_days":{"default":90,"maximum":730,"minimum":1,"type":"integer"},"due_on":{"format":"date","type":"string"},"entity_id":{"description":"Omit or null for the whole company","minimum":1,"type":["integer","null"]},"kind":{"enum":["quarterly","ad_hoc"],"type":"string"},"period":{"description":"Required for quarterly campaigns, e.g. 2026-Q4","pattern":"^\\d{4}-Q[1-4]$","type":"string"},"reviewer_ids":{"items":{"minimum":1,"type":"integer"},"maxItems":20,"minItems":1,"type":"array"},"title":{"maxLength":200,"minLength":3,"type":"string"}},"required":["kind","due_on","reviewer_ids"],"type":"object"},"accounting_GovAccessReviewItem":{"properties":{"api_tokens":{"description":"id, scopes (accounting scopes; [\"*\"] for a legacy full-access token), created_at, expires_at. Never the token.","items":{"type":"object"},"type":"array"},"applied_audit_id":{"type":["integer","null"]},"certified_at":{"format":"date-time","type":["string","null"]},"change":{"description":"The grant a modify decision applied","type":["object","null"]},"decided_at":{"format":"date-time","type":["string","null"]},"decided_by":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/accounting_GovNamedUser"}]},"decision":{"enum":["keep","modify","revoke",null],"type":["string","null"]},"delegated_flags":{"items":{"$ref":"#/components/schemas/accounting_GovFlag"},"type":"array"},"delegations":{"description":"id, direction (received or given), other_user_id, other_name, doc_types, flags, max_amount, entity_ids, starts_at, ends_at","items":{"type":"object"},"type":"array"},"dormant":{"type":"boolean"},"drift_at_decision":{"type":["boolean","null"]},"entity_ids":{"items":{"type":"integer"},"type":"array"},"expires_at":{"format":"date-time","type":["string","null"]},"flags":{"items":{"$ref":"#/components/schemas/accounting_GovFlag"},"type":"array"},"grant_id":{"type":["integer","null"]},"id":{"type":"integer"},"kind":{"enum":["grant","implicit_owner"],"type":"string"},"last_activity_at":{"format":"date-time","type":["string","null"]},"mfa":{"type":"boolean"},"project_scoped":{"type":"boolean"},"reason":{"type":["string","null"]},"review_id":{"type":"integer"},"role":{"type":"string"},"sod_conflicts":{"description":"rule, name, severity, flags, via_delegation, delegation_ids","items":{"type":"object"},"type":"array"},"user":{"properties":{"id":{"type":"integer"},"is_active":{"type":"boolean"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name","login","is_active"],"type":"object"}},"required":["id","review_id","user","kind","grant_id","role","flags","delegated_flags","entity_ids","project_scoped","expires_at","certified_at","mfa","delegations","api_tokens","last_activity_at","dormant","sod_conflicts","decision","reason","change","decided_by","decided_at","drift_at_decision","applied_audit_id"],"type":"object"},"accounting_GovConflictMember":{"properties":{"conflicts":{"items":{"properties":{"delegation_ids":{"items":{"type":"integer"},"type":"array"},"duties":{"items":{"$ref":"#/components/schemas/accounting_GovFlag"},"type":"array"},"name":{"type":"string"},"risk":{"type":"string"},"rule":{"type":"string"},"severity":{"enum":["warn","block"],"type":"string"},"via_delegation":{"items":{"$ref":"#/components/schemas/accounting_GovFlag"},"type":"array"}},"required":["rule","name","severity","duties","risk","via_delegation","delegation_ids"],"type":"object"},"type":"array"},"duties":{"items":{"properties":{"delegation_ids":{"items":{"type":"integer"},"type":"array"},"duty":{"$ref":"#/components/schemas/accounting_GovFlag"},"label":{"type":"string"},"source":{"enum":["grant","delegation"],"type":"string"}},"required":["duty","label","source","delegation_ids"],"type":"object"},"type":"array"},"entity_ids":{"items":{"type":"integer"},"type":"array"},"evidence":{"properties":{"delegations":{"items":{"properties":{"doc_type":{"type":"string"},"duty":{"$ref":"#/components/schemas/accounting_GovFlag"},"ends_at":{"format":"date-time","type":"string"},"from_user_id":{"type":"integer"},"id":{"type":"integer"},"starts_at":{"format":"date-time","type":"string"}},"required":["id","from_user_id","doc_type","duty","starts_at","ends_at"],"type":"object"},"type":"array"},"grant_certified_at":{"format":"date-time","type":["string","null"]},"grant_id":{"type":["integer","null"]},"grant_updated_at":{"format":"date-time","type":["string","null"]},"last_grant_change":{"oneOf":[{"type":"null"},{"properties":{"at":{"format":"date-time","type":"string"},"audit_event_id":{"type":"integer"},"sod_reason":{"type":["string","null"]}},"required":["audit_event_id","at","sod_reason"],"type":"object"}]}},"required":["grant_id","grant_updated_at","grant_certified_at","last_grant_change","delegations"],"type":"object"},"kind":{"enum":["grant","implicit_owner"],"type":"string"},"project_scoped":{"type":"boolean"},"role":{"type":"string"},"user":{"properties":{"id":{"type":"integer"},"is_active":{"type":"boolean"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name","login","is_active"],"type":"object"}},"required":["user","kind","role","entity_ids","project_scoped","duties","conflicts","evidence"],"type":"object"},"accounting_GovConflictReport":{"properties":{"members":{"items":{"$ref":"#/components/schemas/accounting_GovConflictMember"},"type":"array"},"rules":{"items":{"$ref":"#/components/schemas/accounting_GovSodRule"},"type":"array"},"totals":{"properties":{"block":{"type":"integer"},"members":{"type":"integer"},"via_delegation":{"type":"integer"},"with_conflicts":{"type":"integer"}},"required":["members","with_conflicts","block","via_delegation"],"type":"object"}},"required":["rules","totals","members"],"type":"object"},"accounting_GovControlObjective":{"properties":{"days_overdue":{"type":"integer"},"default_frequency":{"enum":["monthly","quarterly","semiannual","annual"],"type":"string"},"due_on":{"format":"date","type":["string","null"]},"evidence_count":{"type":"integer"},"expected_evidence":{"type":"string"},"frequency":{"enum":["monthly","quarterly","semiannual","annual"],"type":"string"},"key":{"type":"string"},"last_evidence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/accounting_GovEvidenceItem"}]},"objective":{"type":"string"},"owner":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/accounting_GovNamedUser"}]},"procedure":{"type":["string","null"]},"state":{"enum":["current","overdue","no_evidence","unassigned"],"type":"string"},"system_sources":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["key","title","objective","expected_evidence","default_frequency","frequency","system_sources","owner","procedure","state","due_on","days_overdue","evidence_count","last_evidence","updated_at"],"type":"object"},"accounting_GovControlObjectiveDetail":{"properties":{"days_overdue":{"type":"integer"},"default_frequency":{"enum":["monthly","quarterly","semiannual","annual"],"type":"string"},"due_on":{"format":"date","type":["string","null"]},"evidence":{"items":{"$ref":"#/components/schemas/accounting_GovEvidenceItem"},"type":"array"},"evidence_count":{"type":"integer"},"expected_evidence":{"type":"string"},"frequency":{"enum":["monthly","quarterly","semiannual","annual"],"type":"string"},"key":{"type":"string"},"last_evidence":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/accounting_GovEvidenceItem"}]},"objective":{"type":"string"},"owner":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/accounting_GovNamedUser"}]},"procedure":{"type":["string","null"]},"state":{"enum":["current","overdue","no_evidence","unassigned"],"type":"string"},"system_sources":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["key","title","objective","expected_evidence","default_frequency","frequency","system_sources","owner","procedure","state","due_on","days_overdue","evidence_count","last_evidence","updated_at","evidence"],"type":"object"},"accounting_GovControlOwnerInput":{"additionalProperties":false,"properties":{"frequency":{"enum":["monthly","quarterly","semiannual","annual"],"type":"string"},"owner_user_id":{"minimum":1,"type":["integer","null"]},"procedure":{"maxLength":2000,"type":["string","null"]}},"required":["owner_user_id","frequency"],"type":"object"},"accounting_GovDecisionInput":{"additionalProperties":false,"properties":{"decision":{"enum":["keep","modify","revoke"],"type":"string"},"grant":{"description":"modify only: the grant to apply, as PATCH grants/{id} (role, entity_ids, expires_at and any permission flag as a boolean)","properties":{"entity_ids":{"items":{"type":"integer"},"type":"array"},"expires_at":{"format":"date","type":["string","null"]},"role":{"type":"string"}},"required":["role"],"type":"object"},"reason":{"maxLength":1000,"minLength":10,"type":"string"}},"required":["decision","reason"],"type":"object"},"accounting_GovEvidence":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"note":{"type":["string","null"]},"objective":{"type":"string"},"performed_on":{"format":"date","type":"string"},"recorded_by_id":{"type":"integer"},"ref_id":{"type":["integer","null"]},"title":{"type":"string"},"url":{"type":["string","null"]}},"required":["id","objective","kind","title","url","ref_id","performed_on","note","recorded_by_id","created_at"],"type":"object"},"accounting_GovEvidenceInput":{"additionalProperties":false,"properties":{"kind":{"enum":["dr_rehearsal","access_review","close_signoff","qualified_signoff","integrity_run","document","other"],"type":"string"},"note":{"maxLength":2000,"type":["string","null"]},"performed_on":{"format":"date","type":"string"},"ref_id":{"minimum":1,"type":["integer","null"]},"title":{"maxLength":200,"minLength":3,"type":"string"},"url":{"format":"uri","type":["string","null"]}},"required":["kind","title","performed_on"],"type":"object"},"accounting_GovEvidenceItem":{"properties":{"date":{"format":"date","type":"string"},"href":{"type":["string","null"]},"id":{"type":["integer","null"]},"kind":{"type":"string"},"note":{"type":["string","null"]},"recorded_by":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/accounting_GovNamedUser"}]},"ref_id":{"type":["integer","null"]},"source":{"enum":["system","recorded"],"type":"string"},"title":{"type":"string"},"url":{"type":["string","null"]}},"required":["source","kind","title","date","ref_id","href","url","note","id","recorded_by"],"type":"object"},"accounting_GovFlag":{"enum":["view_ledger","post_journal","approve_journal","manage_coa","close_period","ap_enter","ap_approve","release_payments","manage_vendor_banking","ar_enter","ar_approve","payroll_view","payroll_run","view_payroll_pii","bank_reconcile","manage_integrations","manage_grants","job_forecast_edit"],"type":"string"},"accounting_GovNamedUser":{"properties":{"id":{"type":"integer"},"name":{"type":["string","null"]}},"required":["id","name"],"type":"object"},"accounting_GovReviewCounts":{"properties":{"decided":{"type":"integer"},"dormant":{"type":"integer"},"items":{"type":"integer"},"keep":{"type":"integer"},"modify":{"type":"integer"},"revoke":{"type":"integer"},"sod":{"type":"integer"}},"required":["items","decided","dormant","sod","keep","modify","revoke"],"type":"object"},"accounting_GovSodRule":{"properties":{"duties":{"items":{"$ref":"#/components/schemas/accounting_GovFlag"},"type":"array"},"enabled":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"risk":{"type":"string"},"severity":{"enum":["warn","block"],"type":"string"},"source":{"enum":["default","customized","custom"],"type":"string"},"updated_at":{"format":"date-time","type":["string","null"]},"updated_by_id":{"type":["integer","null"]}},"required":["key","name","duties","severity","enabled","risk","source","updated_at","updated_by_id"],"type":"object"},"accounting_GovSodRuleInput":{"additionalProperties":false,"properties":{"duties":{"description":"Custom rules only; a built-in rule's duties are fixed","items":{"$ref":"#/components/schemas/accounting_GovFlag"},"maxItems":4,"minItems":2,"type":"array"},"enabled":{"type":"boolean"},"name":{"maxLength":120,"minLength":3,"type":"string"},"reason":{"maxLength":1000,"minLength":10,"type":"string"},"risk":{"maxLength":500,"minLength":10,"type":"string"},"severity":{"enum":["warn","block"],"type":"string"}},"required":["severity","enabled","reason"],"type":"object"},"accounting_GovSodRuleSaved":{"properties":{"current_holders":{"items":{"properties":{"name":{"type":"string"},"user_id":{"type":"integer"}},"required":["user_id","name"],"type":"object"},"type":"array"},"duties":{"items":{"$ref":"#/components/schemas/accounting_GovFlag"},"type":"array"},"enabled":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"risk":{"type":"string"},"severity":{"enum":["warn","block"],"type":"string"},"source":{"enum":["default","customized","custom"],"type":"string"},"updated_at":{"format":"date-time","type":["string","null"]},"updated_by_id":{"type":["integer","null"]}},"required":["key","name","duties","severity","enabled","risk","source","updated_at","updated_by_id","current_holders"],"type":"object"},"accounting_ImportCommand":{"oneOf":[{"additionalProperties":false,"properties":{"action":{"const":"map"},"mapping":{"additionalProperties":false,"properties":{"accounts":{"additionalProperties":{"minimum":1,"type":"integer"},"maxProperties":200,"type":"object"},"columns":{"additionalProperties":{"type":"string"},"maxProperties":20,"type":"object"}},"required":["columns","accounts"],"type":"object"},"preview_hash":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["action","preview_hash","mapping"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"const":"reconcile"},"expected_credit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"expected_debit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"preview_hash":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["action","preview_hash","expected_debit","expected_credit"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"const":"apply"},"approve":{"const":true},"preview_hash":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["action","preview_hash","approve"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"const":"reverse"},"approve":{"const":true},"date":{"format":"date","type":"string"},"item_id":{"minimum":1,"type":"integer"},"preview_hash":{"pattern":"^[a-f0-9]{64}$","type":"string"},"reason":{"maxLength":500,"minLength":1,"type":"string"}},"required":["action","preview_hash","item_id","date","reason","approve"],"type":"object"}]},"accounting_ImportRun":{"additionalProperties":false,"properties":{"applied_at":{"type":["string","null"]},"approved_by_id":{"type":["integer","null"]},"as_of":{"type":["string","null"]},"background":{"description":"Files over 200 rows or 256 KiB (vendors, customers, cost_codes, open_ap, open_ar, employee_ytd) preview and apply on the accounting_import job in chunks of 500 rows.","type":"boolean"},"chunk_count":{"minimum":0,"type":"integer"},"chunks_done":{"description":"Resume cursor: each chunk commits with its records and this counter, so a killed worker resumes without duplicates.","minimum":0,"type":"integer"},"contributor_ids":{"items":{"minimum":1,"type":"integer"},"minItems":1,"type":"array","uniqueItems":true},"created_at":{"type":"string"},"entity_id":{"minimum":1,"type":"integer"},"history":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor_id":{"minimum":1,"type":"integer"},"created_at":{"type":"string"},"id":{"minimum":1,"type":"integer"},"summary":{"type":"string"}},"required":["id","action","actor_id","created_at","summary"],"type":"object"},"type":"array"},"id":{"minimum":1,"type":"integer"},"item_count":{"description":"items lists at most the first 1,000.","minimum":0,"type":"integer"},"items":{"items":{"additionalProperties":false,"properties":{"external_key":{"type":"string"},"id":{"minimum":1,"type":"integer"},"journal_entry_id":{"type":["integer","null"]},"journal_status":{"type":["string","null"]},"kind":{"description":"document: an open AP bill/credit or AR invoice; record: an account, party or cost code; journal: an imported journal","enum":["document","record","journal"],"type":"string"},"label":{"type":"string"},"local_id":{"type":["integer","null"]},"local_type":{"description":"AcctApBill, AcctArInvoice, AcctAccount, Vendor or StandardCostCode","type":["string","null"]},"reused":{"type":"boolean"},"reversal_entry_id":{"type":["integer","null"]}},"required":["id","external_key","journal_entry_id","reused","journal_status","reversal_entry_id","kind","label","local_type","local_id"],"type":"object"},"type":"array"},"job":{"anyOf":[{"type":"null"},{"additionalProperties":false,"properties":{"attempts":{"type":"integer"},"max_attempts":{"type":"integer"},"progress":{"maximum":100,"minimum":0,"type":"integer"},"status":{"enum":["queued","running","completed","failed","cancelled"]}},"required":["status","progress","attempts","max_attempts"],"type":"object"}]},"kind":{"enum":["opening_tb","journal","open_ap","open_ar","coa","vendors","customers","cost_codes","employee_ytd"]},"last_edited_by_id":{"minimum":1,"type":"integer"},"last_error":{"type":["string","null"]},"mapping":{"additionalProperties":false,"properties":{"accounts":{"additionalProperties":{"minimum":1,"type":"integer"},"maxProperties":200,"type":"object"},"balance_includes_retainage":{"description":"Open AP/AR: the Balance column already includes open retainage.","type":"boolean"},"basis":{"description":"Opening TB basis. Cash: no AR/AP in the TB; open documents come on through an accrual conversion entry.","enum":["accrual","cash"]},"columns":{"additionalProperties":{"type":"string"},"maxProperties":20,"type":"object"},"dimensions":{"additionalProperties":{"minimum":1,"type":"integer"},"description":"Journal and open-document dimensions: source key (csv:project:..., csv:cost_codes:...@<project id>, csv:cost_type:...) to local id. Unmapped keys resolve through this namespace's recorded AcctExternalRef rows, then an exact unique match (project number or name, cost code within the project, cost type code/name/base type, party name).","maxProperties":500,"type":"object"},"parties":{"additionalProperties":{"minimum":1,"type":"integer"},"description":"Open AP/AR: source party key to vendor id; unmapped parties match an active vendor by exact name.","maxProperties":2000,"type":"object"}},"required":["columns","accounts","parties","basis","balance_includes_retainage","dimensions"],"type":"object"},"prepared_by_id":{"minimum":1,"type":"integer"},"preview":{"anyOf":[{"additionalProperties":false,"properties":{"chunks":{"items":{"additionalProperties":false,"properties":{"from":{"type":"integer"},"hash":{"pattern":"^[a-f0-9]{64}$","type":"string"},"rows":{"type":"integer"}},"required":["from","rows","hash"],"type":"object"},"type":"array"},"columns":{"additionalProperties":{"type":"string"},"type":"object"},"counts":{"additionalProperties":false,"properties":{"documents":{"type":"integer"},"existing":{"type":"integer"},"records":{"type":"integer"}},"required":["documents","records","existing"],"type":"object"},"credit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"currencies":{"description":"Rows that state a currency (opening TB, open AP/AR); each must be the entity functional currency.","items":{"additionalProperties":false,"properties":{"currency":{"pattern":"^[A-Z]{3}$","type":"string"},"row":{"minimum":0,"type":"integer"}},"required":["row","currency"],"type":"object"},"type":"array"},"currency":{"type":"string"},"debit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"entries":{"items":{"additionalProperties":false,"properties":{"draft":{"additionalProperties":false,"properties":{"currency":{"type":"string"},"entityId":{"minimum":1,"type":"integer"},"journal":{"const":"GJ"},"lines":{"items":{"additionalProperties":false,"properties":{"accountId":{"type":"integer"},"costCodeId":{"minimum":1,"type":"integer"},"costTypeId":{"minimum":1,"type":"integer"},"credit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"debit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"memo":{"type":["string","null"]},"projectId":{"minimum":1,"type":"integer"},"vendorId":{"minimum":1,"type":"integer"}},"required":["accountId","debit","credit","memo"],"type":"object"},"type":"array"},"memo":{"type":"string"},"postingDate":{"type":"string"},"sourceType":{"const":"file_import"}},"required":["entityId","postingDate","currency","journal","sourceType","memo","lines"],"type":"object"},"existingId":{"type":["integer","null"]},"externalId":{"type":"string"},"hash":{"pattern":"^[a-f0-9]{64}$","type":"string"},"period":{"anyOf":[{"type":"null"},{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}]}},"required":["externalId","hash","existingId","period","draft"],"type":"object"},"type":"array"},"errorCount":{"minimum":0,"type":"integer"},"errors":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"type":"string"},"type":"array"},"headers":{"items":{"type":"string"},"type":"array"},"openDocuments":{"description":"Open AP/AR documents to post (one AP bill/credit or AR invoice each, coded to OPENING_BALANCE_EQUITY).","items":{"additionalProperties":false,"properties":{"date":{"type":"string"},"dueDate":{"type":"string"},"existingId":{"type":["integer","null"]},"externalId":{"type":"string"},"hash":{"pattern":"^[a-f0-9]{64}$","type":"string"},"kind":{"enum":["ap_bill","ap_credit","ar_invoice","ar_credit"]},"number":{"type":"string"},"partyKey":{"type":"string"},"projectId":{"minimum":1,"type":"integer"},"retainage":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"vendorId":{"type":"integer"}},"required":["externalId","hash","existingId","kind","partyKey","vendorId","number","date","dueDate","total","retainage"],"type":"object"},"type":"array"},"reconciliation":{"additionalProperties":false,"properties":{"difference":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"scope":{"type":"string"},"sourceCredit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"sourceDebit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"targetCredit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"targetDebit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["sourceDebit","sourceCredit","targetDebit","targetCredit","difference","scope"],"type":"object"},"records":{"description":"Master records (accounts, vendors/customers, standard cost codes) to create; existingId means an identical record is reused.","items":{"additionalProperties":false,"properties":{"existingId":{"type":["integer","null"]},"externalId":{"type":"string"},"hash":{"pattern":"^[a-f0-9]{64}$","type":"string"},"label":{"type":"string"},"record":{"additionalProperties":{"type":["string","boolean","null"]},"type":"object"}},"required":["externalId","hash","existingId","label","record"],"type":"object"},"type":"array"},"sourceAccounts":{"items":{"additionalProperties":false,"properties":{"accountId":{"type":["integer","null"]},"key":{"type":"string"}},"required":["key","accountId"],"type":"object"},"type":"array"},"sourceDimensions":{"items":{"additionalProperties":false,"properties":{"key":{"type":"string"},"kind":{"enum":["project","cost_code","cost_type","party"]},"localId":{"type":["integer","null"]},"name":{"type":"string"}},"required":["key","kind","name","localId"],"type":"object"},"type":"array"},"sourceHash":{"pattern":"^[a-f0-9]{64}$","type":"string"},"sourceParties":{"items":{"additionalProperties":false,"properties":{"key":{"type":"string"},"name":{"type":"string"},"vendorId":{"type":["integer","null"]}},"required":["key","name","vendorId"],"type":"object"},"type":"array"},"tieOut":{"anyOf":[{"type":"null"},{"items":{"additionalProperties":false,"properties":{"accountKey":{"type":"string"},"control":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"difference":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"role":{"enum":["AR_CONTROL","RETAINAGE_RECEIVABLE","AP_CONTROL","RETAINAGE_PAYABLE"]},"subledger":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["role","accountKey","control","subledger","difference"],"type":"object"},"type":"array"}],"description":"Opening TB (accrual): each control role against the imported open documents; any non-zero difference blocks apply."},"totals":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["headers","columns","fields","errors","debit","credit","sourceHash","currency","sourceAccounts","entries","reconciliation","totals","openDocuments","records","tieOut","sourceParties","sourceDimensions"],"type":"object"},{"additionalProperties":false,"description":"A background run whose preview job has not finished.","properties":{"errors":{"maxItems":0,"type":"array"},"pending":{"const":true}},"required":["pending","errors"],"type":"object"}]},"preview_hash":{"pattern":"^[a-f0-9]{64}$","type":"string"},"reconciled_by_id":{"type":["integer","null"]},"revision":{"minimum":0,"type":"integer"},"row_count":{"minimum":0,"type":"integer"},"source_hash":{"pattern":"^[a-f0-9]{64}$","type":"string"},"source_namespace":{"type":"string"},"status":{"enum":["queued","blocked","preview","reconciled","applying","applied"]}},"required":["id","entity_id","source_namespace","kind","status","created_at","as_of","source_hash","preview_hash","mapping","preview","prepared_by_id","reconciled_by_id","approved_by_id","applied_at","last_error","items","history","last_edited_by_id","contributor_ids","revision","background","row_count","chunk_count","chunks_done","item_count","job"],"type":"object"},"accounting_ImportSummary":{"additionalProperties":false,"properties":{"created_at":{"type":"string"},"entity_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["opening_tb","journal","open_ap","open_ar","coa","vendors","customers","cost_codes","employee_ytd"]},"prepared_by_id":{"minimum":1,"type":"integer"},"source_namespace":{"type":"string"},"status":{"enum":["queued","blocked","preview","reconciled","applying","applied"]}},"required":["id","entity_id","source_namespace","kind","status","created_at","prepared_by_id"],"type":"object"},"accounting_Inbox":{"properties":{"bank_account_id":{"type":"integer"},"counts":{"properties":{"all":{"type":"integer"},"high":{"type":"integer"},"none":{"type":"integer"},"rule":{"type":"integer"},"suggested":{"type":"integer"}},"required":["all","suggested","high","rule","none"],"type":"object"},"lines":{"items":{"properties":{"amount":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bank_account_id":{"type":"integer"},"bank_txn_id":{"type":["string","null"]},"check_number":{"type":["string","null"]},"date":{"format":"date","type":"string"},"description":{"type":"string"},"feed_note":{"description":"Set when the live feed changed or removed this line after it was matched; cleared by Mark reviewed or unmatch.","type":["string","null"]},"id":{"type":"integer"},"import_id":{"type":"integer"},"journal_line_ids":{"items":{"type":"integer"},"type":"array"},"match_confidence":{"type":["string","null"]},"match_source":{"type":["string","null"]},"matched_at":{"format":"date-time","type":["string","null"]},"reference":{"type":["string","null"]},"rule_id":{"type":["integer","null"]},"status":{"enum":["unmatched","matched","ignored"],"type":"string"},"suggestion":{"anyOf":[{"$ref":"#/components/schemas/accounting_Suggestion"},{"type":"null"}]},"type_code":{"type":["string","null"]}},"required":["id","bank_account_id","import_id","date","amount","description","reference","check_number","bank_txn_id","type_code","status","match_source","match_confidence","rule_id","matched_at","journal_line_ids","suggestion","feed_note"],"type":"object"},"type":"array"},"statement_balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"statement_date":{"format":"date","type":["string","null"]},"total":{"description":"Statement lines matching the status filter","type":"integer"},"truncated":{"description":"True when more lines match than the inbox shows (oldest 1000 first); match or ignore some to see the rest","type":"boolean"}},"required":["bank_account_id","statement_balance","statement_date","counts","lines","total","truncated"],"type":"object"},"accounting_InboxItem":{"additionalProperties":false,"properties":{"at":{"type":"string"},"import_id":{"type":["integer","null"]},"key":{"type":"string"},"message":{"type":"string"},"source":{"type":"string"},"sync_run_id":{"type":["integer","null"]}},"required":["key","source","sync_run_id","import_id","message","at"],"type":"object"},"accounting_JobCostEntry":{"properties":{"amount":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cost_code_id":{"minimum":1,"type":["integer","null"]},"cost_type":{"enum":["labor","material","subcontract","equipment","other","burden"]},"cost_type_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"date":{"format":"date","type":"string"},"hours":{"description":"Decimal rate or quantity as a string, 6 dp","pattern":"^-?\\d+\\.\\d{6}$","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"journal_line_id":{"minimum":1,"type":["integer","null"]},"kind":{"enum":["actual","committed","estimate","projection","change","billed"]},"memo":{"type":["string","null"]},"period_id":{"minimum":1,"type":["integer","null"]},"project_id":{"minimum":1,"type":"integer"},"quantity":{"description":"Decimal rate or quantity as a string, 6 dp","pattern":"^-?\\d+\\.\\d{6}$","type":["string","null"]},"source_id":{"minimum":1,"type":["integer","null"]},"source_type":{"type":"string"}},"required":["id","project_id","cost_code_id","cost_type","cost_type_id","kind","amount","hours","quantity","date","period_id","source_type","source_id","journal_line_id","memo","created_at"],"type":"object"},"accounting_JobTaxProfile":{"additionalProperties":false,"properties":{"accrue_use_tax":{"type":"boolean"},"as_of":{"format":"date","type":"string"},"charge_customer":{"type":"boolean"},"contract_type":{"enum":["lump_sum","separated"],"type":"string"},"fixtures":{"nullable":true,"type":"string"},"model":{"enum":["consumer","retailer_on_separated","gross_receipts","retail_sale_of_construction"],"type":"string"},"project_id":{"type":"integer"},"sales_tax_code_id":{"description":"Job-site sales tax code billed to the owner (retailer and gross-receipts models); the pay-app bridge applies it.","nullable":true,"type":"integer"},"state_code":{"pattern":"^[A-Z]{2}$","type":"string"},"use_tax_code_id":{"description":"Use tax code accrued on untaxed material bills (consumer model).","nullable":true,"type":"integer"}},"required":["project_id","state_code","contract_type","sales_tax_code_id","use_tax_code_id","as_of","model","charge_customer","accrue_use_tax","fixtures"],"type":"object"},"accounting_JournalEntry":{"properties":{"approved_by_id":{"minimum":1,"type":["integer","null"]},"auto_reverse_date":{"format":"date","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"document_date":{"format":"date","type":["string","null"]},"entity_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"journal":{"enum":["GJ","AP","AR","PR","CM","JC","FA","CL","IC","WIP"]},"memo":{"type":["string","null"]},"number":{"description":"JE-YYYY-#####, assigned on posting","type":["string","null"]},"period_id":{"minimum":1,"type":"integer"},"posted_at":{"format":"date-time","type":["string","null"]},"posted_by_id":{"minimum":1,"type":["integer","null"]},"posting_date":{"format":"date","type":"string"},"prepared_by_id":{"minimum":1,"type":"integer"},"reversed_by_id":{"minimum":1,"type":["integer","null"]},"reverses_id":{"minimum":1,"type":["integer","null"]},"source_id":{"minimum":1,"type":["integer","null"]},"source_revision":{"type":"integer"},"source_type":{"type":"string"},"status":{"enum":["draft","pending_approval","posted","reversed"]},"total_amount":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","number","status","journal","entity_id","period_id","posting_date","document_date","memo","source_type","source_id","source_revision","total_amount","currency","prepared_by_id","approved_by_id","posted_by_id","posted_at","reverses_id","reversed_by_id","auto_reverse_date","created_at","updated_at"],"type":"object"},"accounting_JournalEntryShow":{"properties":{"approved_at":{"format":"date-time","type":["string","null"]},"approved_by_id":{"minimum":1,"type":["integer","null"]},"auto_reverse_date":{"format":"date","type":["string","null"]},"balanced":{"type":"boolean"},"batch_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"document_date":{"format":"date","type":["string","null"]},"entity_id":{"minimum":1,"type":"integer"},"exchange_rate":{"description":"Decimal rate or quantity as a string, 6 dp","pattern":"^-?\\d+\\.\\d{6}$","type":"string"},"id":{"minimum":1,"type":"integer"},"is_closing_entry":{"type":"boolean"},"is_noncash":{"type":"boolean"},"journal":{"enum":["GJ","AP","AR","PR","CM","JC","FA","CL","IC","WIP"]},"lines":{"items":{"$ref":"#/components/schemas/accounting_JournalLine"},"type":"array"},"memo":{"type":["string","null"]},"number":{"description":"JE-YYYY-#####, assigned on posting","type":["string","null"]},"period_id":{"minimum":1,"type":"integer"},"posted_at":{"format":"date-time","type":["string","null"]},"posted_by_id":{"minimum":1,"type":["integer","null"]},"posting_date":{"format":"date","type":"string"},"prepared_by_id":{"minimum":1,"type":"integer"},"recurring_id":{"minimum":1,"type":["integer","null"]},"reversed_by_id":{"minimum":1,"type":["integer","null"]},"reverses_id":{"minimum":1,"type":["integer","null"]},"source_id":{"minimum":1,"type":["integer","null"]},"source_revision":{"type":"integer"},"source_type":{"type":"string"},"status":{"enum":["draft","pending_approval","posted","reversed"]},"submitted_at":{"format":"date-time","type":["string","null"]},"total_amount":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total_credit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total_debit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","number","status","journal","entity_id","period_id","posting_date","document_date","memo","source_type","source_id","source_revision","total_amount","currency","prepared_by_id","approved_by_id","posted_by_id","posted_at","reverses_id","reversed_by_id","auto_reverse_date","created_at","updated_at","exchange_rate","is_closing_entry","is_noncash","batch_id","recurring_id","submitted_at","approved_at","total_debit","total_credit","balanced","lines"],"type":"object"},"accounting_JournalLine":{"properties":{"account_id":{"minimum":1,"type":"integer"},"account_name":{"type":["string","null"]},"account_number":{"type":["string","null"]},"billable":{"type":"boolean"},"commitment_id":{"minimum":1,"type":["integer","null"]},"contract_id":{"minimum":1,"type":["integer","null"]},"cost_code_id":{"minimum":1,"type":["integer","null"]},"cost_type_id":{"minimum":1,"type":["integer","null"]},"counterparty_entity_id":{"description":"The other entity of an intercompany due-to/due-from line (set by the intercompany pre-pass, or by hand). Drives the pairwise intercompany check and eliminations.","minimum":1,"type":["integer","null"]},"credit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"customer_id":{"minimum":1,"type":["integer","null"]},"debit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"department_id":{"minimum":1,"type":["integer","null"]},"dimension_value_ids":{"items":{"type":"integer"},"type":["array","null"]},"employee_id":{"minimum":1,"type":["integer","null"]},"entity_id":{"minimum":1,"type":"integer"},"equipment_id":{"minimum":1,"type":["integer","null"]},"id":{"minimum":1,"type":"integer"},"line_no":{"minimum":1,"type":"integer"},"memo":{"type":["string","null"]},"project_id":{"minimum":1,"type":["integer","null"]},"quantity":{"description":"Decimal rate or quantity as a string, 6 dp","pattern":"^-?\\d+\\.\\d{6}$","type":["string","null"]},"reconcile_state":{"enum":["n","c","y","v"]},"source_id":{"minimum":1,"type":["integer","null"]},"source_type":{"type":["string","null"]},"tax_code_id":{"minimum":1,"type":["integer","null"]},"unit":{"type":["string","null"]},"vendor_id":{"minimum":1,"type":["integer","null"]}},"required":["id","line_no","account_id","account_number","account_name","debit","credit","memo","entity_id","counterparty_entity_id","project_id","cost_code_id","cost_type_id","vendor_id","customer_id","employee_id","equipment_id","department_id","dimension_value_ids","commitment_id","contract_id","tax_code_id","quantity","unit","billable","reconcile_state","source_type","source_id"],"type":"object"},"accounting_Lease":{"properties":{"asset_class":{"type":"string"},"classification":{"enum":["operating","finance"],"type":"string"},"commencement_date":{"format":"date","type":"string"},"commencement_entry_id":{"type":["integer","null"]},"cost_account_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"current_liability_account_id":{"type":["integer","null"]},"discount_rate":{"pattern":"^-?\\d+\\.\\d{6}$","type":"string"},"entity_id":{"type":"integer"},"escalation_pct":{"pattern":"^-?\\d+\\.\\d{6}$","type":"string"},"id":{"type":"integer"},"incentives":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"initial_direct_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"initial_liability":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"initial_rou":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"interest_account_id":{"type":["integer","null"]},"lessor":{"type":["string","null"]},"liability_account_id":{"type":["integer","null"]},"name":{"type":"string"},"number":{"type":"string"},"origin_lease_id":{"type":["integer","null"]},"payment":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"payment_account_id":{"type":"integer"},"payment_timing":{"enum":["advance","arrears"],"type":"string"},"purchase_option_price":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rate_convention":{"enum":["nominal","effective"],"type":"string"},"rate_source":{"enum":["implicit","incremental_borrowing","risk_free"],"type":"string"},"rou_account_id":{"type":["integer","null"]},"short_term":{"type":"boolean"},"status":{"description":"A voided lease is skipped by runs, the daily job and the disclosures.","enum":["active","voided"],"type":"string"},"term_months":{"type":"integer"},"total_payments":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"updated_at":{"format":"date-time","type":"string"},"void_entry_id":{"description":"Entry reversing the lease run lines; the commencement is reversed by its own reversal entry.","type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_on":{"format":"date","type":["string","null"]}},"required":["id","number","name","lessor","asset_class","entity_id","classification","short_term","commencement_date","term_months","payment","escalation_pct","payment_timing","discount_rate","rate_source","initial_direct_costs","incentives","purchase_option_price","rou_account_id","liability_account_id","current_liability_account_id","cost_account_id","interest_account_id","payment_account_id","commencement_entry_id","status","voided_on","void_reason","void_entry_id","initial_liability","initial_rou","total_payments","created_at","updated_at","rate_convention","origin_lease_id"],"type":"object"},"accounting_LeaseClassTotals":{"properties":{"current_liabilities":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"maturity":{"properties":{"imputed_interest":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"present_value":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"thereafter":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total_undiscounted":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"years":{"items":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"maxItems":5,"minItems":5,"type":"array"}},"required":["years","thereafter","total_undiscounted","imputed_interest","present_value"],"type":"object"},"noncurrent_liabilities":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rou_assets":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total_liabilities":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"weighted_average_discount_rate_pct":{"type":["string","null"]},"weighted_average_remaining_term_years":{"type":["string","null"]}},"required":["rou_assets","current_liabilities","noncurrent_liabilities","total_liabilities","weighted_average_remaining_term_years","weighted_average_discount_rate_pct","maturity"],"type":"object"},"accounting_LeaseDisclosures":{"properties":{"cash_paid":{"properties":{"financing_cash_finance_leases":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"operating_cash_finance_leases":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"operating_cash_operating_leases":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["operating_cash_operating_leases","operating_cash_finance_leases","financing_cash_finance_leases"],"type":"object"},"finance":{"$ref":"#/components/schemas/accounting_LeaseClassTotals"},"from":{"format":"date","type":"string"},"lease_cost":{"properties":{"finance_amortization":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"finance_interest":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"operating":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"short_term":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["operating","short_term","finance_amortization","finance_interest"],"type":"object"},"lease_count":{"type":"integer"},"operating":{"$ref":"#/components/schemas/accounting_LeaseClassTotals"},"remeasurements":{"properties":{"finance":{"properties":{"count":{"type":"integer"},"gain_loss":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"liability_decrease":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"liability_increase":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rou_adjustment":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["count","liability_increase","liability_decrease","rou_adjustment","gain_loss"],"type":"object"},"operating":{"properties":{"count":{"type":"integer"},"gain_loss":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"liability_decrease":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"liability_increase":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rou_adjustment":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["count","liability_increase","liability_decrease","rou_adjustment","gain_loss"],"type":"object"}},"required":["operating","finance"],"type":"object"},"rou_obtained_for_new_liabilities":{"properties":{"finance":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"operating":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["operating","finance"],"type":"object"},"to":{"format":"date","type":"string"}},"required":["from","to","lease_count","lease_cost","cash_paid","rou_obtained_for_new_liabilities","operating","finance","remeasurements"],"type":"object"},"accounting_LeaseModification":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"discount_rate":{"pattern":"^-?\\d+\\.\\d{6}$","type":["string","null"]},"effective_date":{"format":"date","type":"string"},"entry_id":{"type":["integer","null"]},"escalation_pct":{"pattern":"^-?\\d+\\.\\d{6}$","type":["string","null"]},"gain_loss":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"gain_loss_account_id":{"type":["integer","null"]},"id":{"type":"integer"},"kind":{"enum":["term_change","payment_change","partial_termination","separate_contract"],"type":"string"},"lease_id":{"type":"integer"},"liability_after":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"liability_before":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"payment":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"rate_convention":{"enum":["nominal","effective",null],"type":["string","null"]},"reason":{"type":"string"},"rou_after":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rou_before":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"schedule_version":{"type":["integer","null"]},"separate_lease_id":{"type":["integer","null"]},"sequence":{"type":"integer"},"term_months":{"type":["integer","null"]},"terminated_fraction":{"pattern":"^-?\\d+\\.\\d{6}$","type":["string","null"]}},"required":["id","lease_id","sequence","kind","effective_date","schedule_version","term_months","payment","escalation_pct","discount_rate","rate_convention","terminated_fraction","liability_before","liability_after","rou_before","rou_after","gain_loss","gain_loss_account_id","separate_lease_id","entry_id","reason","created_by_id","created_at"],"type":"object"},"accounting_LeaseModificationResult":{"properties":{"asset_class":{"type":"string"},"classification":{"enum":["operating","finance"],"type":"string"},"commencement_date":{"format":"date","type":"string"},"commencement_entry_id":{"type":["integer","null"]},"cost_account_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"current_liability_account_id":{"type":["integer","null"]},"discount_rate":{"pattern":"^-?\\d+\\.\\d{6}$","type":"string"},"entity_id":{"type":"integer"},"escalation_pct":{"pattern":"^-?\\d+\\.\\d{6}$","type":"string"},"history":{"items":{"properties":{"account_id":{"type":"integer"},"account_number":{"type":"string"},"credit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"debit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"entry_id":{"type":"integer"},"entry_number":{"type":["string","null"]},"entry_status":{"type":"string"},"memo":{"type":["string","null"]},"posting_date":{"format":"date","type":"string"},"source_type":{"type":"string"}},"required":["entry_id","entry_number","posting_date","source_type","entry_status","account_id","account_number","debit","credit","memo"],"type":"object"},"type":"array"},"id":{"type":"integer"},"incentives":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"initial_direct_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"initial_liability":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"initial_rou":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"interest_account_id":{"type":["integer","null"]},"latest_schedule_version":{"type":"integer"},"lessor":{"type":["string","null"]},"liability_account_id":{"type":["integer","null"]},"modification":{"$ref":"#/components/schemas/accounting_LeaseModification"},"modifications":{"items":{"$ref":"#/components/schemas/accounting_LeaseModification"},"type":"array"},"name":{"type":"string"},"number":{"type":"string"},"origin_lease_id":{"type":["integer","null"]},"payment":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"payment_account_id":{"type":"integer"},"payment_timing":{"enum":["advance","arrears"],"type":"string"},"purchase_option_price":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rate_convention":{"enum":["nominal","effective"],"type":"string"},"rate_source":{"enum":["implicit","incremental_borrowing","risk_free"],"type":"string"},"rou_account_id":{"type":["integer","null"]},"schedule":{"items":{"properties":{"closing_liability":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"current_portion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"interest":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"lease_cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"month":{"type":"integer"},"opening_liability":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"payment":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"period":{"pattern":"^\\d{4}-\\d{2}$","type":"string"},"principal":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rou_amortization":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rou_closing":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["month","period","payment","opening_liability","interest","principal","closing_liability","current_portion","lease_cost","rou_amortization","rou_closing"],"type":"object"},"type":"array"},"schedule_version":{"type":"integer"},"separate_lease_id":{"type":["integer","null"]},"short_term":{"type":"boolean"},"status":{"description":"A voided lease is skipped by runs, the daily job and the disclosures.","enum":["active","voided"],"type":"string"},"term_months":{"type":"integer"},"total_payments":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"updated_at":{"format":"date-time","type":"string"},"void_entry_id":{"description":"Entry reversing the lease run lines; the commencement is reversed by its own reversal entry.","type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_on":{"format":"date","type":["string","null"]}},"required":["id","number","name","lessor","asset_class","entity_id","classification","short_term","commencement_date","term_months","payment","escalation_pct","payment_timing","discount_rate","rate_source","initial_direct_costs","incentives","purchase_option_price","rou_account_id","liability_account_id","current_liability_account_id","cost_account_id","interest_account_id","payment_account_id","commencement_entry_id","status","voided_on","void_reason","void_entry_id","initial_liability","initial_rou","total_payments","created_at","updated_at","schedule","history","rate_convention","origin_lease_id","schedule_version","latest_schedule_version","modifications","modification","separate_lease_id"],"type":"object"},"accounting_LeaseRemeasurement":{"properties":{"annual_rate":{"pattern":"^-?\\d+\\.\\d{6}$","type":"string"},"effective_period":{"type":"string"},"gain_loss":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"kind":{"type":"string"},"liability_after":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"liability_before":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"monthly_rate":{"type":"string"},"rou_after":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rou_before":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"schedule_version":{"type":"integer"},"terminated_liability":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"terminated_rou":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["schedule_version","kind","effective_period","liability_before","rou_before","terminated_liability","terminated_rou","liability_after","rou_after","gain_loss","annual_rate","monthly_rate"],"type":"object"},"accounting_LeaseRun":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"entry_id":{"type":["integer","null"]},"entry_number":{"type":["string","null"]},"entry_status":{"type":["string","null"]},"id":{"type":"integer"},"lease_count":{"type":"integer"},"period_id":{"type":"integer"},"period_name":{"type":["string","null"]},"posting_date":{"format":"date","type":"string"},"total_cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","period_id","period_name","posting_date","total_cost","lease_count","entry_id","entry_number","entry_status","created_by_id","created_at"],"type":"object"},"accounting_LeaseRunPreview":{"properties":{"items":{"items":{"properties":{"cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"lease_id":{"type":"integer"},"name":{"type":"string"},"number":{"type":"string"}},"required":["lease_id","number","name","cost"],"type":"object"},"type":"array"},"lines":{"items":{"$ref":"#/components/schemas/accounting_PreviewLine"},"type":"array"},"period_id":{"type":"integer"},"period_name":{"type":"string"},"total_cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["period_id","period_name","total_cost","items","lines"],"type":"object"},"accounting_LeaseRunShow":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"entry_id":{"type":["integer","null"]},"entry_number":{"type":["string","null"]},"entry_status":{"type":["string","null"]},"id":{"type":"integer"},"lease_count":{"type":"integer"},"lines":{"items":{"properties":{"account_id":{"type":"integer"},"account_name":{"type":"string"},"account_number":{"type":"string"},"credit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"debit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"lease_id":{"type":["integer","null"]},"line_no":{"type":"integer"},"memo":{"type":["string","null"]}},"required":["line_no","account_id","account_number","account_name","lease_id","debit","credit","memo"],"type":"object"},"type":"array"},"period_id":{"type":"integer"},"period_name":{"type":["string","null"]},"posting_date":{"format":"date","type":"string"},"total_cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","period_id","period_name","posting_date","total_cost","lease_count","entry_id","entry_number","entry_status","created_by_id","created_at","lines"],"type":"object"},"accounting_LeaseShow":{"properties":{"asset_class":{"type":"string"},"classification":{"enum":["operating","finance"],"type":"string"},"commencement_date":{"format":"date","type":"string"},"commencement_entry_id":{"type":["integer","null"]},"cost_account_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"current_liability_account_id":{"type":["integer","null"]},"discount_rate":{"pattern":"^-?\\d+\\.\\d{6}$","type":"string"},"entity_id":{"type":"integer"},"escalation_pct":{"pattern":"^-?\\d+\\.\\d{6}$","type":"string"},"history":{"items":{"properties":{"account_id":{"type":"integer"},"account_number":{"type":"string"},"credit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"debit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"entry_id":{"type":"integer"},"entry_number":{"type":["string","null"]},"entry_status":{"type":"string"},"memo":{"type":["string","null"]},"posting_date":{"format":"date","type":"string"},"source_type":{"type":"string"}},"required":["entry_id","entry_number","posting_date","source_type","entry_status","account_id","account_number","debit","credit","memo"],"type":"object"},"type":"array"},"id":{"type":"integer"},"incentives":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"initial_direct_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"initial_liability":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"initial_rou":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"interest_account_id":{"type":["integer","null"]},"latest_schedule_version":{"type":"integer"},"lessor":{"type":["string","null"]},"liability_account_id":{"type":["integer","null"]},"modifications":{"items":{"$ref":"#/components/schemas/accounting_LeaseModification"},"type":"array"},"name":{"type":"string"},"number":{"type":"string"},"origin_lease_id":{"type":["integer","null"]},"payment":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"payment_account_id":{"type":"integer"},"payment_timing":{"enum":["advance","arrears"],"type":"string"},"purchase_option_price":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rate_convention":{"enum":["nominal","effective"],"type":"string"},"rate_source":{"enum":["implicit","incremental_borrowing","risk_free"],"type":"string"},"rou_account_id":{"type":["integer","null"]},"schedule":{"items":{"properties":{"closing_liability":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"current_portion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"interest":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"lease_cost":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"month":{"type":"integer"},"opening_liability":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"payment":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"period":{"pattern":"^\\d{4}-\\d{2}$","type":"string"},"principal":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rou_amortization":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rou_closing":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["month","period","payment","opening_liability","interest","principal","closing_liability","current_portion","lease_cost","rou_amortization","rou_closing"],"type":"object"},"type":"array"},"schedule_version":{"type":"integer"},"short_term":{"type":"boolean"},"status":{"description":"A voided lease is skipped by runs, the daily job and the disclosures.","enum":["active","voided"],"type":"string"},"term_months":{"type":"integer"},"total_payments":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"updated_at":{"format":"date-time","type":"string"},"void_entry_id":{"description":"Entry reversing the lease run lines; the commencement is reversed by its own reversal entry.","type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_on":{"format":"date","type":["string","null"]}},"required":["id","number","name","lessor","asset_class","entity_id","classification","short_term","commencement_date","term_months","payment","escalation_pct","payment_timing","discount_rate","rate_source","initial_direct_costs","incentives","purchase_option_price","rou_account_id","liability_account_id","current_liability_account_id","cost_account_id","interest_account_id","payment_account_id","commencement_entry_id","status","voided_on","void_reason","void_entry_id","initial_liability","initial_rou","total_payments","created_at","updated_at","schedule","history","rate_convention","origin_lease_id","schedule_version","latest_schedule_version","modifications"],"type":"object"},"accounting_MarginHistory":{"properties":{"events":{"items":{"$ref":"#/components/schemas/accounting_FadeChange"},"type":"array"},"explain":{"items":{"properties":{"formula":{"type":"string"},"label":{"type":"string"}},"required":["label","formula"],"type":"object"},"type":"array"},"faded":{"type":"boolean"},"flags":{"items":{"enum":["fade_vs_prior","fade_vs_baseline"]},"type":"array"},"history":{"items":{"properties":{"captured_by_id":{"minimum":1,"type":"integer"},"contract_value":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"eac":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"margin_pct":{"pattern":"^-?\\d+\\.\\d{4}$","type":"string"},"period_end":{"format":"date","type":"string"},"projected_margin":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"source":{"enum":["wip","forecast","import"]},"source_id":{"minimum":1,"type":["integer","null"]}},"required":["period_end","contract_value","eac","projected_margin","margin_pct","source","source_id","captured_by_id"],"type":"object"},"type":"array"},"project":{"properties":{"id":{"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"thresholds":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pct":{"pattern":"^-?\\d+\\.\\d{4}$","type":"string"}},"required":["pct","amount"],"type":"object"},"vs_baseline":{"oneOf":[{"$ref":"#/components/schemas/accounting_FadeChange"},{"type":"null"}]},"vs_prior":{"oneOf":[{"$ref":"#/components/schemas/accounting_FadeChange"},{"type":"null"}]}},"required":["project","thresholds","history","vs_prior","vs_baseline","flags","faded","events","explain"],"type":"object"},"accounting_MarginPoint":{"properties":{"contract_value":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"eac":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"margin_pct":{"pattern":"^-?\\d+\\.\\d{4}$","type":"string"},"period_end":{"format":"date","type":"string"},"projected_margin":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["period_end","contract_value","eac","projected_margin","margin_pct"],"type":"object"},"accounting_MarginPortfolio":{"properties":{"jobs":{"items":{"properties":{"events":{"type":"integer"},"faded":{"type":"boolean"},"flags":{"items":{"enum":["fade_vs_prior","fade_vs_baseline"]},"type":"array"},"latest":{"oneOf":[{"$ref":"#/components/schemas/accounting_MarginPoint"},{"type":"null"}]},"name":{"type":"string"},"project_id":{"minimum":1,"type":"integer"},"snapshots":{"type":"integer"},"vs_baseline":{"oneOf":[{"$ref":"#/components/schemas/accounting_FadeChange"},{"type":"null"}]},"vs_prior":{"oneOf":[{"$ref":"#/components/schemas/accounting_FadeChange"},{"type":"null"}]}},"required":["project_id","name","snapshots","latest","vs_prior","vs_baseline","flags","faded","events"],"type":"object"},"type":"array"},"summary":{"properties":{"faded":{"type":"integer"},"jobs":{"type":"integer"}},"required":["jobs","faded"],"type":"object"},"thresholds":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pct":{"pattern":"^-?\\d+\\.\\d{4}$","type":"string"}},"required":["pct","amount"],"type":"object"}},"required":["thresholds","summary","jobs"],"type":"object"},"accounting_Member":{"properties":{"certified_at":{"description":"Last access-review certification.","format":"date-time","type":["string","null"]},"certified_by_id":{"minimum":1,"type":["integer","null"]},"effective_role":{"enum":["owner","controller","accountant","ap_clerk","ar_clerk","payroll_admin","project_manager_view","auditor_readonly","none"]},"email":{"type":"string"},"entity_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"expires_at":{"description":"End of access; at or after it the grant resolves to no access.","format":"date-time","type":["string","null"]},"flags":{"properties":{"ap_approve":{"type":"boolean"},"ap_enter":{"type":"boolean"},"approve_journal":{"type":"boolean"},"ar_approve":{"type":"boolean"},"ar_enter":{"type":"boolean"},"bank_reconcile":{"type":"boolean"},"close_period":{"type":"boolean"},"job_forecast_edit":{"type":"boolean"},"manage_coa":{"type":"boolean"},"manage_grants":{"type":"boolean"},"manage_integrations":{"type":"boolean"},"manage_vendor_banking":{"type":"boolean"},"payroll_run":{"type":"boolean"},"payroll_view":{"type":"boolean"},"post_journal":{"type":"boolean"},"release_payments":{"type":"boolean"},"view_ledger":{"type":"boolean"},"view_payroll_pii":{"type":"boolean"}},"required":["view_ledger","post_journal","approve_journal","manage_coa","close_period","ap_enter","ap_approve","release_payments","manage_vendor_banking","ar_enter","ar_approve","payroll_view","payroll_run","view_payroll_pii","bank_reconcile","manage_integrations","manage_grants","job_forecast_edit"],"type":"object"},"is_active":{"type":"boolean"},"is_admin":{"type":"boolean"},"name":{"type":"string"},"role":{"enum":["owner","controller","accountant","ap_clerk","ar_clerk","payroll_admin","project_manager_view","auditor_readonly","none"]},"sod_conflicts":{"description":"Segregation of duties rules this grant's flags combine.","items":{"enum":["ap_full_cycle","payroll_full_cycle","gl_full_cycle","grants_with_payments"]},"type":"array"},"updated_at":{"format":"date-time","type":["string","null"]},"user_id":{"minimum":1,"type":"integer"}},"required":["user_id","name","email","is_active","is_admin","role","effective_role","flags","entity_ids","updated_at","expires_at","certified_at","certified_by_id","sod_conflicts"],"type":"object"},"accounting_Money":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"accounting_Offboarding":{"additionalProperties":false,"properties":{"acknowledge_irreversible":{"const":true},"confirm":{"type":"string"},"export_id":{"format":"uuid","type":"string"}},"required":["export_id","confirm","acknowledge_irreversible"],"type":"object"},"accounting_Outstanding":{"properties":{"as_of":{"format":"date","type":"string"},"bank_account_id":{"type":"integer"},"deposits_in_transit":{"items":{"$ref":"#/components/schemas/accounting_OutstandingItem"},"type":"array"},"outstanding_payments":{"items":{"$ref":"#/components/schemas/accounting_OutstandingItem"},"type":"array"},"total":{"description":"Outstanding lines across both lists (all pages)","type":"integer"},"totals":{"properties":{"book_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"deposits_in_transit":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"difference":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"outstanding_net":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"outstanding_payments":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"reconciled_and_void":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["deposits_in_transit","outstanding_payments","reconciled_and_void","outstanding_net","book_balance","difference"],"type":"object"}},"required":["bank_account_id","as_of","deposits_in_transit","outstanding_payments","totals","total"],"type":"object"},"accounting_OutstandingItem":{"properties":{"amount":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ap_payment_id":{"description":"AP payment behind the line (sourced from an AP payment run); check_number and description come from it","type":["integer","null"]},"bank_transaction_id":{"type":["integer","null"]},"check_number":{"type":["string","null"]},"date":{"format":"date","type":"string"},"description":{"type":["string","null"]},"entry_number":{"type":["string","null"]},"journal_line_id":{"type":"integer"},"link":{"description":"App path to the source document (bank transaction or AP payment run)","type":["string","null"]},"reconcile_state":{"enum":["n","c"],"type":"string"}},"required":["journal_line_id","entry_number","date","amount","description","bank_transaction_id","check_number","reconcile_state","ap_payment_id","link"],"type":"object"},"accounting_OverdueApproval":{"properties":{"amount":{"type":["string","null"]},"business_days_waiting":{"type":"integer"},"doc_id":{"type":"integer"},"doc_revision":{"type":"integer"},"doc_type":{"$ref":"#/components/schemas/accounting_EscalationDocType"},"entity_ids":{"items":{"type":"integer"},"type":"array"},"escalation_level":{"type":"integer"},"label":{"type":"string"},"last_notified_at":{"format":"date-time","type":["string","null"]},"path":{"type":"string"},"reminders_sent":{"type":"integer"},"threshold_days":{"type":"integer"},"waiting_on":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":["string","null"]}},"required":["id","name"],"type":"object"},"type":"array"},"waiting_since":{"format":"date-time","type":"string"}},"required":["doc_type","doc_id","doc_revision","label","amount","path","entity_ids","waiting_since","business_days_waiting","threshold_days","escalation_level","reminders_sent","last_notified_at","waiting_on"],"type":"object"},"accounting_Ownership":{"properties":{"child_entity_id":{"minimum":1,"type":"integer"},"control_basis":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"earnings_account_id":{"minimum":1,"type":["integer","null"]},"effective_from":{"format":"date","type":"string"},"id":{"minimum":1,"type":"integer"},"investment_account_id":{"minimum":1,"type":["integer","null"]},"method":{"enum":["full","equity","cost","none"],"type":"string"},"nci_pct":{"type":["string","null"]},"note":{"type":["string","null"]},"ownership_pct":{"type":"string"},"parent_entity_id":{"minimum":1,"type":"integer"},"void_reason":{"type":["string","null"]},"voided":{"type":"boolean"},"voided_at":{"format":"date-time","type":["string","null"]},"voided_by_id":{"minimum":1,"type":["integer","null"]},"voting_pct":{"type":"string"}},"required":["id","parent_entity_id","child_entity_id","ownership_pct","voting_pct","method","effective_from","voided"],"type":"object"},"accounting_ParallelRunReport":{"properties":{"checks":{"items":{"properties":{"detail":{"type":["string","null"]},"difference":{"type":"string"},"label":{"type":"string"},"ok":{"type":"boolean"}},"required":["label","ok","difference"],"type":"object"},"type":"array"},"columns":{"type":"array"},"explain":{"type":"array"},"generatedAt":{"type":"string"},"key":{"const":"parallel_run"},"notes":{"items":{"type":"string"},"type":"array"},"params":{"type":"object"},"rows":{"type":"array"},"subtitle":{"type":"string"},"title":{"type":"string"}},"required":["key","title","subtitle","params","columns","rows","checks","notes","explain","generatedAt"],"type":"object"},"accounting_PartyProfile":{"properties":{"bank_account_masked":{"pattern":"^\\*{4}\\d{1,4}$","type":["string","null"]},"bank_account_ownership":{"description":"Who owns the receiving bank account: consumer (personal) accounts get PPD entries, business accounts CCD.","enum":["business","consumer",null],"type":["string","null"]},"bank_account_type":{"type":["string","null"]},"billing_address":{"maxLength":500,"type":["string","null"]},"billing_contact_name":{"maxLength":200,"type":["string","null"]},"billing_email":{"format":"email","maxLength":320,"type":["string","null"]},"compliance_hold":{"type":"boolean"},"compliance_hold_reason":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"credit_limit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"default_expense_account_id":{"minimum":1,"type":["integer","null"]},"form_1099_box":{"type":["string","null"]},"form_1099_type":{"type":["string","null"]},"has_bank_routing":{"type":"boolean"},"id":{"minimum":1,"type":"integer"},"is_1099":{"type":"boolean"},"is_customer":{"type":"boolean"},"is_vendor":{"type":"boolean"},"payment_method":{"enum":["check","ach","wire","card"]},"pending_sensitive_change":{"properties":{"change_hash":{"description":"SHA-256 of the pending change; echo it when deciding.","pattern":"^[0-9a-f]{64}$","type":"string"},"changes":{"description":"What the approver reviews: exact before/after remit-to, payment method and types; TIN and bank numbers masked to last 4.","items":{"properties":{"field":{"type":"string"},"from":{"type":["string","null"]},"to":{"type":["string","null"]}},"required":["field","from","to"],"type":"object"},"type":"array"},"fields":{"items":{"type":"string"},"type":"array"},"reason":{"description":"Reason entered by the proposer.","type":["string","null"]},"requested_by_id":{"minimum":1,"type":"integer"}},"required":["requested_by_id","fields","changes","change_hash"],"type":["object","null"]},"remit_to_address":{"type":["string","null"]},"remit_to_city":{"type":["string","null"]},"remit_to_name":{"type":["string","null"]},"remit_to_state":{"type":["string","null"]},"remit_to_zip":{"type":["string","null"]},"retainage_percent":{"description":"Decimal rate or quantity as a string, 6 dp","pattern":"^-?\\d+\\.\\d{6}$","type":["string","null"]},"revealed":{"properties":{"bank_account_number":{"type":["string","null"]},"bank_routing_number":{"type":["string","null"]},"tax_id":{"type":["string","null"]}},"required":["tax_id","bank_account_number","bank_routing_number"],"type":"object"},"tax_classification":{"description":"W-9 federal tax classification; corporations and exempt payees get no 1099-NEC/MISC. Null is treated as reportable.","enum":["individual","sole_proprietor","partnership","llc_disregarded","llc_partnership","llc_c_corp","llc_s_corp","c_corp","s_corp","tax_exempt","government",null],"type":["string","null"]},"tax_id_masked":{"pattern":"^\\*\\*\\*-\\*\\*-\\d{4}$","type":["string","null"]},"tax_id_type":{"type":["string","null"]},"term_id":{"minimum":1,"type":["integer","null"]},"tin_match_code":{"description":"Latest IRS TIN Matching result indicator; 1-3 hold payments (tin_mismatch). Cleared when the TIN changes.","maximum":8,"minimum":0,"type":["integer","null"]},"tin_matched_at":{"format":"date","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"vendor_id":{"minimum":1,"type":"integer"},"vendor_name":{"type":["string","null"]},"w9_received_at":{"format":"date","type":["string","null"]},"w9_status":{"enum":["not_requested","requested","received","expired"]}},"required":["id","vendor_id","vendor_name","is_vendor","is_customer","tax_id_masked","tax_id_type","is_1099","form_1099_type","form_1099_box","tax_classification","w9_status","w9_received_at","term_id","remit_to_name","remit_to_address","remit_to_city","remit_to_state","remit_to_zip","default_expense_account_id","payment_method","bank_account_masked","bank_account_type","has_bank_routing","retainage_percent","compliance_hold","compliance_hold_reason","credit_limit","billing_contact_name","billing_email","billing_address","pending_sensitive_change","created_at","updated_at","tin_match_code","tin_matched_at"],"type":"object"},"accounting_PayGroup":{"properties":{"code":{"type":"string"},"dimension_value_ids":{"description":"User-defined dimension values (AcctDimensionValue ids).","items":{"type":"integer"},"type":["array","null"]},"employee_count":{"type":["integer","null"]},"entity_id":{"description":"Posting entity for the group's runs (default entity when null)","type":["integer","null"]},"frequency":{"enum":["weekly","biweekly","semimonthly","monthly"],"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"ot_method":{"description":"rate_in_effect needs a §7(g)(2) agreement (29 CFR 778.419)","enum":["weighted_average","rate_in_effect"],"type":"string"},"ot_rule_set":{"type":"string"},"workweek_anchor":{"description":"Any first day of the fixed FLSA workweek (29 CFR 778.105); required for semimonthly/monthly groups with hourly staff","format":"date","type":["string","null"]}},"required":["id","code","name","frequency","ot_rule_set","is_active","employee_count","ot_method","workweek_anchor","entity_id","dimension_value_ids"],"type":"object"},"accounting_PayRun":{"properties":{"approved_at":{"type":["string","null"]},"approved_by_id":{"type":["integer","null"]},"check_count":{"type":["integer","null"]},"deductions_total":{"description":"Decimal string","type":"string"},"employee_taxes":{"description":"Decimal string","type":"string"},"employer_cost":{"description":"Decimal string","type":"string"},"exceptions":{"items":{"$ref":"#/components/schemas/accounting_RunException"},"type":"array"},"gross_total":{"description":"Decimal string","type":"string"},"id":{"type":"integer"},"journal_entry_id":{"type":["integer","null"]},"last_ach_file_id_modifier":{"description":"Latest generated payroll ACH modifier, or null before generation. Returned on run detail; supply as previous_file_id_modifier when preparing a resend. Read this field again after an uncertain response.","type":["string","null"]},"net_total":{"description":"Decimal string","type":"string"},"number":{"type":"string"},"pay_date":{"type":"string"},"pay_group_code":{"type":["string","null"]},"pay_group_id":{"type":"integer"},"period_end":{"type":"string"},"period_start":{"type":"string"},"posted_at":{"type":["string","null"]},"prepared_by_id":{"type":"integer"},"revision":{"type":"integer"},"run_type":{"description":"Only regular runs are refused on an overlapping period","enum":["regular","off_cycle","correction","final"],"type":"string"},"status":{"enum":["draft","calculated","approved","posted","voided"],"type":"string"},"void_reason":{"type":["string","null"]}},"required":["id","number","pay_group_id","pay_group_code","period_start","period_end","pay_date","status","revision","gross_total","employee_taxes","deductions_total","net_total","employer_cost","check_count","exceptions","prepared_by_id","approved_by_id","approved_at","posted_at","journal_entry_id","void_reason","run_type"],"type":"object"},"accounting_PayRunShow":{"properties":{"approved_at":{"type":["string","null"]},"approved_by_id":{"type":["integer","null"]},"check_count":{"type":["integer","null"]},"checks":{"items":{"$ref":"#/components/schemas/accounting_Check"},"type":"array"},"deductions_total":{"description":"Decimal string","type":"string"},"employee_taxes":{"description":"Decimal string","type":"string"},"employer_cost":{"description":"Decimal string","type":"string"},"exceptions":{"items":{"$ref":"#/components/schemas/accounting_RunException"},"type":"array"},"gross_total":{"description":"Decimal string","type":"string"},"id":{"type":"integer"},"journal_entry_id":{"type":["integer","null"]},"last_ach_file_id_modifier":{"description":"Latest generated payroll ACH modifier, or null before generation. Returned on run detail; supply as previous_file_id_modifier when preparing a resend. Read this field again after an uncertain response.","type":["string","null"]},"net_total":{"description":"Decimal string","type":"string"},"number":{"type":"string"},"pay_date":{"type":"string"},"pay_group_code":{"type":["string","null"]},"pay_group_id":{"type":"integer"},"period_end":{"type":"string"},"period_start":{"type":"string"},"posted_at":{"type":["string","null"]},"prepared_by_id":{"type":"integer"},"revision":{"type":"integer"},"run_type":{"description":"Only regular runs are refused on an overlapping period","enum":["regular","off_cycle","correction","final"],"type":"string"},"status":{"enum":["draft","calculated","approved","posted","voided"],"type":"string"},"time":{"items":{"$ref":"#/components/schemas/accounting_TimeLine"},"type":"array"},"void_reason":{"type":["string","null"]}},"required":["id","number","pay_group_id","pay_group_code","period_start","period_end","pay_date","status","revision","gross_total","employee_taxes","deductions_total","net_total","employer_cost","check_count","exceptions","prepared_by_id","approved_by_id","approved_at","posted_at","journal_entry_id","void_reason","run_type","checks","time"],"type":"object"},"accounting_PayrollCode":{"properties":{"calc_method":{"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"include_in_regular_rate":{"description":"Earnings: a nondiscretionary bonus counted in the FLSA regular rate (raises the overtime of the weeks the run covers, 29 CFR 778.208-.210).","type":"boolean"},"is_active":{"type":"boolean"},"kind":{"enum":["earning","deduction","benefit","employer_tax"],"type":"string"},"name":{"type":"string"},"rate":{"type":["string","null"]},"tax_treatment":{"description":"Earnings: regular | supplemental (flat-rate FIT) | nontaxable (paid, not wages). Deductions: the deduction type.","type":["string","null"]}},"required":["id","kind","code","name","tax_treatment","calc_method","rate","is_active","include_in_regular_rate"],"type":"object"},"accounting_PayrollEmployer":{"properties":{"ach_account_masked":{"type":["string","null"]},"ach_bank_name":{"type":["string","null"]},"ach_odfi_routing":{"type":["string","null"]},"entity_id":{"type":"integer"},"state_account_ids":{"additionalProperties":{"properties":{"ui":{"type":"string"},"withholding":{"type":"string"}},"type":"object"},"type":"object"}},"required":["entity_id","state_account_ids","ach_odfi_routing","ach_bank_name","ach_account_masked"],"type":"object"},"accounting_PayrollNachaResend":{"properties":{"resend":{"properties":{"previous_file_id_modifier":{"description":"Last file reviewed by the caller, from last_ach_file_id_modifier on run detail.","pattern":"^[A-Z0-9]$","type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason","previous_file_id_modifier"],"type":"object"}},"required":["resend"],"type":"object"},"accounting_PayrollRemittance":{"properties":{"account_id":{"type":"integer"},"account_key":{"description":"Engine liability key (2110 FIT, 2111 FICA, 2112 SIT, 2113 FUTA, 2114 SUTA …)","type":"string"},"amount":{"description":"Decimal string","type":"string"},"ap_bill_id":{"type":["integer","null"]},"approved_at":{"type":["string","null"]},"approved_by_id":{"type":["integer","null"]},"bank_account_id":{"type":["integer","null"]},"created_at":{"type":"string"},"created_by_id":{"type":"integer"},"entity_id":{"type":"integer"},"id":{"type":"integer"},"journal_entry_id":{"type":["integer","null"]},"memo":{"type":["string","null"]},"method":{"enum":["bank","ap_bill"],"type":"string"},"paid_date":{"type":"string"},"request_key":{"type":"string"},"status":{"description":"pending_approval: a bank payment at or above the journal approval threshold waiting for a second releaser (no journal yet)","enum":["posted","pending_approval","rejected"],"type":"string"},"through_date":{"type":"string"}},"required":["id","request_key","account_key","account_id","entity_id","method","amount","through_date","paid_date","journal_entry_id","ap_bill_id","status"],"type":"object"},"accounting_Period":{"properties":{"closed_at":{"format":"date-time","type":["string","null"]},"closed_by_id":{"minimum":1,"type":["integer","null"]},"end_date":{"format":"date","type":"string"},"entities":{"description":"Present when per-entity close is enabled: each entity's period status, limited to the caller's entities. `status` and `module_status` above are the company roll-up.","items":{"properties":{"closed_at":{"format":"date-time","type":["string","null"]},"closed_by_id":{"minimum":1,"type":["integer","null"]},"entity_id":{"minimum":1,"type":"integer"},"module_status":{"properties":{"ap":{"enum":["open","soft_closed","closed"]},"ar":{"enum":["open","soft_closed","closed"]},"cm":{"enum":["open","soft_closed","closed"]},"gl":{"enum":["open","soft_closed","closed"]},"jc":{"enum":["open","soft_closed","closed"]},"payroll":{"enum":["open","soft_closed","closed"]}},"required":["ap","ar","payroll","jc","cm","gl"],"type":"object"},"status":{"enum":["open","soft_closed","closed"]}},"required":["entity_id","status","module_status","closed_at","closed_by_id"],"type":"object"},"type":"array"},"fiscal_year":{"type":["integer","null"]},"fiscal_year_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"is_adjusting":{"description":"Period 13 (adjusting): one day on the fiscal year's last day, numbered 13. Takes only GJ/CL entries posted with adjusting: true, is exempt from later closed periods (no cascade reopen) and never returned for a date lookup.","type":"boolean"},"module_status":{"properties":{"ap":{"enum":["open","soft_closed","closed"]},"ar":{"enum":["open","soft_closed","closed"]},"cm":{"enum":["open","soft_closed","closed"]},"gl":{"enum":["open","soft_closed","closed"]},"jc":{"enum":["open","soft_closed","closed"]},"payroll":{"enum":["open","soft_closed","closed"]}},"required":["ap","ar","payroll","jc","cm","gl"],"type":"object"},"name":{"type":"string"},"number":{"minimum":1,"type":"integer"},"rollup":{"description":"Present with `entities`: active entities closed out of the active entities listed.","properties":{"closed_entities":{"minimum":0,"type":"integer"},"total_entities":{"minimum":0,"type":"integer"}},"required":["closed_entities","total_entities"],"type":"object"},"start_date":{"format":"date","type":"string"},"status":{"enum":["open","soft_closed","closed"]}},"required":["id","fiscal_year_id","fiscal_year","number","name","start_date","end_date","status","module_status","closed_at","closed_by_id","is_adjusting"],"type":"object"},"accounting_PmInput":{"properties":{"as_of":{"format":"date","type":"string"},"cost_code_id":{"minimum":1,"type":"integer"},"cost_to_complete":{"nullable":true,"pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$","type":"string"},"entity_id":{"minimum":1,"type":"integer"},"method":{"description":"Projection method for the cost code. Omitted or null: manual when cost_to_complete is set, else actual plus remaining commitments. percent_complete needs percent_complete in (0, 100]; unit_rate needs units_installed > 0 and total_units >= units_installed; manual_cost_to_complete needs cost_to_complete.","enum":["manual_cost_to_complete","percent_complete","unit_rate","budget","budget_remaining","actual_plus_committed",null],"nullable":true,"type":"string"},"percent_complete":{"description":"Physical percent complete (percent_complete method).","nullable":true,"pattern":"^(0|[1-9][0-9]{0,11})(\\.[0-9]{1,6})?$","type":"string"},"project_id":{"minimum":1,"type":"integer"},"reason":{"maxLength":1000,"minLength":3,"type":"string"},"revision":{"minimum":0,"type":"integer"},"total_units":{"description":"Total units at completion (unit_rate method).","nullable":true,"pattern":"^(0|[1-9][0-9]{0,11})(\\.[0-9]{1,6})?$","type":"string"},"units_installed":{"description":"Units installed to date (unit_rate method).","nullable":true,"pattern":"^(0|[1-9][0-9]{0,11})(\\.[0-9]{1,6})?$","type":"string"}},"required":["project_id","entity_id","as_of","cost_code_id","cost_to_complete","reason","revision"],"type":"object"},"accounting_PolicyAreaStatusList":{"properties":{"areas":{"items":{"properties":{"area":{"type":"string"},"counts":{"additionalProperties":{"type":"integer"},"type":"object"},"covers":{"type":"string"},"credential_types":{"items":{"$ref":"#/components/schemas/accounting_CredentialType"},"type":"array"},"jurisdictions":{"items":{"properties":{"expires_on":{"format":"date","type":["string","null"]},"jurisdiction":{"type":"string"},"reviewer_name":{"type":["string","null"]},"signoff_id":{"type":["integer","null"]},"status":{"$ref":"#/components/schemas/accounting_SignoffStatus"}},"required":["jurisdiction","status","signoff_id","expires_on","reviewer_name"],"type":"object"},"type":"array"},"max_validity_months":{"type":"integer"},"policy_version":{"type":"string"},"title":{"type":"string"}},"required":["area","title","covers","policy_version","credential_types","max_validity_months","counts","jurisdictions"],"type":"object"},"type":"array"},"as_of":{"format":"date","type":"string"}},"required":["as_of","areas"],"type":"object"},"accounting_PolicySignoff":{"properties":{"area":{"type":"string"},"attachments_url":{"type":"string"},"conclusion":{"enum":["approved","approved_with_exceptions"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"evidence_count":{"type":"integer"},"exceptions":{"type":["string","null"]},"expires_on":{"description":"First day the sign-off no longer counts","format":"date","type":"string"},"id":{"type":"integer"},"jurisdiction":{"type":"string"},"policy_version":{"type":"string"},"reviewer":{"properties":{"credential_issuer":{"type":"string"},"credential_number":{"type":"string"},"credential_type":{"$ref":"#/components/schemas/accounting_CredentialType"},"name":{"type":"string"},"registration_id":{"type":"integer"},"user_id":{"type":"integer"}},"required":["registration_id","user_id","name","credential_type","credential_number","credential_issuer"],"type":"object"},"revoke_reason":{"type":["string","null"]},"revoked_at":{"format":"date-time","type":["string","null"]},"revoked_by_id":{"type":["integer","null"]},"scope":{"type":"string"},"signed_on":{"format":"date","type":"string"},"status":{"$ref":"#/components/schemas/accounting_SignoffStatus"}},"required":["id","area","jurisdiction","policy_version","status","reviewer","scope","conclusion","exceptions","signed_on","expires_on","evidence_count","created_at","revoked_at","revoked_by_id","revoke_reason","attachments_url"],"type":"object"},"accounting_PolicySignoffInput":{"additionalProperties":false,"properties":{"area":{"description":"Policy area key","type":"string"},"conclusion":{"enum":["approved","approved_with_exceptions"],"type":"string"},"exceptions":{"description":"Required with approved_with_exceptions","maxLength":4000,"minLength":10,"type":["string","null"]},"expires_on":{"format":"date","type":"string"},"jurisdiction":{"description":"One of the area's jurisdictions, e.g. US, US-CA or US-GAAP","maxLength":10,"minLength":2,"type":"string"},"policy_version":{"description":"Must equal the area's version in force","type":"string"},"scope":{"description":"What was reviewed: sources, scenarios and implementation","maxLength":4000,"minLength":20,"type":"string"},"signed_on":{"format":"date","type":"string"}},"required":["area","jurisdiction","policy_version","scope","conclusion","signed_on","expires_on"],"type":"object"},"accounting_PositivePayBatch":{"properties":{"ap_run_id":{"type":["integer","null"]},"bank_account_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"issued_count":{"type":"integer"},"issued_total":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"source":{"enum":["banking","ap_run"],"type":"string"},"void_count":{"type":"integer"},"void_total":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["id","bank_account_id","source","ap_run_id","issued_count","void_count","issued_total","void_total","created_by_id","created_at"],"type":"object"},"accounting_PositivePayFile":{"properties":{"batch_id":{"description":"The batch this file sent (null for a dry run or an empty file); regenerate it via .../positive_pay/batches/{batch_id}/regenerate","type":["integer","null"]},"check_numbers":{"items":{"type":"string"},"type":"array"},"content":{"description":"CSV issue file (full account number); never stored","type":"string"},"dry_run":{"type":"boolean"},"file_name":{"type":"string"},"issued_count":{"type":"integer"},"issued_total":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"item_count":{"type":"integer"},"void_count":{"type":"integer"},"void_total":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["batch_id","file_name","content","dry_run","item_count","issued_count","void_count","issued_total","void_total","check_numbers"],"type":"object"},"accounting_PositivePayRegenerated":{"properties":{"batch_id":{"type":"integer"},"check_numbers":{"items":{"type":"string"},"type":"array"},"content":{"description":"The batch's CSV, rebuilt (full account number); never stored","type":"string"},"file_name":{"type":"string"},"item_count":{"type":"integer"}},"required":["batch_id","file_name","content","item_count","check_numbers"],"type":"object"},"accounting_PrepaidAllocation":{"properties":{"cost_code_id":{"type":["integer","null"]},"cost_type_id":{"type":["integer","null"]},"percent":{"type":"string"},"project_id":{"type":["integer","null"]}},"required":["project_id","cost_code_id","cost_type_id","percent"],"type":"object"},"accounting_PrepaidForecast":{"properties":{"cash_impact":{"const":"none"},"from":{"type":"string"},"periods":{"items":{"type":"string"},"type":"array"},"rows":{"items":{"properties":{"account_id":{"type":"integer"},"account_name":{"type":["string","null"]},"account_number":{"type":["string","null"]},"kind":{"enum":["prepaid","deferred_revenue"]},"months":{"items":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"type":"array"},"overdue":{"$ref":"#/components/schemas/accounting_PrepaidMoney"}},"required":["kind","account_id","account_number","account_name","overdue","months"],"type":"object"},"type":"array"},"totals":{"properties":{"deferred_revenue":{"items":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"type":"array"},"prepaid":{"items":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"type":"array"}},"required":["prepaid","deferred_revenue"],"type":"object"}},"required":["from","periods","rows","totals","cash_impact"],"type":"object"},"accounting_PrepaidLine":{"properties":{"account_id":{"type":"integer"},"cost_code_id":{"type":["integer","null"]},"cost_type_id":{"type":["integer","null"]},"credit":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"debit":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"memo":{"type":["string","null"]},"project_id":{"type":["integer","null"]}},"required":["account_id","debit","credit","project_id","cost_code_id","cost_type_id","memo"],"type":"object"},"accounting_PrepaidModification":{"additionalProperties":false,"properties":{"modification":{"additionalProperties":false,"properties":{"effective_date":{"format":"date","type":"string"},"kind":{"enum":["term_change","amount_change","cancel"]},"new_amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"new_end_date":{"format":"date","type":"string"},"offset_account_id":{"minimum":1,"type":["integer","null"]},"percents":{"items":{"additionalProperties":false,"properties":{"percent":{"type":"string"},"period":{"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","type":"string"}},"required":["period","percent"],"type":"object"},"maxItems":120,"minItems":1,"type":"array"},"policy":{"enum":["prospective","catch_up"]},"preview":{"type":"boolean"},"reason":{"maxLength":500,"minLength":3,"type":"string"},"refund_account_id":{"minimum":1,"type":["integer","null"]},"refund_amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"}},"required":["kind","effective_date","reason"],"type":"object"}},"required":["modification"],"type":"object"},"accounting_PrepaidModificationPreview":{"properties":{"amount":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"balance_delta":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"end_date":{"format":"date","type":"string"},"lines":{"items":{"$ref":"#/components/schemas/accounting_PrepaidLine"},"type":"array"},"preview":{"const":true},"recognized_before":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"refund_amount":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"removed":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"schedule":{"items":{"$ref":"#/components/schemas/accounting_PrepaidMonth"},"type":"array"},"version":{"minimum":1,"type":"integer"},"write_off":{"$ref":"#/components/schemas/accounting_PrepaidMoney"}},"required":["preview","version","amount","end_date","recognized_before","balance_delta","removed","refund_amount","write_off","lines","schedule"],"type":"object"},"accounting_PrepaidMoney":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"accounting_PrepaidMonth":{"properties":{"amount":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"period":{"pattern":"^\\d{4}-\\d{2}$","type":"string"}},"required":["period","amount"],"type":"object"},"accounting_PrepaidRollForward":{"properties":{"accounts":{"items":{"properties":{"account_id":{"type":"integer"},"account_name":{"type":"string"},"account_number":{"type":"string"},"additions":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"adjustments":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"amortization":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"closing":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"difference":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"foots":{"type":"boolean"},"normal_balance":{"enum":["debit","credit"]},"opening":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"subledger":{"$ref":"#/components/schemas/accounting_PrepaidMoney"}},"required":["account_id","account_number","account_name","normal_balance","opening","additions","amortization","adjustments","closing","subledger","difference","foots"],"type":"object"},"type":"array"},"entity_id":{"type":["integer","null"]},"from":{"format":"date","type":"string"},"schedules":{"items":{"properties":{"amortization_posted":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"balance_account_id":{"type":"integer"},"closing":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"id":{"type":"integer"},"kind":{"enum":["prepaid","deferred_revenue"]},"name":{"type":"string"},"number":{"type":"string"},"opening":{"$ref":"#/components/schemas/accounting_PrepaidMoney"}},"required":["id","number","name","kind","balance_account_id","opening","amortization_posted","closing"],"type":"object"},"type":"array"},"ties":{"type":"boolean"},"to":{"format":"date","type":"string"},"totals":{"properties":{"additions":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"adjustments":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"amortization":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"closing":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"difference":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"opening":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"subledger":{"$ref":"#/components/schemas/accounting_PrepaidMoney"}},"required":["opening","additions","amortization","adjustments","closing","subledger","difference"],"type":"object"}},"required":["from","to","entity_id","accounts","totals","ties","schedules"],"type":"object"},"accounting_PrepaidRun":{"properties":{"approved_at":{"format":"date-time","type":["string","null"]},"approved_by_id":{"type":["integer","null"]},"cancel_reason":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"entity_id":{"type":"integer"},"entry_id":{"type":["integer","null"]},"evidence_hash":{"type":"string"},"id":{"type":"integer"},"items":{"items":{"properties":{"amount":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"kind":{"enum":["prepaid","deferred_revenue"]},"name":{"type":"string"},"number":{"type":"string"},"posted":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"schedule_id":{"type":"integer"},"target":{"$ref":"#/components/schemas/accounting_PrepaidMoney"}},"required":["schedule_id","number","name","kind","target","posted","amount"],"type":"object"},"type":"array"},"lines":{"items":{"properties":{"account_id":{"type":"integer"},"cost_code_id":{"type":["integer","null"]},"cost_type_id":{"type":["integer","null"]},"credit":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"debit":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"department_id":{"type":["integer","null"]},"dimension_value_ids":{"items":{"type":"integer"},"type":["array","null"]},"memo":{"type":"string"},"project_id":{"type":["integer","null"]},"schedule_id":{"type":"integer"}},"required":["account_id","schedule_id","project_id","cost_code_id","cost_type_id","department_id","dimension_value_ids","debit","credit","memo"],"type":"object"},"type":"array"},"period_id":{"type":"integer"},"prepared_at":{"format":"date-time","type":"string"},"prepared_by_id":{"type":"integer"},"reversal_entry_id":{"type":["integer","null"]},"status":{"enum":["prepared","posted","cancelled","superseded","reversed"]},"total_expense":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"total_revenue":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"unchanged":{"description":"Prepare responses only: true when the prepared run with the same evidence is returned","type":"boolean"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","period_id","entity_id","status","evidence_hash","total_expense","total_revenue","items","lines","prepared_by_id","prepared_at","approved_by_id","approved_at","entry_id","reversal_entry_id","cancel_reason","created_at","updated_at"],"type":"object"},"accounting_PrepaidSchedule":{"properties":{"allocations":{"items":{"$ref":"#/components/schemas/accounting_PrepaidAllocation"},"type":"array"},"amortization_posted":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"amount":{"$ref":"#/components/schemas/accounting_PrepaidMoney","description":"The amount of the version in force"},"ap_bill_id":{"type":["integer","null"]},"ap_bill_line_id":{"type":["integer","null"]},"as_of":{"format":"date","type":"string"},"balance":{"$ref":"#/components/schemas/accounting_PrepaidMoney","description":"Unamortized balance the subledger expects on as_of (normal direction)"},"balance_account_id":{"type":"integer"},"cancelled_on":{"format":"date","type":["string","null"]},"category":{"enum":["insurance","bond","rent","software","maintenance_contract","other"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"current_version":{"minimum":0,"type":"integer"},"customer_id":{"type":["integer","null"]},"department_id":{"type":["integer","null"]},"dimension_value_ids":{"items":{"type":"integer"},"type":"array"},"end_date":{"description":"The last day of coverage of the version in force","format":"date","type":"string"},"entity_id":{"type":"integer"},"funding_date":{"format":"date","type":"string"},"funding_entry_id":{"type":["integer","null"]},"funding_mode":{"enum":["entry","existing","ap_bill_line"]},"funding_offset_account_id":{"type":["integer","null"]},"id":{"type":"integer"},"kind":{"enum":["prepaid","deferred_revenue"]},"memo":{"type":["string","null"]},"method":{"enum":["daily","monthly","custom"]},"name":{"type":"string"},"number":{"type":"string"},"original_amount":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"original_end_date":{"format":"date","type":"string"},"recognition_account_id":{"type":"integer"},"schedule":{"items":{"$ref":"#/components/schemas/accounting_PrepaidMonth"},"type":"array"},"schedule_version":{"description":"Detail responses: the version whose months `schedule` shows","minimum":0,"type":"integer"},"scheduled_through_as_of":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"start_date":{"format":"date","type":"string"},"status":{"enum":["active","cancelled","voided"]},"unposted_through_as_of":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"updated_at":{"format":"date-time","type":"string"},"vendor_id":{"type":["integer","null"]},"versions":{"items":{"$ref":"#/components/schemas/accounting_PrepaidVersion"},"type":"array"},"void_entry_id":{"type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided_on":{"format":"date","type":["string","null"]}},"required":["id","number","name","kind","category","entity_id","vendor_id","customer_id","balance_account_id","recognition_account_id","department_id","dimension_value_ids","allocations","method","start_date","original_amount","original_end_date","amount","end_date","funding_mode","funding_date","funding_offset_account_id","funding_entry_id","ap_bill_id","ap_bill_line_id","status","current_version","cancelled_on","voided_on","void_reason","void_entry_id","memo","as_of","amortization_posted","scheduled_through_as_of","unposted_through_as_of","balance","created_by_id","created_at","updated_at"],"type":"object"},"accounting_PrepaidScheduleCreate":{"additionalProperties":false,"properties":{"schedule":{"additionalProperties":false,"properties":{"allocations":{"items":{"additionalProperties":false,"properties":{"cost_code_id":{"minimum":1,"type":["integer","null"]},"cost_type_id":{"minimum":1,"type":["integer","null"]},"percent":{"type":"string"},"project_id":{"minimum":1,"type":["integer","null"]}},"required":["percent"],"type":"object"},"maxItems":50,"type":"array"},"amount":{"description":"Required unless deferring a bill line (default: the line with its use tax)","pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"ap_bill_line_id":{"minimum":1,"type":["integer","null"]},"balance_account_id":{"minimum":1,"type":["integer","null"]},"category":{"enum":["insurance","bond","rent","software","maintenance_contract","other"]},"customer_id":{"minimum":1,"type":["integer","null"]},"department_id":{"minimum":1,"type":["integer","null"]},"dimension_value_ids":{"items":{"minimum":1,"type":"integer"},"maxItems":20,"type":"array"},"end_date":{"format":"date","type":"string"},"entity_id":{"minimum":1,"type":["integer","null"]},"funding_date":{"format":"date","type":"string"},"funding_mode":{"enum":["entry","existing"]},"funding_offset_account_id":{"minimum":1,"type":["integer","null"]},"kind":{"enum":["prepaid","deferred_revenue"]},"memo":{"maxLength":500,"type":"string"},"method":{"enum":["daily","monthly","custom"]},"name":{"maxLength":200,"minLength":1,"type":"string"},"percents":{"items":{"additionalProperties":false,"properties":{"percent":{"type":"string"},"period":{"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","type":"string"}},"required":["period","percent"],"type":"object"},"maxItems":120,"minItems":1,"type":"array"},"preview":{"type":"boolean"},"recognition_account_id":{"minimum":1,"type":["integer","null"]},"start_date":{"format":"date","type":"string"},"vendor_id":{"minimum":1,"type":["integer","null"]}},"required":["name","kind","category","start_date","end_date","method"],"type":"object"}},"required":["schedule"],"type":"object"},"accounting_PrepaidSchedulePreview":{"properties":{"amount":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"balance_account_id":{"type":"integer"},"entity_id":{"type":"integer"},"funding_date":{"format":"date","type":"string"},"funding_lines":{"items":{"$ref":"#/components/schemas/accounting_PrepaidLine"},"type":"array"},"funding_mode":{"enum":["entry","existing","ap_bill_line"]},"kind":{"enum":["prepaid","deferred_revenue"]},"preview":{"const":true},"recognition_account_id":{"type":"integer"},"schedule":{"items":{"$ref":"#/components/schemas/accounting_PrepaidMonth"},"type":"array"}},"required":["preview","kind","entity_id","amount","balance_account_id","recognition_account_id","funding_mode","funding_date","funding_lines","schedule"],"type":"object"},"accounting_PrepaidVersion":{"properties":{"amount":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"balance_delta":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"effective_date":{"format":"date","type":"string"},"end_date":{"format":"date","type":"string"},"entry_id":{"type":["integer","null"]},"kind":{"enum":["original","term_change","amount_change","cancel"]},"months":{"items":{"$ref":"#/components/schemas/accounting_PrepaidMonth"},"type":"array"},"offset_account_id":{"type":["integer","null"]},"policy":{"enum":["prospective","catch_up",null]},"reason":{"type":"string"},"recognized_before":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"refund_account_id":{"type":["integer","null"]},"refund_amount":{"$ref":"#/components/schemas/accounting_PrepaidMoney"},"version":{"minimum":0,"type":"integer"}},"required":["version","kind","policy","effective_date","amount","end_date","recognized_before","balance_delta","refund_amount","refund_account_id","offset_account_id","entry_id","reason","created_by_id","created_at","months"],"type":"object"},"accounting_Preview":{"properties":{"journal":{"type":"string"},"lines":{"items":{"properties":{"account_id":{"type":"integer"},"account_name":{"type":["string","null"]},"account_number":{"type":["string","null"]},"cost_code_id":{"type":["integer","null"]},"credit":{"description":"Decimal string","type":"string"},"debit":{"description":"Decimal string","type":"string"},"hours":{"type":["string","null"]},"job_cost_type":{"type":["string","null"]},"memo":{"type":["string","null"]},"project_id":{"type":["integer","null"]}},"required":["account_id","account_number","account_name","job_cost_type","debit","credit","memo","project_id","cost_code_id","hours"],"type":"object"},"type":"array"},"memo":{"type":["string","null"]},"posting_date":{"type":"string"},"source_id":{"type":["integer","null"]},"source_revision":{"type":"integer"},"source_type":{"type":"string"}},"required":["posting_date","journal","memo","source_type","source_id","source_revision","lines"],"type":"object"},"accounting_PreviewLine":{"properties":{"account_id":{"type":"integer"},"account_name":{"type":["string","null"]},"account_number":{"type":["string","null"]},"cost_code_id":{"type":["integer","null"]},"credit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"debit":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"equipment_id":{"type":["integer","null"]},"memo":{"type":["string","null"]},"project_id":{"type":["integer","null"]}},"required":["account_id","account_number","account_name","debit","credit","memo","project_id","cost_code_id","equipment_id"],"type":"object"},"accounting_PrivacyDisposition":{"properties":{"data":{"type":"string"},"disposition":{"enum":["erasable","retained","already_minimized","erased"]},"reason":{"type":"string"},"record_class":{"type":["string","null"]},"retain_until":{"type":["string","null"]}},"required":["data","disposition","reason","record_class"],"type":"object"},"accounting_PrivacyHold":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"matter":{"type":["string","null"]},"placed_by_id":{"type":["integer","null"]},"reason":{"type":"string"},"release_reason":{"type":["string","null"]},"released_at":{"format":"date-time","type":["string","null"]},"released_by_id":{"type":["integer","null"]},"subject_id":{"type":"integer"},"subject_type":{"enum":["company","entity","project","vendor","employee"]}},"required":["id","subject_type","subject_id","matter","reason","placed_by_id","created_at","active","released_at","released_by_id","release_reason"],"type":"object"},"accounting_PrivacyHoldInput":{"additionalProperties":false,"properties":{"matter":{"description":"Matter or case reference (no personal data)","maxLength":200,"minLength":2,"type":"string"},"reason":{"maxLength":1000,"minLength":10,"type":"string"},"subject_id":{"description":"Required except for a company hold","minimum":1,"type":"integer"},"subject_type":{"enum":["company","entity","project","vendor","employee"]}},"required":["subject_type","reason"],"type":"object"},"accounting_PrivacyInventory":{"properties":{"columns":{"items":{"properties":{"category":{"type":"string"},"column":{"type":"string"},"note":{"type":"string"},"protection":{"enum":["sealed","masked","plain","hashed"]},"record_class":{"type":["string","null"]},"subject":{"type":"string"},"table":{"type":"string"}},"required":["table","column","category","subject","protection","record_class","note"],"type":"object"},"type":"array"},"not_pii":{"items":{"properties":{"column":{"type":"string"},"reason":{"type":"string"}},"required":["column","reason"],"type":"object"},"type":"array"}},"required":["columns","not_pii"],"type":"object"},"accounting_PrivacyRecordClass":{"enum":["ledger","ap_ar_documents","payroll_records","employee_ssn","employee_bank","vendor_tin","vendor_bank","attachments","audit_logs","outbox_payloads","job_errors","portal_sessions"],"type":"string"},"accounting_PrivacyRegister":{"additionalProperties":false,"properties":{"changes":{"items":{"$ref":"#/components/schemas/accounting_PrivacyRuleChange"},"type":"array"},"classes":{"items":{"$ref":"#/components/schemas/accounting_PrivacyRegisterClass"},"type":"array"},"disclaimer":{"type":"string"}},"required":["disclaimer","classes","changes"],"type":"object"},"accounting_PrivacyRegisterClass":{"additionalProperties":false,"properties":{"action":{"enum":["retain","minimize","redact","delete"]},"automated":{"type":"boolean"},"covers":{"items":{"type":"string"},"type":"array"},"floor_days":{"type":"integer"},"from":{"type":"string"},"in_force":{"oneOf":[{"type":"null"},{"additionalProperties":false,"properties":{"approved_at":{"format":"date-time","type":"string"},"approved_by_id":{"type":"integer"},"basis":{"type":"string"},"change_id":{"type":"integer"},"jurisdiction":{"type":"string"},"retention_days":{"type":"integer"},"version":{"type":"integer"}},"required":["retention_days","jurisdiction","basis","version","change_id","approved_by_id","approved_at"],"type":"object"}]},"label":{"type":"string"},"pending_change":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/accounting_PrivacyRuleChange"}]},"proposed_basis":{"type":"string"},"proposed_days":{"type":"integer"},"proposed_jurisdiction":{"type":"string"},"record_class":{"$ref":"#/components/schemas/accounting_PrivacyRecordClass"}},"required":["record_class","label","action","automated","floor_days","proposed_days","from","proposed_jurisdiction","proposed_basis","covers","in_force","pending_change"],"type":"object"},"accounting_PrivacyRequest":{"properties":{"assessment":{"description":"Detail only, while open","items":{"$ref":"#/components/schemas/accounting_PrivacyDisposition"},"type":["array","null"]},"decided_at":{"format":"date-time","type":["string","null"]},"decided_by_id":{"type":["integer","null"]},"decision_note":{"type":["string","null"]},"description":{"type":"string"},"due_on":{"format":"date","type":"string"},"id":{"type":"integer"},"kind":{"enum":["access","rectification","erasure"]},"outcome":{"description":"Decision record: for an erasure, what was erased and what was retained and why"},"received_on":{"format":"date","type":"string"},"requested_at":{"format":"date-time","type":"string"},"requested_by_id":{"type":"integer"},"status":{"enum":["open","completed","rejected"]},"subject_id":{"type":"integer"},"subject_type":{"enum":["employee","vendor"]}},"required":["id","subject_type","subject_id","kind","status","received_on","due_on","description","requested_by_id","requested_at","decided_by_id","decided_at","decision_note","outcome"],"type":"object"},"accounting_PrivacyRequestInput":{"additionalProperties":false,"properties":{"description":{"description":"What was asked, without identifiers","maxLength":2000,"minLength":10,"type":"string"},"kind":{"enum":["access","rectification","erasure"]},"received_on":{"format":"date","type":"string"},"subject_id":{"minimum":1,"type":"integer"},"subject_type":{"enum":["employee","vendor"]}},"required":["subject_type","subject_id","kind","received_on","description"],"type":"object"},"accounting_PrivacyRuleChange":{"additionalProperties":false,"properties":{"basis":{"type":"string"},"decided_at":{"format":"date-time","type":["string","null"]},"decided_by_id":{"type":["integer","null"]},"decision_note":{"type":["string","null"]},"id":{"type":"integer"},"jurisdiction":{"type":"string"},"previous_days":{"type":["integer","null"]},"reason":{"type":"string"},"record_class":{"$ref":"#/components/schemas/accounting_PrivacyRecordClass"},"requested_at":{"format":"date-time","type":"string"},"requested_by_id":{"type":"integer"},"retention_days":{"type":"integer"},"status":{"enum":["pending","approved","rejected"]}},"required":["id","record_class","retention_days","jurisdiction","basis","reason","status","previous_days","requested_by_id","requested_at","decided_by_id","decided_at","decision_note"],"type":"object"},"accounting_PrivacyRuleChangeInput":{"additionalProperties":false,"properties":{"basis":{"maxLength":2000,"minLength":10,"type":"string"},"jurisdiction":{"maxLength":200,"minLength":2,"type":"string"},"reason":{"maxLength":1000,"minLength":10,"type":"string"},"record_class":{"$ref":"#/components/schemas/accounting_PrivacyRecordClass"},"retention_days":{"description":"At least the class's floor_days (422 otherwise)","maximum":36500,"minimum":30,"type":"integer"}},"required":["record_class","retention_days","jurisdiction","basis","reason"],"type":"object"},"accounting_PrivacyRun":{"properties":{"as_of":{"format":"date-time","type":"string"},"created_at":{"format":"date-time","type":"string"},"evidence":{"description":"Detail only. Preview: register, active holds and the per-class plan. Execution: the plan, applied ids per class and whether they match the preview, ledger fingerprint, integrity checks and audit-event count before and after.","type":"object"},"evidence_sha256":{"type":"string"},"executed":{"description":"List only: whether a preview was executed","type":["boolean","null"]},"id":{"type":"integer"},"mode":{"enum":["preview","execute"]},"plan_hash":{"type":"string"},"preview_id":{"type":["integer","null"]},"requested_by_id":{"type":"integer"},"summary":{"description":"Per record class: status (not_in_force, retained, planned), past_period, held, to_apply and, for an execution, applied","type":"object"},"trigger":{"enum":["manual","scheduled"]}},"required":["id","mode","trigger","as_of","preview_id","plan_hash","summary","evidence_sha256","requested_by_id","created_at"],"type":"object"},"accounting_PrivacySubjectExport":{"properties":{"ach_accounts":{"type":"array"},"audit_trail":{"type":"array"},"bank":{"type":"object"},"bills":{"type":"array"},"deductions":{"type":"array"},"form_1099_filings":{"type":"array"},"generated_at":{"format":"date-time","type":"string"},"identity":{"type":"object"},"legal_holds":{"items":{"type":"integer"},"type":"array"},"pay_checks":{"type":"array"},"payments":{"type":"array"},"portal_users":{"type":"array"},"profile":{"type":["object","null"]},"rate_changes":{"type":"array"},"retention":{"items":{"$ref":"#/components/schemas/accounting_PrivacyDisposition"},"type":"array"},"revealed":{"type":"boolean"},"subject":{"type":"object"},"vendor":{"type":"object"},"year_to_date_imports":{"type":"array"}},"required":["subject","generated_at","revealed","audit_trail","legal_holds","retention"],"type":"object"},"accounting_QualifiedReviewer":{"properties":{"areas":{"items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"credential_issuer":{"type":"string"},"credential_jurisdiction":{"type":"string"},"credential_number":{"type":"string"},"credential_type":{"$ref":"#/components/schemas/accounting_CredentialType"},"id":{"type":"integer"},"registered_by":{"$ref":"#/components/schemas/accounting_UserRef"},"revoke_reason":{"type":["string","null"]},"revoked_at":{"format":"date-time","type":["string","null"]},"revoked_by_id":{"type":["integer","null"]},"user":{"$ref":"#/components/schemas/accounting_UserRef"},"valid_from":{"format":"date","type":"string"},"valid_until":{"format":"date","type":"string"}},"required":["id","user","credential_type","credential_number","credential_issuer","credential_jurisdiction","areas","valid_from","valid_until","registered_by","created_at","revoked_at","revoked_by_id","revoke_reason"],"type":"object"},"accounting_QualifiedReviewerInput":{"additionalProperties":false,"properties":{"areas":{"description":"Policy area keys (GET compliance/policy_areas)","items":{"type":"string"},"minItems":1,"type":"array"},"credential_issuer":{"maxLength":160,"minLength":3,"type":"string"},"credential_jurisdiction":{"description":"Country or region code, e.g. US or US-TX","pattern":"^[A-Z]{2}(-[A-Z0-9]{1,3})?$","type":"string"},"credential_number":{"maxLength":64,"minLength":2,"type":"string"},"credential_type":{"$ref":"#/components/schemas/accounting_CredentialType"},"user_id":{"description":"An active member of this company (not the caller)","minimum":1,"type":"integer"},"valid_from":{"format":"date","type":"string"},"valid_until":{"format":"date","type":"string"}},"required":["user_id","credential_type","credential_number","credential_issuer","credential_jurisdiction","areas","valid_from","valid_until"],"type":"object"},"accounting_RateChange":{"properties":{"approved_by_id":{"type":["integer","null"]},"changes":{"type":"object"},"created_at":{"type":"string"},"decided_at":{"type":["string","null"]},"effective_date":{"description":"Rate in effect from this date (time on earlier dates pays the previous rate)","type":["string","null"]},"employee_id":{"type":"integer"},"id":{"type":"integer"},"kind":{"description":"bank: a bank-account change; changes holds masked values only (****1234). Approval sets the employee's bank_changed_at, and the next calculation raises a bank_changed warning to acknowledge.","enum":["rate","bank"],"type":"string"},"reason":{"type":["string","null"]},"requested_by_id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","employee_id","kind","changes","status","requested_by_id","approved_by_id","decided_at","reason","created_at"],"type":"object"},"accounting_RateImportResult":{"properties":{"created":{"type":"integer"},"dry_run":{"type":"boolean"},"errors":{"items":{"properties":{"line":{"type":"integer"},"message":{"type":"string"}},"required":["line","message"],"type":"object"},"type":"array"},"rows":{"items":{"properties":{"action":{"enum":["create","unchanged"],"type":"string"},"effective_date":{"format":"date","type":"string"},"from_currency":{"pattern":"^[A-Z]{3}$","type":"string"},"line":{"type":"integer"},"rate":{"type":"string"},"rate_type":{"type":"string"},"to_currency":{"pattern":"^[A-Z]{3}$","type":"string"}},"type":"object"},"type":"array"},"sha256":{"type":"string"},"unchanged":{"type":"integer"}},"required":["dry_run","sha256","created","unchanged","errors","rows"],"type":"object"},"accounting_RecGenerateResult":{"additionalProperties":false,"properties":{"carried":{"type":"integer"},"created":{"type":"integer"},"reconciled":{"type":"integer"}},"required":["created","carried","reconciled"],"type":"object"},"accounting_RecItem":{"additionalProperties":false,"properties":{"age_days":{"type":"integer"},"aging_bucket":{"enum":["0-30","31-60","61-90","over_90"],"type":"string"},"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"carried_forward":{"type":"boolean"},"carried_from_item_id":{"type":["integer","null"]},"cleared":{"type":"boolean"},"cleared_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":["string","null"]},"created_by_id":{"type":"integer"},"description":{"type":"string"},"id":{"type":"integer"},"item_date":{"format":"date","type":["string","null"]},"kind":{"enum":["reconciling_item","schedule_line"],"type":"string"},"reference":{"type":["string","null"]}},"required":["id","kind","description","reference","amount","item_date","age_days","aging_bucket","cleared","cleared_at","carried_forward","carried_from_item_id","created_by_id","created_at"],"type":"object"},"accounting_RecRule":{"additionalProperties":false,"properties":{"account_ids":{"items":{"type":"integer"},"type":"array"},"account_types":{"items":{"type":"string"},"type":"array"},"entity_ids":{"items":{"type":"integer"},"type":"array"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"materiality_abs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"materiality_pct":{"type":"string"},"name":{"type":"string"},"risk_rating":{"enum":["low","medium","high"],"type":"string"},"source":{"enum":["auto","tie_out","manual"],"type":"string"},"tie_out_key":{"type":["string","null"]},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["id","name","account_types","account_ids","entity_ids","source","tie_out_key","materiality_abs","materiality_pct","risk_rating","is_active","updated_at"],"type":"object"},"accounting_Reconciliation":{"properties":{"adjustment_entry_id":{"type":["integer","null"]},"adjustment_reason":{"type":["string","null"]},"bank_account_id":{"type":"integer"},"beginning_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"book_balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"cleared_balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"finished_at":{"format":"date-time","type":["string","null"]},"finished_by_id":{"type":["integer","null"]},"id":{"type":"integer"},"outstanding_deposits":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"outstanding_payments":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"reviewed_at":{"format":"date-time","type":["string","null"]},"reviewed_by_id":{"description":"Independent reviewer (close_period or approve_journal, never the finisher).","type":["integer","null"]},"started_by_id":{"type":"integer"},"statement_date":{"format":"date","type":"string"},"statement_ending_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"status":{"enum":["in_progress","finished","undone"],"type":"string"},"undo_reason":{"type":["string","null"]},"undone_at":{"format":"date-time","type":["string","null"]},"undone_by_id":{"type":["integer","null"]}},"required":["id","bank_account_id","statement_date","statement_ending_balance","beginning_balance","status","cleared_balance","outstanding_deposits","outstanding_payments","book_balance","adjustment_entry_id","adjustment_reason","started_by_id","finished_at","finished_by_id","undone_at","undone_by_id","undo_reason","created_at","reviewed_by_id","reviewed_at"],"type":"object"},"accounting_ReconciliationLine":{"properties":{"amount":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ap_payment_id":{"description":"AP payment behind the line (sourced from an AP payment run); check_number and description come from it","type":["integer","null"]},"bank_transaction_id":{"type":["integer","null"]},"bank_transaction_number":{"type":["string","null"]},"check_number":{"type":["string","null"]},"cleared":{"type":"boolean"},"date":{"format":"date","type":"string"},"description":{"type":["string","null"]},"entry_id":{"type":"integer"},"entry_number":{"type":["string","null"]},"journal_line_id":{"type":"integer"},"link":{"description":"App path to the source document (bank transaction or AP payment run)","type":["string","null"]},"matched":{"type":"boolean"},"reconcile_state":{"enum":["n","c","y","v"],"type":"string"}},"required":["journal_line_id","entry_id","entry_number","date","amount","description","bank_transaction_id","bank_transaction_number","check_number","cleared","matched","reconcile_state","ap_payment_id","link"],"type":"object"},"accounting_ReconciliationShow":{"properties":{"adjustment_entry_id":{"type":["integer","null"]},"adjustment_reason":{"type":["string","null"]},"bank_account_id":{"type":"integer"},"beginning_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"book_balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"cleared_balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"finished_at":{"format":"date-time","type":["string","null"]},"finished_by_id":{"type":["integer","null"]},"id":{"type":"integer"},"lines":{"items":{"$ref":"#/components/schemas/accounting_ReconciliationLine"},"type":"array"},"outstanding_deposits":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"outstanding_payments":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"reviewed_at":{"format":"date-time","type":["string","null"]},"reviewed_by_id":{"description":"Independent reviewer (close_period or approve_journal, never the finisher).","type":["integer","null"]},"started_by_id":{"type":"integer"},"statement_date":{"format":"date","type":"string"},"statement_ending_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"status":{"enum":["in_progress","finished","undone"],"type":"string"},"totals":{"properties":{"beginning_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cleared_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cleared_deposits":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cleared_payments":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"difference":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"explain":{"items":{"properties":{"formula":{"type":["string","null"]},"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value","formula"],"type":"object"},"type":"array"},"outstanding_deposits":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"outstanding_payments":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"statement_ending_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["beginning_balance","cleared_deposits","cleared_payments","cleared_balance","statement_ending_balance","difference","outstanding_deposits","outstanding_payments","explain"],"type":"object"},"undo_reason":{"type":["string","null"]},"undone_at":{"format":"date-time","type":["string","null"]},"undone_by_id":{"type":["integer","null"]},"warnings":{"description":"For example: the statement ending balance differs from the closing balance of a statement imported for the same date.","items":{"type":"string"},"type":"array"}},"required":["id","bank_account_id","statement_date","statement_ending_balance","beginning_balance","status","cleared_balance","outstanding_deposits","outstanding_payments","book_balance","adjustment_entry_id","adjustment_reason","started_by_id","finished_at","finished_by_id","undone_at","undone_by_id","undo_reason","created_at","totals","lines","warnings","reviewed_by_id","reviewed_at"],"type":"object"},"accounting_RecurringJournal":{"properties":{"approved_by_id":{"minimum":1,"type":["integer","null"]},"auto_post":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"day_of_month":{"maximum":31,"minimum":1,"type":["integer","null"]},"end_date":{"format":"date","type":["string","null"]},"entity_id":{"minimum":1,"type":"integer"},"frequency":{"enum":["weekly","monthly","quarterly","yearly"]},"id":{"minimum":1,"type":"integer"},"interval":{"minimum":1,"type":"integer"},"is_active":{"type":"boolean"},"journal":{"type":"string"},"last_error":{"description":"Last scheduler refusal or skip: `blocked_soft_close: ...` (an auto-post occurrence waits in a soft-closed period), `skipped_closed: ...` (occurrences in hard-closed periods were skipped) or the failure message; null after a clean run.","type":["string","null"]},"last_error_at":{"format":"date-time","type":["string","null"]},"last_run_date":{"format":"date","type":["string","null"]},"lines":{"items":{"properties":{"account_id":{"minimum":1,"type":"integer"},"cost_code_id":{"minimum":1,"type":["integer","null"]},"cost_type_id":{"minimum":1,"type":["integer","null"]},"credit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"debit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"department_id":{"minimum":1,"type":["integer","null"]},"dimension_value_ids":{"description":"User-defined dimension values carried onto each generated entry's line.","items":{"type":"integer"},"type":["array","null"]},"id":{"minimum":1,"type":"integer"},"line_no":{"minimum":1,"type":"integer"},"memo":{"type":["string","null"]},"project_id":{"minimum":1,"type":["integer","null"]}},"required":["id","line_no","account_id","debit","credit","memo","project_id","cost_code_id","cost_type_id","department_id"],"type":"object"},"type":"array"},"memo":{"type":["string","null"]},"name":{"type":"string"},"next_run_date":{"format":"date","type":"string"},"reverse_after_days":{"minimum":1,"type":["integer","null"]},"start_date":{"format":"date","type":"string"},"total_amount":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","entity_id","name","memo","journal","frequency","interval","day_of_month","start_date","end_date","next_run_date","last_run_date","reverse_after_days","auto_post","is_active","created_by_id","approved_by_id","total_amount","lines","created_at","updated_at","last_error","last_error_at"],"type":"object"},"accounting_RegisterLine":{"properties":{"amount":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ap_payment_id":{"description":"AP payment behind the line (sourced from an AP payment run); check_number and description come from it","type":["integer","null"]},"balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bank_transaction_id":{"type":["integer","null"]},"bank_transaction_number":{"type":["string","null"]},"check_number":{"type":["string","null"]},"date":{"format":"date","type":"string"},"deposit":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"description":{"type":["string","null"]},"entry_id":{"type":"integer"},"entry_number":{"type":["string","null"]},"journal_line_id":{"type":"integer"},"link":{"description":"App path to the source document (bank transaction or AP payment run)","type":["string","null"]},"memo":{"type":["string","null"]},"payment":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"reconcile_state":{"enum":["n","c","y","v"],"type":"string"},"source_id":{"type":["integer","null"]},"source_type":{"type":"string"}},"required":["journal_line_id","entry_id","entry_number","date","description","memo","source_type","source_id","bank_transaction_id","bank_transaction_number","check_number","amount","deposit","payment","balance","reconcile_state","ap_payment_id","link"],"type":"object"},"accounting_ReportDef":{"additionalProperties":false,"properties":{"description":{"type":"string"},"group":{"type":"string"},"key":{"enum":["balance_sheet","income_statement","cash_flow","equity_roll_forward","trial_balance","general_ledger","journal","ar_aging","ar_overview","cash_receipts","ar_collection_effectiveness","ar_dso","ar_promise_kept_rate","ar_dispute_aging","sales_tax_liability","ap_aging","check_register","cash_requirements","match_exception_aging","job_cost_status","job_cost_detail","committed_cost","retainage_by_job","job_profitability","payroll_register","subledger_reconciliation","integrity_check","manual_je_review","sod_conflicts","access_sod","vendor_changes","pii_reveals","audit_log","fixed_asset_roll_forward","reconciliation_status","close_progress","flux_analysis","cutover_reconciliation","wip_schedule","completed_contracts","wip_gl_reconciliation","backlog_roll_forward","cecl_allowance"]},"params":{"items":{"enum":["as_of","from","to","adj_from","compare","budget_id","columns","entity_id","project_id","department_id","account_id","journal","basis","include_zero","jtd","rollup","actor_id","item_type","action"]},"type":"array"},"title":{"type":"string"}},"required":["key","title","group","description","params"],"type":"object"},"accounting_ReportDefinition":{"properties":{"can_edit":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"type":"integer"},"name":{"type":"string"},"owner_id":{"type":"integer"},"owner_name":{"type":["string","null"]},"shared_roles":{"items":{"type":"string"},"type":"array"},"source":{"type":"string"},"spec":{"$ref":"#/components/schemas/accounting_ReportDefinitionSpec"},"updated_at":{"format":"date-time","type":"string"},"version":{"type":"integer"},"visibility":{"enum":["private","role","company"]}},"required":["id","name","description","source","visibility","shared_roles","version","owner_id","owner_name","can_edit","spec","created_at","updated_at"],"type":"object"},"accounting_ReportDefinitionInput":{"properties":{"description":{"maxLength":500,"type":["string","null"]},"name":{"maxLength":120,"minLength":1,"type":"string"},"shared_roles":{"items":{"enum":["owner","controller","accountant","ap_clerk","ar_clerk","payroll_admin","project_manager_view","auditor_readonly"]},"type":"array"},"spec":{"$ref":"#/components/schemas/accounting_ReportDefinitionSpec"},"visibility":{"enum":["private","role","company"]}},"required":["name","spec"],"type":"object"},"accounting_ReportDefinitionSpec":{"description":"Columns, groupings (nested, at most three), filters, sort, comparison, subtotals, row limit and saved report parameters. Field keys are the source's column keys (GET report_definitions/sources); a `dimension:<id>` key is a registered user-defined dimension.","properties":{"base_report":{"description":"source=catalog: the report library key","type":"string"},"columns":{"items":{"type":"string"},"maxItems":30,"minItems":1,"type":"array"},"compare":{"enum":["none","prior_period","prior_year","budget"]},"filters":{"items":{"properties":{"field":{"type":"string"},"op":{"enum":["eq","in","not_in","gte","lte","contains"]},"value":{"oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]}},"required":["field","op","value"],"type":"object"},"maxItems":20,"type":"array"},"group_by":{"items":{"type":"string"},"maxItems":3,"type":"array"},"limit":{"maximum":1000,"minimum":1,"type":["integer","null"]},"params":{"additionalProperties":{"type":"string"},"description":"Saved report parameters (as_of, from, to, entity_id, project_id, department_id, budget_id, basis…)","type":"object"},"sort":{"items":{"properties":{"dir":{"enum":["asc","desc"]},"field":{"type":"string"}},"required":["field"],"type":"object"},"maxItems":3,"type":"array"},"source":{"enum":["gl_detail","trial_balance","cash","ap_open_items","ar_open_items","job_cost","job_cost_entries","catalog"]},"subtotals":{"type":"boolean"}},"required":["source","columns"],"type":"object"},"accounting_ReportDefinitionVersion":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"name":{"type":"string"},"source":{"type":"string"},"spec":{"$ref":"#/components/schemas/accounting_ReportDefinitionSpec"},"version":{"type":"integer"}},"required":["version","name","source","spec","created_by_id","created_at"],"type":"object"},"accounting_ReportDoc":{"additionalProperties":false,"properties":{"checks":{"items":{"additionalProperties":false,"properties":{"detail":{"type":["string","null"]},"difference":{"description":"A money amount with two decimals (\"12.50\"), or a bare item count (\"3\") for checks that count exceptions.","pattern":"^-?\\d+(\\.\\d{2})?$","type":"string"},"label":{"type":"string"},"ok":{"type":"boolean"}},"required":["label","ok","difference"],"type":"object"},"type":"array"},"columns":{"items":{"additionalProperties":false,"properties":{"fmt":{"enum":["text","money","pct","int","date"]},"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label","fmt"],"type":"object"},"type":"array"},"explain":{"items":{"properties":{"cite":{"type":"string"},"formula":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"generatedAt":{"format":"date-time","type":"string"},"key":{"enum":["balance_sheet","income_statement","cash_flow","equity_roll_forward","trial_balance","general_ledger","journal","ar_aging","ar_overview","cash_receipts","ar_collection_effectiveness","ar_dso","ar_promise_kept_rate","ar_dispute_aging","sales_tax_liability","ap_aging","check_register","cash_requirements","match_exception_aging","job_cost_status","job_cost_detail","committed_cost","retainage_by_job","job_profitability","payroll_register","subledger_reconciliation","integrity_check","manual_je_review","sod_conflicts","access_sod","vendor_changes","pii_reveals","audit_log","fixed_asset_roll_forward","reconciliation_status","close_progress","flux_analysis","cutover_reconciliation","wip_schedule","completed_contracts","wip_gl_reconciliation","backlog_roll_forward","cecl_allowance"]},"notes":{"items":{"type":"string"},"type":"array"},"params":{"additionalProperties":{"type":["string","null"]},"type":"object"},"rows":{"items":{"additionalProperties":false,"properties":{"cellHrefs":{"additionalProperties":{"type":"string"},"description":"Per-cell drill-down links (column key to in-app link) for pivot and comparison columns","type":"object"},"cells":{"additionalProperties":{"type":["string","number","null"]},"type":"object"},"depth":{"minimum":0,"type":"integer"},"href":{"description":"In-app drill-down link","type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["header","line","account","subtotal","total","detail","note"]},"tone":{"enum":["ok","warn","risk",null]}},"required":["id","kind","depth","cells"],"type":"object"},"type":"array"},"subtitle":{"description":"Dates and scope; ends with the entity, job and department filters applied, e.g. `As of 2026-10-31 · Entity: E1 Main · Job: Riverside`","type":"string"},"title":{"type":"string"}},"required":["key","title","subtitle","params","columns","rows","checks","notes","explain","generatedAt"],"type":"object"},"accounting_ReportSource":{"properties":{"columns":{"items":{"properties":{"compare":{"items":{"enum":["prior_period","prior_year","budget"]},"type":"array"},"fmt":{"enum":["text","money","pct","int","date"]},"groupable":{"type":"boolean"},"key":{"type":"string"},"label":{"type":"string"},"role":{"enum":["dim","attr","measure"]}},"required":["key","label","role","fmt"],"type":"object"},"type":"array"},"default_columns":{"items":{"type":"string"},"type":"array"},"default_group_by":{"items":{"type":"string"},"type":"array"},"description":{"type":"string"},"key":{"type":"string"},"params":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"}},"required":["key","title","description","params","columns","default_columns","default_group_by"],"type":"object"},"accounting_RetentionHold":{"additionalProperties":false,"properties":{"reason":{"maxLength":1000,"minLength":10,"type":"string"},"subject_id":{"minimum":1,"type":"integer"},"subject_type":{"enum":["employee","vendor"]}},"required":["subject_type","subject_id","reason"],"type":"object"},"accounting_RetentionPolicy":{"additionalProperties":false,"properties":{"employee_days":{"maximum":365000,"minimum":1,"type":["integer","null"]},"legal_hold":{"type":"boolean"},"reason":{"maxLength":1000,"minLength":10,"type":"string"},"vendor_days":{"maximum":365000,"minimum":1,"type":["integer","null"]}},"required":["employee_days","vendor_days","legal_hold","reason"],"type":"object"},"accounting_RetentionPolicyResult":{"additionalProperties":false,"properties":{"employee_days":{"maximum":365000,"minimum":1,"type":["integer","null"]},"legal_hold":{"type":"boolean"},"pending_change_ids":{"items":{"type":"integer"},"type":"array"},"reason":{"maxLength":1000,"minLength":10,"type":"string"},"vendor_days":{"maximum":365000,"minimum":1,"type":["integer","null"]}},"required":["employee_days","vendor_days","legal_hold","reason","pending_change_ids"],"type":"object"},"accounting_RetentionState":{"additionalProperties":false,"properties":{"employee_days":{"maximum":365000,"minimum":1,"type":["integer","null"]},"legal_hold":{"type":"boolean"},"reason":{"type":["string","null"]},"vendor_days":{"maximum":365000,"minimum":1,"type":["integer","null"]}},"required":["employee_days","vendor_days","legal_hold","reason"],"type":"object"},"accounting_RevaluationLine":{"properties":{"account_id":{"type":"integer"},"adjustment":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"currency":{"pattern":"^[A-Z]{3}$","type":"string"},"functional_balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rate":{"type":"string"},"target":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"txn_balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["account_id","currency","txn_balance","functional_balance","rate","target","adjustment"],"type":"object"},"accounting_RevaluationPreview":{"properties":{"as_of":{"format":"date","type":"string"},"functional_currency":{"pattern":"^[A-Z]{3}$","type":"string"},"lines":{"items":{"$ref":"#/components/schemas/accounting_RevaluationLine"},"type":"array"},"net_gain":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rates":{"items":{"type":"object"},"type":"array"}},"required":["as_of","functional_currency","lines","rates","net_gain"],"type":"object"},"accounting_RevaluationRun":{"properties":{"approved_at":{"format":"date-time","type":["string","null"]},"approved_by_id":{"type":["integer","null"]},"as_of":{"format":"date","type":"string"},"cancel_reason":{"type":["string","null"]},"entity_id":{"type":"integer"},"entry_id":{"type":["integer","null"]},"evidence_hash":{"type":"string"},"id":{"type":"integer"},"lines":{"items":{"$ref":"#/components/schemas/accounting_RevaluationLine"},"type":"array"},"net_gain":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"period_id":{"type":"integer"},"prepared_at":{"format":"date-time","type":"string"},"prepared_by_id":{"type":"integer"},"rates":{"items":{"type":"object"},"type":"array"},"reverse_on":{"format":"date","type":"string"},"revision":{"type":"integer"},"status":{"enum":["prepared","posted","cancelled","superseded"],"type":"string"},"total_gain":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"total_loss":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"unchanged":{"type":"boolean"}},"required":["id","entity_id","period_id","revision","status","as_of","reverse_on","evidence_hash","lines","rates","total_gain","total_loss","net_gain","prepared_by_id","prepared_at","approved_by_id","approved_at","entry_id"],"type":"object"},"accounting_RevealedNumbers":{"properties":{"account_number":{"type":["string","null"]},"id":{"type":"integer"},"routing_number":{"type":["string","null"]}},"required":["id","account_number","routing_number"],"type":"object"},"accounting_RevokeInput":{"additionalProperties":false,"properties":{"revoke":{"additionalProperties":false,"properties":{"reason":{"maxLength":1000,"minLength":10,"type":"string"}},"required":["reason"],"type":"object"}},"required":["revoke"],"type":"object"},"accounting_RunException":{"properties":{"acknowledged":{"type":"boolean"},"code":{"type":"string"},"employee_id":{"type":["integer","null"]},"key":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning","info"],"type":"string"}},"required":["key","code","severity","message","employee_id","acknowledged"],"type":"object"},"accounting_SalesTaxAccrual":{"additionalProperties":false,"properties":{"accrued_total":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bill_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"details":{"items":{"additionalProperties":false,"properties":{"account_id":{"type":["integer","null"]},"base_amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bill_line_id":{"type":["integer","null"]},"jurisdiction_id":{"type":"integer"},"note":{"type":["string","null"]},"rate":{"pattern":"^\\d+\\.\\d{6}$","type":"string"},"tax_amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"taxability":{"type":"string"}},"required":["bill_line_id","jurisdiction_id","taxability","base_amount","rate","tax_amount","account_id","note"],"type":"object"},"type":"array"},"entity_id":{"type":"integer"},"entry_id":{"type":["integer","null"]},"id":{"type":"integer"},"lines":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxLineReview"},"type":"array"},"overrides":{"items":{"additionalProperties":false,"properties":{"action":{"enum":["exclude","include"],"type":"string"},"bill_line_id":{"type":"integer"},"reason":{"type":"string"}},"required":["bill_line_id","action","reason"],"type":"object"},"type":"array"},"owed_total":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"posting_date":{"format":"date","type":"string"},"reversal_entry_id":{"type":["integer","null"]},"reversal_reason":{"type":["string","null"]},"reversed_by_id":{"type":["integer","null"]},"status":{"enum":["posted","reversed"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor_id":{"type":"integer"},"vendor_tax_charged":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["id","entity_id","bill_id","vendor_id","posting_date","status","vendor_tax_charged","owed_total","accrued_total","overrides","lines","warnings","entry_id","reversal_entry_id","reversal_reason","details","created_by_id","reversed_by_id","created_at","updated_at"],"type":"object"},"accounting_SalesTaxCandidate":{"additionalProperties":false,"properties":{"bill_id":{"type":"integer"},"entity_id":{"type":"integer"},"gaps":{"items":{"type":"string"},"type":"array"},"invoice_date":{"format":"date","type":"string"},"lines":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxLineReview"},"type":"array"},"number":{"type":"string"},"owed":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"posting_date":{"format":"date","type":"string"},"vendor_id":{"type":"integer"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["bill_id","number","vendor_id","entity_id","posting_date","invoice_date","owed","gaps","warnings","lines"],"type":"object"},"accounting_SalesTaxCertificate":{"additionalProperties":false,"properties":{"certificate_number":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"effective_from":{"format":"date","type":"string"},"expires_on":{"format":"date","type":["string","null"]},"id":{"type":"integer"},"jurisdiction_id":{"type":"integer"},"kind":{"enum":["exemption","resale"],"type":"string"},"party_id":{"type":"integer"},"party_type":{"enum":["customer","vendor"],"type":"string"},"project_id":{"type":["integer","null"]},"reason":{"type":"string"},"revoke_reason":{"type":["string","null"]},"revoked_at":{"format":"date-time","type":["string","null"]},"status":{"enum":["active","expired","revoked","future"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","party_type","party_id","kind","jurisdiction_id","project_id","certificate_number","reason","effective_from","expires_on","revoked_at","revoke_reason","status","created_by_id","created_at","updated_at"],"type":"object"},"accounting_SalesTaxDetermination":{"additionalProperties":false,"properties":{"account_id":{"type":["integer","null"]},"accrual_id":{"type":["integer","null"]},"ar_invoice_line_id":{"type":["integer","null"]},"base_amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bill_line_id":{"type":["integer","null"]},"category":{"type":["string","null"]},"certificate_id":{"type":["integer","null"]},"doc_type":{"enum":["ar_invoice","use_tax_accrual"],"type":"string"},"entity_id":{"type":"integer"},"id":{"type":"integer"},"jurisdiction_code":{"type":["string","null"]},"jurisdiction_id":{"type":"integer"},"kind":{"enum":["sales","use"],"type":"string"},"line_no":{"type":"integer"},"note":{"type":["string","null"]},"party_id":{"type":"integer"},"project_id":{"type":["integer","null"]},"rate":{"pattern":"^\\d+\\.\\d{6}$","type":"string"},"rate_id":{"type":["integer","null"]},"rule_id":{"type":["integer","null"]},"tax_amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"tax_date":{"format":"date","type":"string"},"taxability":{"enum":["taxable","exempt","nontaxable"],"type":"string"}},"required":["id","doc_type","line_no","ar_invoice_line_id","accrual_id","bill_line_id","entity_id","project_id","party_id","jurisdiction_id","jurisdiction_code","kind","tax_date","category","taxability","base_amount","rate","tax_amount","rate_id","rule_id","certificate_id","account_id","note"],"type":"object"},"accounting_SalesTaxFiling":{"additionalProperties":false,"properties":{"cancel_reason":{"type":["string","null"]},"confirmation_number":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"entity_id":{"type":"integer"},"evidence_hash":{"type":"string"},"figures":{"type":"object"},"filed_at":{"format":"date-time","type":["string","null"]},"filed_by_id":{"type":["integer","null"]},"filed_on":{"format":"date","type":["string","null"]},"id":{"type":"integer"},"is_amendment":{"type":"boolean"},"jurisdiction_id":{"type":"integer"},"payment":{"oneOf":[{"type":"null"},{"additionalProperties":false,"properties":{"amount":{"oneOf":[{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},{"type":"null"}]},"entry_id":{"type":"integer"},"linked_at":{"format":"date-time","type":["string","null"]},"linked_by_id":{"type":["integer","null"]},"source":{"type":"string"},"source_id":{"type":"integer"}},"required":["source","source_id","entry_id","amount","linked_by_id","linked_at"],"type":"object"}]},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"prepared_at":{"format":"date-time","type":"string"},"prepared_by_id":{"type":"integer"},"stale":{"type":["boolean","null"]},"status":{"enum":["prepared","filed","superseded","cancelled","amended"],"type":"string"},"tax_due":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","entity_id","jurisdiction_id","period_start","period_end","status","is_amendment","tax_due","evidence_hash","stale","figures","prepared_by_id","prepared_at","filed_by_id","filed_at","filed_on","confirmation_number","cancel_reason","payment","created_at","updated_at"],"type":"object"},"accounting_SalesTaxJurisdiction":{"additionalProperties":false,"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"files_with_id":{"type":["integer","null"]},"filing_frequency":{"enum":["monthly","quarterly","annual"],"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_demo":{"type":"boolean"},"level":{"enum":["state","county","city","special_district"],"type":"string"},"name":{"type":"string"},"parent_id":{"type":["integer","null"]},"sales_payable_account_id":{"type":["integer","null"]},"state_code":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"use_payable_account_id":{"type":["integer","null"]}},"required":["id","code","name","level","state_code","parent_id","files_with_id","filing_frequency","sales_payable_account_id","use_payable_account_id","is_demo","is_active","created_at","updated_at"],"type":"object"},"accounting_SalesTaxJurisdictionDetail":{"additionalProperties":false,"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"files_with_id":{"type":["integer","null"]},"filing_frequency":{"enum":["monthly","quarterly","annual"],"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_demo":{"type":"boolean"},"level":{"enum":["state","county","city","special_district"],"type":"string"},"name":{"type":"string"},"parent_id":{"type":["integer","null"]},"rates":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxRate"},"type":"array"},"sales_payable_account_id":{"type":["integer","null"]},"state_code":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"use_payable_account_id":{"type":["integer","null"]}},"required":["id","code","name","level","state_code","parent_id","files_with_id","filing_frequency","sales_payable_account_id","use_payable_account_id","is_demo","is_active","created_at","updated_at","rates"],"type":"object"},"accounting_SalesTaxJurisdictionInput":{"additionalProperties":false,"properties":{"code":{"pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]{0,39}$","type":"string"},"files_with_id":{"type":["integer","null"]},"filing_frequency":{"enum":["monthly","quarterly","annual"],"type":"string"},"level":{"enum":["state","county","city","special_district"],"type":"string"},"name":{"maxLength":120,"minLength":1,"type":"string"},"parent_id":{"type":["integer","null"]},"sales_payable_account_id":{"type":["integer","null"]},"state_code":{"pattern":"^[A-Za-z]{2}$","type":"string"},"use_payable_account_id":{"type":["integer","null"]}},"required":["code","name","level","state_code"],"type":"object"},"accounting_SalesTaxJurisdictionSet":{"additionalProperties":false,"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"type":"integer"},"jurisdictions":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"id":{"type":"integer"},"level":{"type":"string"},"name":{"type":"string"}},"required":["id","code","name","level"],"type":"object"},"type":"array"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","code","name","description","jurisdictions","created_at","updated_at"],"type":"object"},"accounting_SalesTaxJurisdictionUpdate":{"additionalProperties":false,"properties":{"files_with_id":{"type":["integer","null"]},"filing_frequency":{"enum":["monthly","quarterly","annual"],"type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"parent_id":{"type":["integer","null"]},"sales_payable_account_id":{"type":["integer","null"]},"use_payable_account_id":{"type":["integer","null"]}},"required":[],"type":"object"},"accounting_SalesTaxLiability":{"additionalProperties":false,"properties":{"entity_ids":{"items":{"type":"integer"},"type":["array","null"]},"from":{"format":"date","type":"string"},"jurisdictions":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxLiabilityJurisdiction"},"type":"array"},"tie_out":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxTieOut"},"type":"array"},"to":{"format":"date","type":"string"},"totals":{"additionalProperties":false,"properties":{"exempt_sales":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"sales_tax":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"taxable_sales":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"use_tax":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["sales_tax","use_tax","taxable_sales","exempt_sales"],"type":"object"}},"required":["from","to","entity_ids","jurisdictions","totals","tie_out"],"type":"object"},"accounting_SalesTaxLiabilityJurisdiction":{"additionalProperties":false,"properties":{"by_rate":{"items":{"additionalProperties":false,"properties":{"kind":{"type":"string"},"rate":{"pattern":"^\\d+\\.\\d{6}$","type":"string"},"tax":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"taxable":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["kind","rate","taxable","tax"],"type":"object"},"type":"array"},"code":{"type":"string"},"exempt_certificates":{"items":{"additionalProperties":false,"properties":{"certificate_id":{"type":"integer"},"certificate_number":{"type":"string"},"exempt_amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"party_id":{"type":"integer"}},"required":["certificate_id","certificate_number","party_id","exempt_amount"],"type":"object"},"type":"array"},"files_with_id":{"type":["integer","null"]},"jurisdiction_id":{"type":"integer"},"level":{"type":"string"},"name":{"type":"string"},"sales":{"additionalProperties":false,"properties":{"exempt":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"gross":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"nontaxable":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"tax_collected":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"tax_from_determinations":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"taxable":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["gross","taxable","exempt","nontaxable","tax_collected","tax_from_determinations"],"type":"object"},"use":{"additionalProperties":false,"properties":{"tax_accrued":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"tax_from_determinations":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"taxable_purchases":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["taxable_purchases","tax_accrued","tax_from_determinations"],"type":"object"}},"required":["jurisdiction_id","code","name","level","files_with_id","sales","use","by_rate","exempt_certificates"],"type":"object"},"accounting_SalesTaxLineReview":{"additionalProperties":false,"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bill_line_id":{"type":"integer"},"category":{"type":["string","null"]},"disposition":{"type":"string"},"line_no":{"type":"integer"},"reason":{"type":["string","null"]},"set_id":{"type":["integer","null"]},"tax":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["bill_line_id","line_no","amount","category","set_id","disposition","reason","tax"],"type":"object"},"accounting_SalesTaxMapping":{"additionalProperties":false,"properties":{"category":{"enum":["material","fixture","labor","equipment"],"type":"string"},"cost_type_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["cost_type_id","category","updated_at"],"type":"object"},"accounting_SalesTaxRate":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"effective_from":{"format":"date","type":"string"},"id":{"type":"integer"},"import_ref":{"type":["string","null"]},"jurisdiction_code":{"type":["string","null"]},"jurisdiction_id":{"type":"integer"},"needs_review":{"type":"boolean"},"review_note":{"type":["string","null"]},"reviewed_at":{"format":"date-time","type":["string","null"]},"reviewed_by_id":{"type":["integer","null"]},"sales_rate":{"pattern":"^\\d+\\.\\d{6}$","type":"string"},"source":{"enum":["csv","provider","seed"],"type":"string"},"source_citation":{"type":["string","null"]},"use_rate":{"pattern":"^\\d+\\.\\d{6}$","type":"string"},"used":{"type":"boolean"},"used_at":{"format":"date-time","type":["string","null"]}},"required":["id","jurisdiction_id","jurisdiction_code","effective_from","sales_rate","use_rate","source","source_citation","import_ref","needs_review","reviewed_by_id","reviewed_at","review_note","used","used_at","created_by_id","created_at"],"type":"object"},"accounting_SalesTaxRateImportResult":{"additionalProperties":false,"properties":{"created":{"type":"integer"},"dry_run":{"type":"boolean"},"errors":{"items":{"additionalProperties":false,"properties":{"line":{"type":"integer"},"message":{"type":"string"}},"required":["line","message"],"type":"object"},"type":"array"},"jurisdictions_created":{"type":"integer"},"rows":{"items":{"properties":{"action":{"enum":["create","unchanged"],"type":"string"},"create":{"type":"object"},"effective_from":{"format":"date","type":"string"},"jurisdiction_code":{"type":"string"},"line":{"type":"integer"},"sales_rate":{"type":"string"},"source_citation":{"type":["string","null"]},"use_rate":{"type":"string"}},"required":["line","jurisdiction_code","effective_from","sales_rate","use_rate","action"],"type":"object"},"type":"array"},"sha256":{"type":"string"},"unchanged":{"type":"integer"}},"required":["dry_run","sha256","created","unchanged","jurisdictions_created","errors","rows"],"type":"object"},"accounting_SalesTaxRule":{"additionalProperties":false,"properties":{"category":{"enum":["material","fixture","labor","equipment","any"],"type":"string"},"contract_nature":{"enum":["real_property","retail_sale","any"],"type":"string"},"contract_type":{"enum":["lump_sum","time_and_materials","any"],"type":"string"},"contractor_role":{"enum":["consumer","retailer"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"effective_from":{"format":"date","type":"string"},"effective_to":{"format":"date","type":["string","null"]},"id":{"type":"integer"},"jurisdiction_id":{"type":"integer"},"needs_review":{"type":"boolean"},"note":{"type":["string","null"]},"sales_taxable":{"type":"boolean"},"source_citation":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"use_taxable":{"type":"boolean"},"used":{"type":"boolean"}},"required":["id","jurisdiction_id","contract_nature","contract_type","category","contractor_role","sales_taxable","use_taxable","effective_from","effective_to","note","source_citation","needs_review","used","created_at","updated_at"],"type":"object"},"accounting_SalesTaxSettings":{"additionalProperties":false,"properties":{"home_jurisdiction_set_id":{"type":["integer","null"]},"rounding":{"enum":["line","invoice"],"type":"string"},"sales_payable_account_id":{"type":["integer","null"]},"use_payable_account_id":{"type":["integer","null"]}},"required":["rounding","sales_payable_account_id","use_payable_account_id","home_jurisdiction_set_id"],"type":"object"},"accounting_SalesTaxSettingsInput":{"additionalProperties":false,"properties":{"home_jurisdiction_set_id":{"type":["integer","null"]},"rounding":{"enum":["line","invoice"],"type":"string"},"sales_payable_account_id":{"type":["integer","null"]},"use_payable_account_id":{"type":["integer","null"]}},"required":[],"type":"object"},"accounting_SalesTaxSite":{"additionalProperties":false,"properties":{"address_line1":{"type":"string"},"city":{"type":"string"},"contract_nature":{"enum":["real_property","retail_sale"],"type":"string"},"contract_type":{"enum":["lump_sum","time_and_materials"],"type":"string"},"default_category":{"enum":["material","fixture","labor","equipment"],"type":"string"},"jurisdiction_set_id":{"type":"integer"},"postal_code":{"type":"string"},"project_id":{"type":"integer"},"region":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"updated_by_id":{"type":"integer"}},"required":["project_id","jurisdiction_set_id","address_line1","city","region","postal_code","contract_type","contract_nature","default_category","updated_by_id","updated_at"],"type":"object"},"accounting_SalesTaxTieOut":{"additionalProperties":false,"properties":{"account_id":{"type":"integer"},"filing_payments":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"gl_movement":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"name":{"type":"string"},"number":{"type":"string"},"other":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"other_entries":{"items":{"additionalProperties":false,"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"entry_id":{"type":"integer"},"number":{"type":"string"},"source_type":{"type":"string"}},"required":["entry_id","number","source_type","amount"],"type":"object"},"type":"array"},"tagged_tax":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["account_id","number","name","gl_movement","tagged_tax","filing_payments","other","other_entries"],"type":"object"},"accounting_Scenario":{"properties":{"adjustments":{"items":{"$ref":"#/components/schemas/accounting_Adjustment"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"description":{"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["base","upside","downside","custom"]},"name":{"type":"string"}},"required":["id","name","kind","description","created_by_id","created_at"],"type":"object"},"accounting_Settings":{"properties":{"base_currency":{"type":"string"},"cecl_policy":{"additionalProperties":false,"description":"ASC 326 (CECL) loss-rate policy used by the cecl_allowance report and posting; null = not set (the allowance refuses with 422).","properties":{"ar_rates":{"additionalProperties":false,"properties":{"current":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"},"d1_30":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"},"d31_60":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"},"d61_90":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"},"d91_plus":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"},"disputed":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"}},"required":["current","d1_30","d31_60","d61_90","d91_plus","disputed"],"type":"object"},"contract_asset_rate":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"},"retainage_rate":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"}},"required":["ar_rates","retainage_rate","contract_asset_rate"],"type":["object","null"]},"company_id":{"minimum":1,"type":"integer"},"control_accounts":{"items":{"properties":{"account_id":{"minimum":1,"type":["integer","null"]},"account_name":{"type":["string","null"]},"account_number":{"type":["string","null"]},"label":{"type":"string"},"role":{"type":"string"}},"required":["role","label","account_id","account_number","account_name"],"type":"object"},"type":"array"},"default_entity_id":{"minimum":1,"type":["integer","null"]},"finance_charge_account_id":{"description":"Income account finance-charge invoices credit","type":["integer","null"]},"finance_charge_grace_days":{"description":"Days past due before a finance charge applies","type":"integer"},"finance_charge_monthly_pct":{"description":"Monthly finance charge percent on past-due AR; null = none","type":["string","null"]},"fiscal_year_start_month":{"maximum":12,"minimum":1,"type":"integer"},"loss_provision_unit":{"description":"Loss provision unit of account (ASU 2016-20 election), recorded on each WIP row (lossProvisionUnit). Each WIP row is one contract with a single performance obligation.","enum":["contract","performance_obligation"],"type":"string"},"posting_method":{"description":"Stored and echoed only: every report is accrual basis. Cash-basis reporting is not built yet.","enum":["accrual"]},"recon_adjustment_limit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"require_approval_above":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"require_mfa_for":{"description":"Flags that refuse a session or token whose user has no MFA (403 mfa_required).","items":{"enum":["view_ledger","post_journal","approve_journal","manage_coa","close_period","ap_enter","ap_approve","release_payments","manage_vendor_banking","ar_enter","ar_approve","payroll_view","payroll_run","view_payroll_pii","bank_reconcile","manage_integrations","manage_grants","job_forecast_edit"]},"type":"array"},"require_mfa_for_accounting":{"description":"Every accounting call needs MFA; the accounting pages send a user without a factor to enrol.","type":"boolean"},"scheduler_user_id":{"description":"User the daily accounting jobs (recurring entries, auto-reversals, lease runs) run and are audited as; null = the first active company admin, flagged on the accounting home page. Must be an active company user with post_journal for every entity (422); only an accounting owner or a user who manages grants may change it (403).","type":["integer","null"]},"sod_mode":{"description":"strict (default): a maker never approves their own document. small_team: a maker may approve or release their own bill, payment run or journal entry with a reason, flagged self_approved.","enum":["strict","small_team"]},"step_up_minutes":{"description":"How long an authenticator re-entry (step-up) stays valid. Default 10.","maximum":60,"minimum":1,"type":"integer"},"timezone":{"description":"IANA time zone that decides the company's today: recurring and auto-reversal runs and every date default (form dates, report and REST as_of/to, void and reversal dates), never the UTC date. E.g. America/Los_Angeles","type":"string"},"transfer_approval_above":{"description":"Bank transfers at or above this amount wait for a second person holding release_payments; null = require_approval_above when that is set, else no amount rule.","pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"transfer_approval_cross_entity":{"description":"Bank transfers between entities wait for a second person holding release_payments (default true).","type":"boolean"},"updated_at":{"format":"date-time","type":"string"}},"required":["company_id","base_currency","fiscal_year_start_month","default_entity_id","posting_method","require_approval_above","recon_adjustment_limit","timezone","loss_provision_unit","cecl_policy","control_accounts","updated_at","finance_charge_monthly_pct","finance_charge_grace_days","finance_charge_account_id","sod_mode","scheduler_user_id","require_mfa_for","require_mfa_for_accounting","step_up_minutes"],"type":"object"},"accounting_Settlement":{"properties":{"approved_at":{"format":"date-time","type":["string","null"]},"approved_by_id":{"minimum":1,"type":["integer","null"]},"as_of":{"format":"date","type":"string"},"cancel_reason":{"type":["string","null"]},"cash_accounts":{"type":["object","null"]},"entry_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"evidence_hash":{"type":"string"},"id":{"minimum":1,"type":"integer"},"lines":{"items":{"properties":{"account_id":{"minimum":1,"type":"integer"},"counterparty_entity_id":{"minimum":1,"type":["integer","null"]},"credit":{"description":"Decimal string with two places","type":"string"},"debit":{"description":"Decimal string with two places","type":"string"},"entity_id":{"minimum":1,"type":"integer"}},"type":"object"},"type":"array"},"mode":{"enum":["cash","netting"],"type":"string"},"pairs":{"items":{"properties":{"amount":{"description":"Decimal string with two places","type":"string"},"entity_a_id":{"minimum":1,"type":"integer"},"entity_b_id":{"minimum":1,"type":"integer"}},"type":"object"},"type":"array"},"prepared_at":{"format":"date-time","type":"string"},"prepared_by_id":{"minimum":1,"type":"integer"},"skipped":{"items":{"properties":{"entity_a_id":{"minimum":1,"type":"integer"},"entity_b_id":{"minimum":1,"type":"integer"},"reason":{"type":"string"}},"type":"object"},"type":"array"},"status":{"enum":["prepared","posted","cancelled","superseded"],"type":"string"},"unchanged":{"type":"boolean"}},"required":["id","as_of","mode","status","lines"],"type":"object"},"accounting_Setup":{"properties":{"account_map":{"items":{"properties":{"account_number":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label","account_number"],"type":"object"},"type":"array"},"ach_account_masked":{"type":["string","null"]},"ach_bank_name":{"type":["string","null"]},"ach_odfi_routing":{"type":["string","null"]},"burden_method":{"type":"string"},"burden_true_up_to":{"enum":["jobs","overhead"],"type":"string"},"default_ot_rule_set":{"type":"string"},"employer_address":{"type":["string","null"]},"employer_city":{"type":["string","null"]},"employer_ein_masked":{"type":["string","null"]},"employer_name":{"type":["string","null"]},"employer_state":{"type":["string","null"]},"employer_zip":{"type":["string","null"]},"filed_periods":{"description":"Filed payroll return periods: 2026-Q1 (941 / state UI) and 2026 (W-2 / 940)","items":{"type":"string"},"type":"array"},"local_flat_rates":{"additionalProperties":{"type":"string"},"description":"Stub rates for localities without built-in data, keyed ST:City","type":"object"},"per_diem_accountable":{"type":"boolean"},"per_diem_federal_rate":{"type":["string","null"]},"sdi_rates":{"additionalProperties":{"type":"string"},"description":"Company-confirmed SDI/PFML rates keyed ST:Program:employee or ST:Program:employer (e.g. WA:PFML:employee), used where the built-in dataset has no rate or the rate depends on employer size","type":"object"},"standard_burden_rate":{"type":["string","null"]},"state_account_ids":{"additionalProperties":{"properties":{"ui":{"type":"string"},"withholding":{"type":"string"}},"required":["withholding","ui"],"type":"object"},"description":"State employer account numbers for EFW2 RS records, keyed by state","type":"object"},"state_flat_rates":{"additionalProperties":{"type":"string"},"type":"object"},"suta_rate":{"type":["string","null"]},"suta_rates":{"additionalProperties":{"properties":{"rate":{"type":"string"},"wage_base":{"type":["string","null"]}},"type":"object"},"description":"SUTA rate and wage base per state; a check uses its localization state","type":"object"},"suta_state":{"type":["string","null"]},"suta_wage_base":{"description":"Decimal string","type":["string","null"]},"tax_provider":{"type":"string"},"tax_providers":{"items":{"type":"string"},"type":"array"}},"required":["tax_provider","tax_providers","burden_method","default_ot_rule_set","suta_state","suta_rate","suta_wage_base","state_flat_rates","account_map","employer_ein_masked","employer_name","employer_address","employer_city","employer_state","employer_zip","ach_odfi_routing","ach_bank_name","ach_account_masked","local_flat_rates","sdi_rates","standard_burden_rate","burden_true_up_to","per_diem_accountable","per_diem_federal_rate","state_account_ids"],"type":"object"},"accounting_SignoffStatus":{"enum":["current","awaiting_evidence","expired","outdated","revoked","not_reviewed"],"type":"string"},"accounting_Snapshot":{"properties":{"as_of":{"format":"date","type":"string"},"bank_gl_account_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"bucket_count":{"type":"integer"},"closing":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"content_hash":{"pattern":"^[0-9a-f]{64}$","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"entity_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"granularity":{"enum":["week","month"]},"id":{"minimum":1,"type":"integer"},"inflows":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"lines":{"items":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"basis":{"type":"string"},"bucket":{"type":"integer"},"date":{"format":"date","type":"string"},"label":{"type":"string"},"party_id":{"minimum":1,"type":["integer","null"]},"project_id":{"minimum":1,"type":["integer","null"]},"ref_id":{"minimum":1,"type":["integer","null"]},"ref_type":{"type":["string","null"]},"source":{"enum":["ar","ar_retainage","billing","ap","ap_run","ap_retainage","commitment","payroll","recurring","scheduled","debt","lease","manual","scenario"]}},"required":["bucket","date","amount","source","label","ref_type","ref_id","project_id","party_id","basis"],"type":"object"},"type":"array"},"name":{"type":"string"},"opening":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"outflows":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"params":{"type":"object"},"scenario_id":{"minimum":1,"type":["integer","null"]}},"required":["id","name","as_of","granularity","bucket_count","scenario_id","entity_ids","bank_gl_account_ids","opening","inflows","outflows","closing","content_hash","created_by_id","created_at","params"],"type":"object"},"accounting_StatementImport":{"properties":{"bank_account_id":{"type":"integer"},"closing_balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"duplicate_count":{"type":"integer"},"file_name":{"type":["string","null"]},"format":{"enum":["csv","ofx","bai2","camt053","feed"],"type":"string"},"id":{"type":"integer"},"line_count":{"type":"integer"},"opening_balance":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"statement_end":{"format":"date","type":["string","null"]},"statement_start":{"format":"date","type":["string","null"]},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["id","bank_account_id","format","file_name","statement_start","statement_end","opening_balance","closing_balance","line_count","duplicate_count","warnings","created_at"],"type":"object"},"accounting_StatementLine":{"properties":{"amount":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bank_account_id":{"type":"integer"},"bank_txn_id":{"type":["string","null"]},"check_number":{"type":["string","null"]},"date":{"format":"date","type":"string"},"description":{"type":"string"},"feed_note":{"description":"Set when the live feed changed or removed this line after it was matched; cleared by Mark reviewed or unmatch.","type":["string","null"]},"id":{"type":"integer"},"import_id":{"type":"integer"},"journal_line_ids":{"items":{"type":"integer"},"type":"array"},"match_confidence":{"type":["string","null"]},"match_source":{"type":["string","null"]},"matched_at":{"format":"date-time","type":["string","null"]},"reference":{"type":["string","null"]},"rule_id":{"type":["integer","null"]},"status":{"enum":["unmatched","matched","ignored"],"type":"string"},"type_code":{"type":["string","null"]}},"required":["id","bank_account_id","import_id","date","amount","description","reference","check_number","bank_txn_id","type_code","status","match_source","match_confidence","rule_id","matched_at","journal_line_ids","feed_note"],"type":"object"},"accounting_Structure":{"properties":{"as_of":{"format":"date","type":"string"},"members":{"items":{"properties":{"code":{"type":["string","null"]},"entity_id":{"minimum":1,"type":"integer"},"group_share_pct":{"type":"string"},"method":{"enum":["root","full"],"type":"string"},"name":{"type":["string","null"]},"nci_pct":{"type":"string"},"ownership_id":{"minimum":1,"type":["integer","null"]},"ownership_pct":{"type":["string","null"]},"parent_entity_id":{"minimum":1,"type":["integer","null"]}},"type":"object"},"type":"array"},"outside":{"items":{"properties":{"code":{"type":["string","null"]},"entity_id":{"minimum":1,"type":"integer"},"name":{"type":["string","null"]},"ownership_id":{"minimum":1,"type":["integer","null"]},"ownership_pct":{"type":["string","null"]},"parent_entity_id":{"minimum":1,"type":["integer","null"]},"reason":{"enum":["equity","cost","none","under_excluded"],"type":"string"}},"type":"object"},"type":"array"}},"required":["as_of","members","outside"],"type":"object"},"accounting_Suggestion":{"properties":{"account_id":{"type":["integer","null"]},"confidence":{"enum":["high","medium","low"],"type":"string"},"cost_code_id":{"type":["integer","null"]},"items":{"items":{"properties":{"amount":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"date":{"format":"date","type":"string"},"journal_line_id":{"type":"integer"},"text":{"type":"string"}},"required":["journal_line_id","date","amount","text"],"type":"object"},"type":"array"},"journal_line_ids":{"items":{"type":"integer"},"type":"array"},"memo":{"type":["string","null"]},"project_id":{"type":["integer","null"]},"reason":{"type":"string"},"rule_id":{"type":["integer","null"]},"source":{"enum":["match","rule"],"type":"string"},"vendor_id":{"type":["integer","null"]}},"required":["source","confidence","reason","journal_line_ids","items","rule_id","account_id","project_id","cost_code_id","vendor_id","memo"],"type":"object"},"accounting_SyncRun":{"additionalProperties":false,"properties":{"created_at":{"type":"string"},"errors":{"items":{"additionalProperties":false,"properties":{"entity":{"type":"string"},"id":{"type":["string","null"]},"message":{"type":"string"}},"required":["entity","id","message"],"type":"object"},"type":"array"},"finished_at":{"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"import_run_ids":{"description":"Staged import runs; they apply through the normal two-person import review.","items":{"type":"integer"},"type":"array"},"started_at":{"type":["string","null"]},"stats":{"additionalProperties":{"type":"integer"},"type":"object"},"status":{"enum":["queued","running","succeeded","failed"]}},"required":["id","status","started_at","finished_at","stats","errors","import_run_ids","created_at"],"type":"object"},"accounting_TaxCode":{"properties":{"code":{"type":"string"},"components":{"items":{"properties":{"account_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"rate":{"description":"Decimal rate or quantity as a string, 6 dp","pattern":"^-?\\d+\\.\\d{6}$","type":"string"}},"required":["id","name","rate","account_id"],"type":"object"},"type":"array"},"id":{"minimum":1,"type":"integer"},"is_active":{"type":"boolean"},"kind":{"enum":["sales","use"]},"name":{"type":"string"},"total_rate":{"description":"Decimal rate or quantity as a string, 6 dp","pattern":"^-?\\d+\\.\\d{6}$","type":"string"}},"required":["id","code","name","kind","is_active","total_rate","components"],"type":"object"},"accounting_TaxExemptionCertificate":{"additionalProperties":false,"properties":{"certificate_number":{"type":"string"},"customer_id":{"type":"integer"},"effective_from":{"format":"date","type":"string"},"expires_on":{"format":"date","nullable":true,"type":"string"},"id":{"type":"integer"},"reason":{"type":"string"},"state_code":{"pattern":"^[A-Z]{2}$","type":"string"}},"required":["id","customer_id","state_code","certificate_number","reason","effective_from","expires_on"],"type":"object"},"accounting_Term":{"properties":{"code":{"type":"string"},"discount_days":{"type":["integer","null"]},"discount_percent":{"description":"Decimal rate or quantity as a string, 6 dp","pattern":"^-?\\d+\\.\\d{6}$","type":["string","null"]},"due_days":{"type":"integer"},"id":{"minimum":1,"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"}},"required":["id","code","name","due_days","discount_percent","discount_days","is_active"],"type":"object"},"accounting_TimeLine":{"properties":{"classification":{"type":["string","null"]},"cost_code_id":{"type":["integer","null"]},"date":{"type":"string"},"employee_id":{"type":"integer"},"hours":{"type":"string"},"id":{"type":"integer"},"locality":{"type":["string","null"]},"per_diem":{"type":["string","null"]},"per_diem_away":{"type":"boolean"},"per_diem_high_cost":{"type":"boolean"},"project_id":{"type":["integer","null"]},"rate":{"type":["string","null"]},"timecard_entry_id":{"type":["integer","null"]},"wc_class_code":{"description":"Workers' comp class override for this line","type":["string","null"]},"work_state":{"type":["string","null"]}},"required":["id","employee_id","date","hours","project_id","cost_code_id","classification","work_state","rate","timecard_entry_id","locality","per_diem","per_diem_high_cost","per_diem_away"],"type":"object"},"accounting_Totals":{"properties":{"actual":{"$ref":"#/components/schemas/accounting_Money"},"committed":{"$ref":"#/components/schemas/accounting_Money"},"costToComplete":{"$ref":"#/components/schemas/accounting_Money"},"eac":{"$ref":"#/components/schemas/accounting_Money"},"exposure":{"$ref":"#/components/schemas/accounting_Money"},"openCommitments":{"$ref":"#/components/schemas/accounting_Money"},"remainingCommitments":{"$ref":"#/components/schemas/accounting_Money"},"revisedBudget":{"$ref":"#/components/schemas/accounting_Money"},"variance":{"$ref":"#/components/schemas/accounting_Money"}},"required":["revisedBudget","actual","remainingCommitments","exposure","costToComplete","eac","variance"],"type":"object"},"accounting_Transfer":{"properties":{"buyer_asset_account_id":{"minimum":1,"type":"integer"},"buyer_entity_id":{"minimum":1,"type":"integer"},"buyer_expense_account_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"depreciation_start":{"format":"date","type":["string","null"]},"events":{"items":{"properties":{"created_by_id":{"minimum":1,"type":"integer"},"event_date":{"format":"date","type":"string"},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["sold","disposed"],"type":"string"},"note":{"type":["string","null"]},"percent":{"type":"string"}},"type":"object"},"type":"array"},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["fixed_asset","inventory"],"type":"string"},"memo":{"type":["string","null"]},"sale_amount":{"description":"Decimal string with two places","type":"string"},"seller_cost":{"description":"Decimal string with two places","type":"string"},"seller_cost_account_id":{"minimum":1,"type":["integer","null"]},"seller_entity_id":{"minimum":1,"type":"integer"},"seller_gain_account_id":{"minimum":1,"type":"integer"},"status":{"properties":{"as_of":{"format":"date","type":"string"},"deferred":{"description":"Decimal string with two places","type":"string"},"profit":{"description":"Decimal string with two places","type":"string"},"recognized":{"description":"Decimal string with two places","type":"string"}},"type":"object"},"transfer_date":{"format":"date","type":"string"},"useful_life_months":{"type":["integer","null"]},"void_reason":{"type":["string","null"]},"voided":{"type":"boolean"},"voided_at":{"format":"date-time","type":["string","null"]}},"required":["id","kind","seller_entity_id","buyer_entity_id","transfer_date","sale_amount","seller_cost","status"],"type":"object"},"accounting_Translation":{"properties":{"as_of":{"format":"date","type":"string"},"cta":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"entity_id":{"type":"integer"},"functional_currency":{"pattern":"^[A-Z]{3}$","type":"string"},"lines":{"items":{"properties":{"account_id":{"type":"integer"},"name":{"type":["string","null"]},"net":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"number":{"type":["string","null"]},"type":{"type":["string","null"]}},"required":["account_id","net"],"type":"object"},"type":"array"},"net_income":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"rates":{"items":{"type":"string"},"type":"array"},"reporting_currency":{"pattern":"^[A-Z]{3}$","type":"string"}},"required":["entity_id","as_of","functional_currency","reporting_currency","lines","cta","net_income","rates"],"type":"object"},"accounting_TrialBalance":{"properties":{"as_of":{"format":"date","type":"string"},"entity_id":{"minimum":1,"type":["integer","null"]},"from":{"format":"date","type":["string","null"]},"group_by":{"enum":["entity","project","department","cost_code",null]},"rows":{"items":{"properties":{"account_id":{"minimum":1,"type":"integer"},"account_name":{"type":"string"},"account_number":{"type":"string"},"account_type":{"enum":["bank","cash","accounts_receivable","retainage_receivable","contract_asset","other_current_asset","inventory","fixed_asset","accumulated_depreciation","other_asset","accounts_payable","retainage_payable","contract_liability","credit_card","payroll_liability","sales_tax_payable","other_current_liability","long_term_liability","equity","retained_earnings","income","other_income","cost_of_revenue","expense","other_expense"]},"credit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"debit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"dimension_id":{"minimum":1,"type":["integer","null"]},"net_credit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"net_debit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"normal_balance":{"enum":["debit","credit"]}},"required":["account_id","account_number","account_name","account_type","normal_balance","dimension_id","debit","credit","net_debit","net_credit"],"type":"object"},"type":"array"},"totals":{"properties":{"credit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"debit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"net_credit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"net_debit":{"description":"Decimal amount as a string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["debit","credit","net_debit","net_credit"],"type":"object"}},"required":["as_of","from","entity_id","group_by","rows","totals"],"type":"object"},"accounting_UnionLocal":{"properties":{"cba_rules":{"description":"CBA day rules: weekday 0 = Sunday ... 6 = Saturday","properties":{"day_multipliers":{"additionalProperties":{"enum":["1.5","2"],"type":"string"},"type":"object"},"holiday_multiplier":{"enum":["1.5","2"],"type":"string"},"holidays":{"items":{"format":"date","type":"string"},"type":"array"}},"type":["object","null"]},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"rates":{"items":{"$ref":"#/components/schemas/accounting_UnionRate"},"type":"array"},"remit_to":{"type":["string","null"]}},"required":["id","code","name","remit_to","cba_rules","rates"],"type":"object"},"accounting_UnionRate":{"properties":{"apprentice_ratio":{"type":["string","null"]},"benefits":{"items":{"description":"CBA benefit rule (prevailing.ts BenefitRule). `plan` classifies the fund for the W-2: retirement checks box 13; an employer fringe without `plan` blocks the EFW2 file unless another retirement contribution settles box 13.","properties":{"amount":{"type":["string","number"]},"basis":{"enum":["per_hour","pct_gross","per_day"],"type":"string"},"code":{"type":"string"},"fund":{"type":"string"},"kind":{"enum":["employer_fringe","employee_deduction"],"type":"string"},"local":{"type":"string"},"plan":{"enum":["retirement","health","other"],"type":"string"},"reciprocal":{"type":"boolean"}},"type":"object"},"type":"array"},"classification":{"type":"string"},"effective_from":{"type":"string"},"effective_to":{"type":["string","null"]},"id":{"type":"integer"},"local_id":{"type":"integer"},"wage":{"type":"string"},"zone":{"type":["string","null"]}},"required":["id","local_id","classification","zone","effective_from","effective_to","wage","benefits","apprentice_ratio"],"type":"object"},"accounting_UserRef":{"properties":{"id":{"type":"integer"},"name":{"type":["string","null"]}},"required":["id","name"],"type":"object"},"accounting_WageDetermination":{"properties":{"apprentice_ratio":{"type":["string","null"]},"awarding_body":{"type":["string","null"]},"bhr":{"type":"string"},"classification":{"type":"string"},"county":{"type":["string","null"]},"dir_project_id":{"type":["string","null"]},"effective_from":{"type":"string"},"effective_to":{"type":["string","null"]},"fringe":{"type":"string"},"id":{"type":"integer"},"project_id":{"type":"integer"},"wd_number":{"type":"string"}},"required":["id","project_id","wd_number","county","classification","bhr","fringe","effective_from","effective_to","apprentice_ratio","dir_project_id","awarding_body"],"type":"object"},"accounting_WcClass":{"properties":{"code":{"type":"string"},"effective_from":{"type":"string"},"exclude_ot_premium":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"rate_per_100":{"type":["string","null"]},"rate_per_hour":{"type":["string","null"]},"state":{"type":"string"}},"required":["id","state","code","name","rate_per_100","rate_per_hour","exclude_ot_premium","effective_from"],"type":"object"},"accounting_WipSnapshot":{"properties":{"approved_at":{"format":"date-time","nullable":true,"type":"string"},"approved_by_id":{"nullable":true,"type":"integer"},"billed_to_date":{"$ref":"#/components/schemas/accounting_Money"},"earned_to_date":{"$ref":"#/components/schemas/accounting_Money"},"entity_id":{"type":"integer"},"exceptions":{"description":"Exceptions on the snapshot. not_assigned / no_executed_prime_contract: jobs with posted job cost or billings in the entity through the period end that WIP leaves out (inactive or completed jobs excluded). contract_unverified: rows whose contract source changed after the period end with no earlier revision of the period, computed at today's contract value. These three are acknowledged with exceptions_note at approval. contract_value_missing: an executed prime contract with no value (no SOV keyed) against a positive EAC, on a job not on completed_contract; it has no row and blocks approval like compute_failed. compute_failed: a job whose inputs failed (forecast coverage, a pending PM input, negative cost; see message); it has no row and blocks approval until a new revision resolves it. A project-scoped (PM) grant sees only its projects' exceptions.","items":{"properties":{"billed":{"$ref":"#/components/schemas/accounting_Money"},"cost":{"$ref":"#/components/schemas/accounting_Money"},"message":{"description":"Why the job could not compute (compute_failed, contract_value_missing)","type":"string"},"name":{"type":"string"},"project_id":{"type":"integer"},"reason":{"enum":["not_assigned","no_executed_prime_contract","contract_unverified","contract_value_missing","compute_failed"]}},"required":["project_id","name","reason","cost","billed"],"type":"object"},"type":"array"},"exceptions_acknowledged_at":{"format":"date-time","nullable":true,"type":"string"},"exceptions_acknowledged_by_id":{"nullable":true,"type":"integer"},"exceptions_note":{"description":"The approver's acknowledgment of the exceptions; null for a project-scoped (PM) grant, since it may name other jobs.","nullable":true,"type":"string"},"id":{"type":"integer"},"journal_entry_id":{"nullable":true,"type":"integer"},"journal_entry_number":{"nullable":true,"type":"string"},"loss_provision":{"$ref":"#/components/schemas/accounting_Money"},"overbillings":{"$ref":"#/components/schemas/accounting_Money"},"period_end":{"format":"date","type":"string"},"period_id":{"type":"integer"},"posted_at":{"format":"date-time","nullable":true,"type":"string"},"prepared_by_id":{"type":"integer"},"revised_contract":{"$ref":"#/components/schemas/accounting_Money"},"revision":{"minimum":1,"type":"integer"},"rows":{"description":"Job rows. The list (GET .../jobcost/wip) returns only project_id, eac_override and override_reason per row (changed: it returned full rows before; see CHANGELOG); the snapshot (GET .../wip/{id}) returns the full row with its explain trace.","items":{"properties":{"billedToDate":{"$ref":"#/components/schemas/accounting_Money"},"costToDate":{"$ref":"#/components/schemas/accounting_Money"},"costToDatePoc":{"$ref":"#/components/schemas/accounting_Money"},"eac":{"$ref":"#/components/schemas/accounting_Money"},"eac_override":{"nullable":true,"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"earnedToDate":{"$ref":"#/components/schemas/accounting_Money"},"excludedFromProgress":{"$ref":"#/components/schemas/accounting_Money"},"flags":{"description":"Includes contract_frozen when a contract source changed after the period end and an earlier revision's contract value is kept, contract_unverified when no earlier revision exists and today's value is used, or unforecast_budget when the live forecast EAC uses revised budget not yet backed by cost, commitments or a PM input","items":{"type":"string"},"type":"array"},"lossProvision":{"$ref":"#/components/schemas/accounting_Money"},"lossProvisionUnit":{"enum":["contract","performance_obligation"]},"name":{"type":"string"},"overbillings":{"$ref":"#/components/schemas/accounting_Money"},"override_reason":{"nullable":true,"type":"string"},"pendingChangeOrders":{"$ref":"#/components/schemas/accounting_Money","description":"Memo: pending prime COs, never in the transaction price"},"percentComplete":{"type":"string"},"project_id":{"type":"integer"},"retainageContractAsset":{"$ref":"#/components/schemas/accounting_Money"},"retainageReceivable":{"$ref":"#/components/schemas/accounting_Money"},"revisedContract":{"$ref":"#/components/schemas/accounting_Money"},"totalAnticipatedLoss":{"$ref":"#/components/schemas/accounting_Money"},"underbillings":{"$ref":"#/components/schemas/accounting_Money"},"variableConsideration":{"$ref":"#/components/schemas/accounting_Money"},"variable_consideration":{"description":"Change orders included in the transaction price at compute, with the constraint rationale","items":{"properties":{"change_order_id":{"type":"integer"},"include_amount":{"$ref":"#/components/schemas/accounting_Money"},"number":{"type":"string"},"priced_amount":{"$ref":"#/components/schemas/accounting_Money"},"rationale":{"type":"string"},"title":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"}},"required":["project_id"],"type":"object"},"type":"array"},"status":{"enum":["draft","approved","posted","superseded","rejected"]},"underbillings":{"$ref":"#/components/schemas/accounting_Money"}},"required":["id","entity_id","period_id","period_end","revision","status","underbillings","overbillings","loss_provision","rows"],"type":"object"},"accounting_YearEndClose":{"properties":{"fiscal_year":{"properties":{"end_date":{"format":"date","type":"string"},"id":{"type":"integer"},"start_date":{"format":"date","type":"string"},"status":{"enum":["open","soft_closed","closed"]},"year":{"type":"integer"}},"type":"object"},"journal_entry":{"$ref":"#/components/schemas/accounting_JournalEntryShow"}},"type":"object"},"action_plans_ItemStatus":{"properties":{"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"status":{"enum":["open","in_progress","delayed","closed"],"type":"string"}},"required":["id","name","status"],"type":"object"},"action_plans_PartyPerson":{"nullable":true,"properties":{"first_name":{"type":"string"},"id":{"type":"integer"},"is_employee":{"type":"boolean"},"last_name":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"},"user_id":{"type":"integer"}},"required":["id","name"],"type":"object"},"action_plans_PlanItem":{"properties":{"assignments":{"items":{"$ref":"#/components/schemas/action_plans_PlanItemAssignment"},"type":"array"},"blocking":{"properties":{"blockers":{"items":{"properties":{"assignment_ids":{"items":{"type":"integer"},"type":"array"},"item_id":{"type":"integer"},"title":{"type":"string"}},"required":["item_id","title","assignment_ids"],"type":"object"},"type":"array"},"is_locked":{"type":"boolean"}},"required":["is_locked","blockers"],"type":"object"},"created_at":{"nullable":true,"type":"string"},"description":{"type":"string"},"due_at":{"nullable":true,"type":"string"},"holding_configuration_required":{"type":"boolean"},"holding_scope":{"enum":["none","section","plan",null],"nullable":true,"type":"string"},"holding_type":{"nullable":true,"type":"string"},"id":{"type":"integer"},"notes":{"type":"string"},"plan_id":{"type":"integer"},"plan_item_assignees":{"items":{"$ref":"#/components/schemas/action_plans_PlanItemAssignee"},"type":"array"},"plan_section_id":{"nullable":true,"type":"integer"},"position":{"type":"integer"},"record_type":{"nullable":true,"type":"string"},"ref_id":{"nullable":true,"type":"integer"},"ref_tool_slug":{"nullable":true,"type":"string"},"required_record":{"nullable":true,"properties":{"display":{"type":"string"},"id":{"type":"integer"},"satisfied":{"type":"boolean"},"status":{"nullable":true,"type":"string"},"tool_slug":{"type":"string"},"type_label":{"type":"string"},"url":{"type":"string"}},"required":["tool_slug","type_label","id","display","status","satisfied","url"],"type":"object"},"requirement_satisfied":{"nullable":true,"type":"boolean"},"sign_off":{"$ref":"#/components/schemas/action_plans_PlanItemSignOff"},"signed_off":{"type":"boolean"},"status":{"$ref":"#/components/schemas/action_plans_ItemStatus"},"template_item_id":{"nullable":true,"type":"integer"},"title":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","plan_id","title","status"],"type":"object"},"action_plans_PlanItemAssignee":{"properties":{"id":{"type":"integer"},"is_holding":{"type":"boolean"},"is_locked":{"type":"boolean"},"party":{"$ref":"#/components/schemas/action_plans_PartyPerson"}},"type":"object"},"action_plans_PlanItemAssignment":{"properties":{"acting_user_id":{"nullable":true,"type":"integer"},"assignee_id":{"type":"integer"},"id":{"type":"integer"},"note":{"nullable":true,"type":"string"},"party":{"$ref":"#/components/schemas/action_plans_PartyPerson"},"required":{"type":"boolean"},"signed_off_at":{"nullable":true,"type":"string"},"signed_off_by_id":{"nullable":true,"type":"integer"},"verification_method":{"nullable":true,"type":"string"}},"required":["id","assignee_id","required","verification_method","party","signed_off_by_id","acting_user_id","signed_off_at","note"],"type":"object"},"action_plans_PlanItemSignOff":{"nullable":true,"properties":{"note":{"type":"string"},"signed_off_at":{"nullable":true,"type":"string"},"signed_off_by":{"$ref":"#/components/schemas/action_plans_PartyPerson"}},"type":"object"},"action_plans_PlanListItem":{"properties":{"closed_item_count":{"type":"integer"},"created_at":{"type":"string"},"deleted":{"type":"boolean"},"deleted_at":{"nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"full_number":{"nullable":true,"type":"string"},"id":{"type":"integer"},"manager":{"$ref":"#/components/schemas/action_plans_PartyPerson"},"number":{"nullable":true,"type":"integer"},"plan_status":{"$ref":"#/components/schemas/action_plans_PlanStatus"},"plan_type":{"$ref":"#/components/schemas/action_plans_PlanType"},"private":{"type":"boolean"},"progress_percent":{"type":"integer"},"specification_section_id":{"nullable":true,"type":"integer"},"status":{"type":"string"},"status_type":{"enum":["draft","in_progress","in_revision","completed"],"type":"string"},"template_id":{"nullable":true,"type":"integer"},"title":{"type":"string"},"total_item_count":{"type":"integer"},"translated_status":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","title","status","status_type","total_item_count","closed_item_count"],"type":"object"},"action_plans_PlanParty":{"properties":{"id":{"type":"integer"},"party":{"$ref":"#/components/schemas/action_plans_PartyPerson"},"plan_id":{"type":"integer"},"signature":{"$ref":"#/components/schemas/action_plans_PlanPartySignature"},"updated_at":{"type":"string"}},"required":["id","plan_id","party","signature","updated_at"],"type":"object"},"action_plans_PlanPartySignature":{"nullable":true,"properties":{"attachment":{"nullable":true,"properties":{"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"captured_at":{"type":"string"},"captured_by":{"$ref":"#/components/schemas/action_plans_PartyPerson"},"id":{"type":"integer"},"note":{"type":"string"}},"required":["id","captured_at"],"type":"object"},"action_plans_PlanSection":{"properties":{"id":{"type":"integer"},"items":{"items":{"$ref":"#/components/schemas/action_plans_PlanItem"},"type":"array"},"name":{"type":"string"},"position":{"type":"integer"}},"required":["id","name"],"type":"object"},"action_plans_PlanShow":{"allOf":[{"$ref":"#/components/schemas/action_plans_PlanListItem"},{"properties":{"created_by":{"$ref":"#/components/schemas/action_plans_PartyPerson"},"custom_fields":{"type":"object"},"items":{"items":{"$ref":"#/components/schemas/action_plans_PlanItem"},"type":"array"},"plan_approvers":{"items":{"$ref":"#/components/schemas/action_plans_PlanParty"},"type":"array"},"plan_receivers":{"items":{"$ref":"#/components/schemas/action_plans_PlanParty"},"type":"array"},"sections":{"items":{"$ref":"#/components/schemas/action_plans_PlanSection"},"type":"array"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"}},"type":"object"}]},"action_plans_PlanStatus":{"properties":{"global":{"type":"boolean"},"name":{"type":"string"},"status":{"enum":["draft","in_progress","in_revision","completed"],"type":"string"}},"type":"object"},"action_plans_PlanType":{"nullable":true,"properties":{"active":{"type":"boolean"},"name":{"type":"string"},"source_key":{"type":"string"}},"type":"object"},"action_plans_ProjectParty":{"properties":{"employee_id":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"type":"integer"},"is_employee":{"type":"boolean"},"last_name":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"},"potential_approver":{"type":"boolean"},"potential_assignee":{"type":"boolean"},"potential_manager":{"type":"boolean"},"potential_receiver":{"type":"boolean"},"updated_at":{"type":"string"},"user_id":{"type":"integer"},"vendor":{"type":["object","null"]}},"required":["id","name","user_id"],"type":"object"},"action_plans_TemplateItem":{"properties":{"assignee":{"$ref":"#/components/schemas/action_plans_PartyPerson"},"created_at":{"nullable":true,"type":"string"},"holding_type":{"nullable":true,"type":"string"},"id":{"type":"integer"},"plan_template_id":{"type":"integer"},"plan_template_section_id":{"nullable":true,"type":"integer"},"position":{"type":"integer"},"record_type":{"nullable":true,"type":"string"},"title":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","title"],"type":"object"},"action_plans_TemplateListItem":{"properties":{"created_at":{"type":"string"},"deleted":{"type":"boolean"},"deleted_at":{"nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"id":{"type":"integer"},"item_count":{"type":"integer"},"plan_type":{"$ref":"#/components/schemas/action_plans_PlanType"},"status":{"enum":["draft","in_revision","published"],"type":"string"},"template_type":{"enum":["company","project"],"type":"string"},"title":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","title","status","template_type"],"type":"object"},"action_plans_TemplateSection":{"properties":{"id":{"type":"integer"},"items":{"items":{"$ref":"#/components/schemas/action_plans_TemplateItem"},"type":"array"},"name":{"type":"string"},"position":{"type":"integer"}},"required":["id","name"],"type":"object"},"action_plans_TemplateShow":{"allOf":[{"$ref":"#/components/schemas/action_plans_TemplateListItem"},{"properties":{"created_by":{"$ref":"#/components/schemas/action_plans_PartyPerson"},"items":{"items":{"$ref":"#/components/schemas/action_plans_TemplateItem"},"type":"array"},"sections":{"items":{"$ref":"#/components/schemas/action_plans_TemplateSection"},"type":"array"}},"type":"object"}]},"action_plans_WorkflowAssignmentSignOff":{"properties":{"plan_item_sign_off":{"properties":{"note":{"nullable":true,"type":"string"},"signed_off_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"type":"object"}},"required":["plan_item_sign_off"],"type":"object"},"action_plans_WorkflowCreateFromTemplate":{"properties":{"plan":{"properties":{"manager_id":{"minimum":1,"nullable":true,"type":"integer"},"number":{"nullable":true,"type":"string"},"plan_template_id":{"minimum":1,"type":"integer"},"private":{"type":"boolean"},"specification_section_id":{"minimum":1,"nullable":true,"type":"integer"},"title":{"nullable":true,"type":"string"}},"required":["plan_template_id"],"type":"object"}},"required":["plan"],"type":"object"},"action_plans_WorkflowPartySignature":{"properties":{"signature":{"properties":{"filename":{"maxLength":500,"nullable":true,"type":"string"},"note":{"maxLength":5000,"nullable":true,"type":"string"},"signed_off_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"url":{"maxLength":2000,"nullable":true,"type":"string"}},"type":"object"}},"type":"object"},"action_plans_WorkflowReference":{"properties":{"plan_item_reference":{"oneOf":[{"properties":{"ref_id":{"minimum":1,"type":"integer"},"ref_tool_slug":{"enum":["submittals","inspections","forms","observations","photos","documents"],"type":"string"}},"required":["ref_tool_slug","ref_id"],"type":"object"},{"properties":{"ref_id":{"enum":[null]},"ref_tool_slug":{"enum":[null]}},"required":["ref_tool_slug","ref_id"],"type":"object"}]}},"required":["plan_item_reference"],"type":"object"},"admin_CostCode":{"properties":{"biller":{"type":"string"},"biller_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"biller_origin_id":{"type":"null"},"biller_type":{"const":"Project","type":"string"},"budgeted":{"const":false,"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"type":"null"},"full_code":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"line_item_types":{"items":{},"maxItems":0,"type":"array"},"name":{"type":"string"},"origin_data":{"type":"null"},"origin_id":{"type":"null"},"parent":{"properties":{"id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}]}},"required":["id"],"type":"object"},"position":{"anyOf":[{"type":"integer"},{"type":"null"}]},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"null"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","biller","biller_id","biller_type","biller_origin_id","budgeted","code","full_code","name","origin_data","origin_id","parent","position","sortable_code","standard_cost_code_id","created_at","updated_at","deleted_at","line_item_types"],"type":"object"},"admin_CostCodeCreate":{"properties":{"cost_code":{"properties":{"code":{"minLength":1,"type":"string"},"name":{"minLength":1,"type":"string"},"parent_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}],"description":"Omit to retain on PATCH; null makes a root. Must reference a parent in the same project and cannot create a cycle."},"position":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["code","name"],"type":"object"},"project_id":{"description":"Accepted but ignored; URL project is authoritative.","type":"integer"},"sub_job_id":{"description":"Accepted but ignored; no sub-job association is created.","type":"integer"}},"required":["cost_code"],"type":"object"},"admin_CostCodeUpdate":{"properties":{"cost_code":{"properties":{"code":{"minLength":1,"type":"string"},"name":{"minLength":1,"type":"string"},"parent_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}],"description":"Omit to retain on PATCH; null makes a root. Must reference a parent in the same project and cannot create a cycle."},"position":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":[],"type":"object"}},"required":["cost_code"],"type":"object"},"admin_SubJob":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"format":"date-time","type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"origin_code":{"type":"null"},"origin_data":{"type":"null"},"origin_id":{"type":"null"},"updated_at":{"description":"Currently emitted from createdAt; not an independent last-modified timestamp.","format":"date-time","type":"string"}},"required":["id","name","code","origin_id","origin_code","origin_data","created_at","updated_at"],"type":"object"},"admin_SubJobCreate":{"properties":{"sub_job":{"properties":{"code":{"description":"Defaults to empty string on create. Omission preserves the code on PATCH; empty string clears it and serializes as null.","type":"string"},"name":{"minLength":1,"type":"string"}},"required":["name"],"type":"object"}},"required":["sub_job"],"type":"object"},"admin_SubJobUpdate":{"properties":{"sub_job":{"properties":{"code":{"description":"Defaults to empty string on create. Omission preserves the code on PATCH; empty string clears it and serializes as null.","type":"string"},"name":{"minLength":1,"type":"string"}},"required":[],"type":"object"}},"required":["sub_job"],"type":"object"},"analytics_ActivityEvent":{"properties":{"action":{"description":"created | updated | deleted | restored | restored_version | certified | decertified | transferred | viewed | exported | delivered | disabled | run","type":"string"},"actor_id":{"description":"0 = system","type":"integer"},"actor_name":{"type":["string","null"]},"changes":{"items":{"properties":{"field":{"type":"string"},"from":{},"label":{"type":"string"},"to":{}},"required":["field","from","to"],"type":"object"},"type":["array","null"]},"created_at":{"type":"string"},"id":{"type":"integer"},"item_id":{"type":"integer"},"item_type":{"description":"analytics_dashboard | analytics_exploration | analytics_alert | analytics_schedule | analytics_setting | analytics_export","type":"string"},"project_id":{"type":["integer","null"]},"summary":{"type":"string"}},"required":["id","created_at","actor_id","actor_name","action","item_type","item_id","project_id","summary","changes"],"type":"object"},"analytics_AlertRule":{"properties":{"channel":{"enum":["in_app","email"],"type":"string"},"company_id":{"type":"integer"},"created_at":{"type":"string"},"created_by_id":{"type":"integer"},"enabled":{"type":"boolean"},"filters":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"last_evaluated_at":{"type":["string","null"]},"last_fired_at":{"type":["string","null"]},"last_value":{"description":"The creator's value (percent change for pct ops); null for other viewers and for per_project rules.","type":["number","null"]},"metric_key":{"type":"string"},"name":{"type":"string"},"op":{"description":"gt / lt compare the metric with threshold. pct_up / pct_down: threshold is a percent change vs the previous window of the same length (a zero or missing baseline never fires; window all is rejected).","enum":["gt","lt","pct_up","pct_down"],"type":"string"},"per_project":{"description":"Company alerts only: evaluate by project (up to 50) and fire once per breaching project per window. Each recipient is told only about projects they can read.","type":"boolean"},"project_id":{"type":["integer","null"]},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"threshold":{"type":"number"},"updated_at":{"type":"string"},"window":{"type":"string"}},"required":["id","company_id","project_id","name","metric_key","filters","op","threshold","window","channel","recipient_ids","enabled","last_evaluated_at","last_value","last_fired_at","created_by_id","created_at","updated_at","per_project"],"type":"object"},"analytics_AlertRuleInput":{"properties":{"channel":{"enum":["in_app","email"],"type":"string"},"enabled":{"type":"boolean"},"filters":{"items":{"type":"object"},"type":"array"},"metric_key":{"type":"string"},"name":{"maxLength":120,"minLength":1,"type":"string"},"op":{"description":"gt / lt compare the metric with threshold. pct_up / pct_down: threshold is a percent change vs the previous window of the same length (a zero or missing baseline never fires; window all is rejected).","enum":["gt","lt","pct_up","pct_down"],"type":"string"},"per_project":{"description":"Company alerts only: evaluate by project (up to 50) and fire once per breaching project per window. Each recipient is told only about projects they can read.","type":"boolean"},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"threshold":{"type":"number"},"window":{"type":"string"}},"required":["name","metric_key","op","threshold"],"type":"object"},"analytics_AlertRulePatch":{"properties":{"channel":{"enum":["in_app","email"],"type":"string"},"enabled":{"type":"boolean"},"filters":{"items":{"type":"object"},"type":"array"},"name":{"maxLength":120,"minLength":1,"type":"string"},"op":{"description":"gt / lt compare the metric with threshold. pct_up / pct_down: threshold is a percent change vs the previous window of the same length (a zero or missing baseline never fires; window all is rejected).","enum":["gt","lt","pct_up","pct_down"],"type":"string"},"per_project":{"description":"Company alerts only: evaluate by project (up to 50) and fire once per breaching project per window. Each recipient is told only about projects they can read.","type":"boolean"},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"threshold":{"type":"number"},"window":{"type":"string"}},"required":[],"type":"object"},"analytics_AskAnswer":{"properties":{"alternatives":{"description":"Other metrics the question may have meant, best first (up to 5).","items":{"properties":{"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label"],"type":"object"},"type":"array"},"chips":{"items":{"properties":{"kind":{"enum":["metric","dimension","filter","time"],"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["kind","label","value"],"type":"object"},"type":"array"},"engine":{"enum":["ai","rules"],"type":"string"},"explanation":{"type":"string"},"mapped":{"type":"boolean"},"result":{"oneOf":[{"$ref":"#/components/schemas/analytics_QueryResult"},{"type":"null"}]},"spec":{"oneOf":[{"$ref":"#/components/schemas/analytics_QuerySpec"},{"type":"null"}]},"viz":{"oneOf":[{"$ref":"#/components/schemas/analytics_VizSpec"},{"type":"null"}]}},"required":["mapped","engine","spec","result","viz","chips","explanation","alternatives"],"type":"object"},"analytics_Catalog":{"properties":{"compat":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"dimensions":{"items":{"properties":{"bands":{"items":{"properties":{"key":{"type":"string"},"label":{"type":"string"},"max":{"type":["number","null"]}},"required":["key","label","max"],"type":"object"},"type":"array"},"customField":{"description":"Company custom field behind a cf_<id> dimension.","properties":{"dataType":{"type":"string"},"id":{"type":"integer"}},"required":["id","dataType"],"type":"object"},"description":{"type":"string"},"entity":{"type":"string"},"enumLabels":{"additionalProperties":{"type":"string"},"type":"object"},"filterOnly":{"description":"Filter only (never grouped): multi-select, long text and number custom fields.","type":"boolean"},"grains":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"label":{"type":"string"},"tones":{"additionalProperties":{"type":"string"},"type":"object"},"type":{"enum":["category","time","number","bool"],"type":"string"},"valueGroup":{"description":"Company value group (grp_<slug>) over a base dimension; its values are the group labels.","properties":{"bands":{"type":"boolean"},"base":{"type":"string"}},"required":["base","bands"],"type":"object"}},"required":["key","label","description","type"],"type":"object"},"type":"array"},"metrics":{"items":{"properties":{"additive":{"type":"boolean"},"certified":{"type":"boolean"},"custom":{"description":"Company-defined (overlay) metric: keys are always custom.*.","properties":{"id":{"type":["integer","null"]},"kind":{"enum":["segment","ratio","formula","field"],"type":"string"}},"required":["id","kind"],"type":"object"},"denFloor":{"type":"number"},"denPositive":{"description":"Ratio whose denominator must be positive: a denominator at or below 0 gives null, never a misleading sign.","type":"boolean"},"description":{"type":"string"},"dims":{"items":{"type":"string"},"type":"array"},"direction":{"enum":["higher_better","lower_better","neutral"],"type":"string"},"domain":{"type":"string"},"formula":{"type":"string"},"inputs":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"kind":{"enum":["agg","ratio","formula","computed"],"type":"string"},"label":{"type":"string"},"modeled":{"type":"boolean"},"numPositive":{"description":"Ratio: a numerator at or below 0 gives null (e.g. cost per SF without a budget).","type":"boolean"},"scale":{"type":"number"},"snapshot":{"type":"boolean"},"source":{"type":"string"},"synonyms":{"items":{"type":"string"},"type":"array"},"target":{"type":"string"},"unit":{"enum":["count","currency","hours","days","pct","ratio","rate","sqft","currency_per_sqft"],"type":"string"}},"required":["key","label","description","domain","unit","direction","kind","source","additive","synonyms"],"type":"object"},"type":"array"},"sources":{"items":{"properties":{"defaultTime":{"type":"string"},"dims":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"label":{"type":"string"},"privacy":{"enum":["project","row"],"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"tool":{"type":"string"}},"required":["key","label","tool","scopes","privacy","dims","defaultTime"],"type":"object"},"type":"array"}},"required":["metrics","dimensions","sources","compat"],"type":"object"},"analytics_Comment":{"properties":{"anchor":{"oneOf":[{"$ref":"#/components/schemas/analytics_CommentAnchor"},{"type":"null"}]},"author_id":{"type":"integer"},"author_name":{"type":["string","null"]},"body":{"maxLength":4000,"type":"string"},"can_delete":{"type":"boolean"},"can_edit":{"type":"boolean"},"created_at":{"type":"string"},"id":{"type":"integer"},"mentions":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"project_id":{"type":["integer","null"]},"resolved_at":{"type":["string","null"]},"resolved_by_id":{"type":["integer","null"]},"target_id":{"type":"integer"},"target_type":{"enum":["dashboard","exploration","insight","goal"],"type":"string"},"tile_id":{"type":["string","null"]},"updated_at":{"type":"string"}},"required":["id","target_type","target_id","project_id","tile_id","anchor","body","author_id","author_name","mentions","resolved_at","resolved_by_id","created_at","updated_at","can_edit","can_delete"],"type":"object"},"analytics_CommentAnchor":{"additionalProperties":false,"description":"A data point named by its dimension values and as-of date. Never a metric value.","properties":{"asOf":{"format":"date","type":"string"},"dims":{"additionalProperties":{"oneOf":[{"maxLength":200,"type":"string"},{"type":"integer"}]},"maxProperties":6,"type":"object"}},"required":["dims"],"type":"object"},"analytics_CommentInput":{"additionalProperties":false,"properties":{"anchor":{"oneOf":[{"$ref":"#/components/schemas/analytics_CommentAnchor"},{"type":"null"}]},"body":{"description":"@Name or @email mentions reach only people who can open the target; others are dropped silently.","maxLength":4000,"minLength":1,"type":"string"},"tile_id":{"description":"Dashboards only: a tile on this dashboard.","pattern":"^[A-Za-z0-9_-]{1,40}$","type":["string","null"]}},"required":["body"],"type":"object"},"analytics_CommentPatch":{"additionalProperties":false,"minProperties":1,"properties":{"body":{"description":"Author only.","maxLength":4000,"minLength":1,"type":"string"},"resolved":{"description":"Anyone who can open the target.","type":"boolean"}},"type":"object"},"analytics_Conflict":{"properties":{"edited_at":{"type":"string"},"edited_by":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":["object","null"]},"errors":{"items":{"type":"string"},"type":"array"},"version":{"description":"The current version.","type":"integer"}},"required":["errors","edited_by","edited_at","version"],"type":"object"},"analytics_CustomMetric":{"properties":{"certified":{"type":"boolean"},"created_at":{"type":"string"},"created_by_id":{"type":"integer"},"definition":{"$ref":"#/components/schemas/analytics_CustomMetricDefinition"},"description":{"type":"string"},"direction":{"type":"string"},"domain":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"label":{"type":"string"},"status":{"enum":["draft","published","archived"],"type":"string"},"summary":{"description":"Readable definition, e.g. \"Open RFIs where Priority is high\".","type":"string"},"synonyms":{"items":{"type":"string"},"type":"array"},"unit":{"type":"string"},"updated_at":{"type":"string"},"updated_by_id":{"type":"integer"},"version":{"type":"integer"}},"required":["id","key","label","description","domain","unit","direction","definition","summary","version","status","certified","synonyms","created_by_id","updated_by_id","created_at","updated_at"],"type":"object"},"analytics_CustomMetricDefinition":{"description":"Composition of catalog metrics and bound values (never SQL). segment: base agg metric + filters (<= 10, dims compatible with the base); ratio: num / den x scale, re-divided at every grain; formula: arithmetic after aggregation (null propagates, /0 is null).","oneOf":[{"properties":{"base":{"type":"string"},"filters":{"items":{"properties":{"dim":{"type":"string"},"op":{"type":"string"},"values":{"items":{},"type":"array"}},"required":["dim","op"],"type":"object"},"maxItems":10,"type":"array"},"kind":{"enum":["segment"],"type":"string"}},"required":["kind","base"],"type":"object"},{"properties":{"den":{"type":"string"},"kind":{"enum":["ratio"],"type":"string"},"num":{"type":"string"},"scale":{"enum":[1,100],"type":"integer"}},"required":["kind","num","den"],"type":"object"},{"properties":{"expr":{"additionalProperties":true,"description":"Formula AST: {op:'+'|'-'|'*'|'/', a, b} | {metric: key} | {const: number}. Depth <= 4, <= 6 metric refs, no custom.* refs.","type":"object"},"kind":{"enum":["formula"],"type":"string"}},"required":["kind","expr"],"type":"object"}]},"analytics_CustomMetricInput":{"properties":{"definition":{"$ref":"#/components/schemas/analytics_CustomMetricDefinition"},"description":{"maxLength":500,"type":"string"},"direction":{"enum":["higher_better","lower_better","neutral"],"type":"string"},"domain":{"type":"string"},"label":{"maxLength":80,"type":"string"},"slug":{"description":"Key becomes custom.<slug>; derived from the label when omitted.","pattern":"^[a-z][a-z0-9_]{0,59}$","type":"string"},"synonyms":{"items":{"type":"string"},"maxItems":20,"type":"array"},"unit":{"description":"Defaults from the inputs.","enum":["count","currency","hours","days","pct","ratio","rate","sqft","currency_per_sqft"],"type":"string"}},"required":["label","definition"],"type":"object"},"analytics_CustomMetricVersion":{"properties":{"changed_by":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":["object","null"]},"created_at":{"type":"string"},"definition":{"$ref":"#/components/schemas/analytics_CustomMetricDefinition"},"direction":{"type":"string"},"label":{"type":"string"},"summary":{"type":"string"},"unit":{"type":"string"},"version":{"type":"integer"}},"required":["version","label","unit","direction","summary","definition","changed_by","created_at"],"type":"object"},"analytics_Dashboard":{"properties":{"can_edit":{"type":"boolean"},"certified":{"type":"boolean"},"certified_at":{"type":["string","null"]},"certified_by":{"description":"User who certified it (null when not certified).","type":["integer","null"]},"company_id":{"type":"integer"},"created_at":{"type":"string"},"data_url":{"description":"GET: computed data (JSON). Id-based, stable for the life of the row.","type":"string"},"description":{"type":["string","null"]},"export_url":{"description":"GET: the same data as CSV.","type":"string"},"favorite":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"owner_id":{"type":"integer"},"pack_key":{"type":["string","null"]},"project_id":{"type":["integer","null"]},"spec":{"$ref":"#/components/schemas/analytics_DashboardSpec"},"updated_at":{"type":"string"},"version":{"description":"Bumped by every name/spec change (send it back in PATCH to detect conflicts).","type":"integer"},"view_count":{"type":"integer"},"visibility":{"enum":["private","project","company"],"type":"string"},"web_url":{"description":"The page in the app (path relative to the app origin).","type":"string"}},"required":["id","company_id","project_id","name","description","pack_key","spec","visibility","owner_id","certified","favorite","view_count","can_edit","created_at","updated_at","certified_by","certified_at","version","web_url","data_url","export_url"],"type":"object"},"analytics_DashboardData":{"properties":{"as_of":{"description":"Oldest data freshness across tiles (ISO 8601).","type":"string"},"filters_applied":{"description":"Human-readable filters in effect (defaults included).","items":{"type":"string"},"type":"array"},"generated_at":{"type":"string"},"project_id":{"type":["integer","null"]},"scope":{"description":"Company or project name the data covers.","type":"string"},"target":{"properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"type":{"enum":["dashboard","pack","exploration"],"type":"string"}},"required":["type","name"],"type":"object"},"tiles":{"items":{"properties":{"error":{"type":["string","null"]},"export_url":{"description":"This tile as CSV.","type":"string"},"id":{"description":"Stable tile id (`spec.tiles[].id`).","type":"string"},"kind":{"enum":["query","text","insights","records"],"type":"string"},"query":{"description":"The query the tile ran (tile query + filters + time + scope).","oneOf":[{"$ref":"#/components/schemas/analytics_QuerySpec"},{"type":"null"}]},"records":{"description":"Record-list tiles: the first `limit` records with `total`.","oneOf":[{"$ref":"#/components/schemas/analytics_DetailPage"},{"type":"null"}]},"result":{"oneOf":[{"$ref":"#/components/schemas/analytics_QueryResult"},{"type":"null"}]},"tab":{"type":["string","null"]},"title":{"type":"string"},"url":{"description":"This tile's data alone (`?tile=`).","type":"string"}},"required":["id","title","kind","tab","url","export_url","query","result","records","error"],"type":"object"},"type":"array"},"timezone":{"type":"string"},"url":{"description":"Stable REST path of this data.","type":"string"}},"required":["target","project_id","url","scope","filters_applied","as_of","generated_at","timezone","tiles"],"type":"object"},"analytics_DashboardInput":{"properties":{"description":{"type":["string","null"]},"name":{"maxLength":120,"minLength":1,"type":"string"},"spec":{"$ref":"#/components/schemas/analytics_DashboardSpec"},"visibility":{"enum":["private","project","company"],"type":"string"}},"required":["name","spec"],"type":"object"},"analytics_DashboardPatch":{"properties":{"certified":{"type":"boolean"},"description":{"type":["string","null"]},"favorite":{"type":"boolean"},"name":{"maxLength":120,"minLength":1,"type":"string"},"spec":{"$ref":"#/components/schemas/analytics_DashboardSpec"},"version":{"description":"The version you loaded; a mismatch returns 409 with edited_by / edited_at. Omit to skip the check.","minimum":1,"type":"integer"},"visibility":{"enum":["private","project","company"],"type":"string"}},"required":[],"type":"object"},"analytics_DashboardSpec":{"additionalProperties":false,"properties":{"filters":{"default":[],"items":{"additionalProperties":false,"properties":{"default":{"anyOf":[{"anyOf":[{"maxLength":200,"type":"string"},{"type":"number"},{"type":"boolean"}]},{"items":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"number"},{"type":"boolean"}]},"maxItems":500,"type":"array"},{"additionalProperties":false,"properties":{"from":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"preset":{"enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"},"to":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"type":"object"}]},"dim":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"key":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"},"kind":{"enum":["select","multi","date_range","search"],"type":"string"},"label":{"maxLength":60,"minLength":1,"type":"string"},"parent":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"},"required":{"type":"boolean"}},"required":["key","dim","label","kind"],"type":"object"},"maxItems":12,"type":"array"},"tabs":{"items":{"additionalProperties":false,"properties":{"key":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"},"label":{"maxLength":40,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":12,"type":"array"},"tiles":{"items":{"additionalProperties":false,"properties":{"click":{"anyOf":[{"enum":["cross_filter","drill"],"type":"string"},{"additionalProperties":false,"properties":{"href":{"maxLength":300,"pattern":"^\\/(?!\\/)[^\\s]*$","type":"string"}},"required":["href"],"type":"object"}]},"filterMap":{"additionalProperties":{"anyOf":[{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}]},"propertyNames":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"},"type":"object"},"id":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"},"kind":{"enum":["query","text","insights","records"],"type":"string"},"layout":{"additionalProperties":false,"properties":{"h":{"maximum":8,"minimum":1,"type":"integer"},"w":{"maximum":12,"minimum":1,"type":"integer"},"x":{"maximum":11,"minimum":0,"type":"integer"},"y":{"maximum":500,"minimum":0,"type":"integer"}},"required":["x","y","w","h"],"type":"object"},"query":{"additionalProperties":false,"properties":{"compare":{"oneOf":[{"enum":["previous_period","previous_year","ytd_vs_prior_ytd"],"type":"string"},{"additionalProperties":false,"description":"Custom offset window: exactly one of days or months.","properties":{"days":{"maximum":3660,"minimum":1,"type":"integer"},"kind":{"enum":["offset"],"type":"string"},"months":{"maximum":120,"minimum":1,"type":"integer"}},"required":["kind"],"type":"object"}]},"dimensions":{"default":[],"items":{"additionalProperties":false,"properties":{"grain":{"enum":["day","week","month","quarter","year"],"type":"string"},"key":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"}},"required":["key"],"type":"object"},"maxItems":3,"type":"array"},"filters":{"default":[],"items":{"additionalProperties":false,"properties":{"dim":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"op":{"enum":["eq","neq","in","not_in","gt","gte","lt","lte","between","is_null","not_null","contains"],"type":"string"},"values":{"default":[],"items":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"number"},{"type":"boolean"}]},"maxItems":500,"type":"array"}},"required":["dim","op"],"type":"object"},"maxItems":20,"type":"array"},"limit":{"default":1000,"maximum":5000,"minimum":1,"type":"integer"},"metrics":{"items":{"maxLength":80,"pattern":"^[a-z][a-z_]*\\.[a-z0-9_]+$","type":"string"},"maxItems":8,"minItems":1,"type":"array"},"sort":{"default":[],"items":{"additionalProperties":false,"properties":{"dir":{"enum":["asc","desc"],"type":"string"},"key":{"maxLength":80,"type":"string"}},"required":["key","dir"],"type":"object"},"maxItems":3,"type":"array"},"time":{"additionalProperties":false,"properties":{"dim":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"from":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"preset":{"enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"},"to":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"type":"object"},"topN":{"additionalProperties":false,"properties":{"n":{"maximum":50,"minimum":1,"type":"integer"},"other":{"default":true,"type":"boolean"}},"required":["n"],"type":"object"}},"required":["metrics"],"type":"object"},"records":{"additionalProperties":false,"properties":{"cell":{"items":{"additionalProperties":false,"properties":{"dim":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"value":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"required":["dim","value"],"type":"object"},"maxItems":3,"type":"array"},"columns":{"items":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"minItems":1,"type":"array"},"limit":{"default":50,"maximum":500,"minimum":10,"type":"integer"},"metric":{"maxLength":80,"pattern":"^[a-z][a-z_]*\\.[a-z0-9_]+$","type":"string"},"sort":{"additionalProperties":false,"properties":{"dir":{"enum":["asc","desc"],"type":"string"},"key":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"}},"required":["key","dir"],"type":"object"}},"required":["metric"],"type":"object"},"subtitle":{"maxLength":200,"type":"string"},"tab":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"},"text":{"maxLength":4000,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"viz":{"additionalProperties":false,"properties":{"calcs":{"items":{"additionalProperties":false,"properties":{"a":{"maxLength":80,"type":"string"},"b":{"maxLength":80,"type":"string"},"key":{"pattern":"^calc_[1-9]$","type":"string"},"label":{"maxLength":60,"minLength":1,"type":"string"},"op":{"enum":["pct_of_total","running_total","delta","delta_pct","rank","divide","percentile"],"type":"string"},"scale":{"anyOf":[{"const":1,"type":"number"},{"const":100,"type":"number"}]}},"required":["key","label","op","a"],"type":"object"},"maxItems":5,"type":"array"},"options":{"additionalProperties":false,"default":{},"properties":{"annotateMilestones":{"description":"Also mark the schedule milestones the viewer can see.","type":"boolean"},"annotations":{"description":"Dated chart notes (line, area, column): a dashed line + label, listed in the chart table. Never values.","items":{"additionalProperties":false,"properties":{"date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"label":{"maxLength":60,"minLength":1,"type":"string"}},"required":["date","label"],"type":"object"},"maxItems":12,"type":"array"},"color":{"maxLength":80,"type":"string"},"compact":{"type":"boolean"},"cone":{"description":"Line over evm.bac / evm.ev / evm.ac by as_of: EAC P50 with the P10–P90 cone (MODELED).","type":"boolean"},"cumulative":{"type":"boolean"},"dataBars":{"items":{"maxLength":80,"type":"string"},"maxItems":4,"type":"array"},"digits":{"maximum":4,"minimum":0,"type":"integer"},"legend":{"enum":["auto","hidden"],"type":"string"},"maxCategories":{"maximum":50,"minimum":1,"type":"integer"},"percent":{"type":"boolean"},"referenceLines":{"items":{"additionalProperties":false,"properties":{"label":{"maxLength":60,"type":"string"},"settingKey":{"maxLength":80,"type":"string"},"value":{"type":"number"}},"required":["label"],"type":"object"},"maxItems":4,"type":"array"},"rules":{"items":{"additionalProperties":false,"properties":{"metric":{"maxLength":80,"type":"string"},"op":{"enum":["gt","gte","lt","lte","between"],"type":"string"},"settingKey":{"maxLength":80,"type":"string"},"tone":{"enum":["ok","warn","risk","info"],"type":"string"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["metric","op","tone"],"type":"object"},"maxItems":8,"type":"array"},"sameRegion":{"description":"strip: peers must also share the focus project’s region (viewers can toggle it).","type":"boolean"},"scenario":{"additionalProperties":false,"description":"The tile is the slip-cost SCENARIO panel; its saved inputs (never a value).","properties":{"milestone":{"exclusiveMinimum":0,"type":"integer"},"slipWeeks":{"maximum":26,"minimum":0,"type":"integer"}},"type":"object"},"seriesColors":{"additionalProperties":{"enum":["c0","c1","c2","c3","c4","c5","c6","c7","ok","warn","risk","info","neutral"],"type":"string"},"propertyNames":{"maxLength":80,"type":"string"},"type":"object"},"showValues":{"type":"boolean"},"size":{"maxLength":80,"type":"string"},"sparkline":{"type":"boolean"},"targetMetric":{"maxLength":80,"type":"string"},"x":{"maxLength":80,"type":"string"},"y2":{"items":{"maxLength":80,"type":"string"},"maxItems":4,"type":"array"},"yMax":{"type":"number"},"yMin":{"type":"number"}},"type":"object"},"type":{"enum":["kpi","bar","hbar","stacked_bar","line","area","combo","scatter","waterfall","heatmap","donut","gantt","table","pivot","strip"],"type":"string"}},"required":["type"],"type":"object"}},"required":["id","title","kind","layout"],"type":"object"},"maxItems":40,"type":"array"},"version":{"const":1,"type":"number"}},"required":["version","tiles"],"type":"object"},"analytics_DetailPage":{"properties":{"columns":{"items":{"properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"enum":["string","number","date","currency","status"],"type":"string"}},"required":["key","label","type"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]},"rows":{"items":{"properties":{"href":{"type":"string"},"id":{"type":"integer"},"project_id":{"type":"integer"},"values":{"additionalProperties":{"type":["string","number","boolean","null"]},"type":"object"}},"required":["id","project_id","href","values"],"type":"object"},"type":"array"},"source":{"type":"string"},"total":{"description":"Every matching record the caller can open, counted up to 10,000; present only when requested with total on the first page.","maximum":10000,"type":"integer"},"total_truncated":{"description":"True when more than 10,000 records match: total is then 10,000 and means \"10,000+\". Present with total.","type":"boolean"}},"required":["source","columns","rows","next_cursor"],"type":"object"},"analytics_DetailRequest":{"properties":{"cell":{"items":{"properties":{"dim":{"type":"string"},"value":{"type":["string","number","null"]}},"required":["dim","value"],"type":"object"},"type":"array"},"columns":{"description":"Columns to return, in order (keys of the source's record columns; default all). An unknown key is 422.","items":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"minItems":1,"type":"array"},"cursor":{"type":["string","null"]},"limit":{"description":"Page size (default 200).","maximum":500,"minimum":1,"type":"integer"},"metric":{"type":"string"},"query":{"$ref":"#/components/schemas/analytics_QuerySpec"},"sort":{"additionalProperties":false,"description":"Order by one record column (nulls last, then newest id). A sorted list is a single page: sending a cursor with it is 422.","properties":{"dir":{"enum":["asc","desc"],"type":"string"},"key":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"}},"required":["key","dir"],"type":"object"},"total":{"description":"Also count every matching record you can open (first page only).","type":"boolean"}},"required":["query","cell"],"type":"object"},"analytics_DimensionValue":{"properties":{"count":{"type":["number","null"]},"label":{"type":"string"},"value":{"type":["string","number","boolean"]}},"required":["value","label","count"],"type":"object"},"analytics_Error":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"},"analytics_Exploration":{"properties":{"can_edit":{"type":"boolean"},"company_id":{"type":"integer"},"created_at":{"type":"string"},"data_url":{"description":"GET: computed data (JSON). Id-based, stable for the life of the row.","type":"string"},"description":{"type":["string","null"]},"export_url":{"description":"GET: the same data as CSV.","type":"string"},"favorite":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"owner_id":{"type":"integer"},"project_id":{"type":["integer","null"]},"query":{"$ref":"#/components/schemas/analytics_QueryBody"},"updated_at":{"type":"string"},"version":{"description":"Bumped by every name/query/viz change.","type":"integer"},"view_count":{"type":"integer"},"visibility":{"enum":["private","project","company"],"type":"string"},"viz":{"$ref":"#/components/schemas/analytics_VizSpec"},"web_url":{"description":"The page in the app (path relative to the app origin).","type":"string"}},"required":["id","company_id","project_id","name","description","query","viz","visibility","owner_id","favorite","view_count","can_edit","created_at","updated_at","version","web_url","data_url","export_url"],"type":"object"},"analytics_ExplorationInput":{"properties":{"description":{"type":["string","null"]},"name":{"maxLength":120,"minLength":1,"type":"string"},"query":{"$ref":"#/components/schemas/analytics_QueryBody"},"visibility":{"enum":["private","project","company"],"type":"string"},"viz":{"$ref":"#/components/schemas/analytics_VizSpec"}},"required":["name","query","viz"],"type":"object"},"analytics_ExplorationPatch":{"properties":{"description":{"type":["string","null"]},"favorite":{"type":"boolean"},"name":{"maxLength":120,"minLength":1,"type":"string"},"query":{"$ref":"#/components/schemas/analytics_QueryBody"},"version":{"description":"The version you loaded; a mismatch returns 409 with edited_by / edited_at. Omit to skip the check.","minimum":1,"type":"integer"},"visibility":{"enum":["private","project","company"],"type":"string"},"viz":{"$ref":"#/components/schemas/analytics_VizSpec"}},"required":[],"type":"object"},"analytics_ExportJob":{"properties":{"download_url":{"type":["string","null"]},"error":{"type":["string","null"]},"id":{"type":"integer"},"percent_complete":{"type":"integer"},"status":{"enum":["queued","running","succeeded","failed"],"type":"string"}},"required":["id","status","percent_complete","download_url","error"],"type":"object"},"analytics_ExportRequest":{"description":"query/detail need `query` (detail: CSV or XLSX only); dashboard needs dashboard_id; exploration needs exploration_id; pack needs pack_key.","properties":{"cell":{"items":{"properties":{"dim":{"type":"string"},"value":{"type":["string","number","null"]}},"required":["dim","value"],"type":"object"},"type":"array"},"cover":{"description":"PDF only: prepend a cover page.","type":"boolean"},"dashboard_id":{"type":"integer"},"exploration_id":{"type":"integer"},"filters":{"$ref":"#/components/schemas/analytics_FilterState"},"format":{"enum":["csv","xlsx","pdf"],"type":"string"},"kind":{"enum":["query","detail","dashboard","pack","exploration"],"type":"string"},"metric":{"description":"detail: the metric whose records are listed.","type":"string"},"overrides":{"additionalProperties":{"properties":{"query":{"$ref":"#/components/schemas/analytics_QueryBody"},"viz":{"$ref":"#/components/schemas/analytics_VizSpec"}},"required":["query"],"type":"object"},"description":"dashboard / pack: the screen's drill state by tile id (break out, zoom, widen): that tile runs this query (and chart, when given) instead of its saved one, as the caller. Session exports send it as `o` (base64url JSON).","maxProperties":50,"type":"object"},"pack_key":{"type":"string"},"paper":{"description":"PDF paper size (default letter).","enum":["letter","a4"],"type":"string"},"project_id":{"type":"integer"},"query":{"$ref":"#/components/schemas/analytics_QuerySpec"},"tile_id":{"description":"dashboard / pack: only this tile (`spec.tiles[].id`).","maxLength":64,"type":"string"},"time":{"description":"Time window for every tile (preset, or from/to), applied after the dashboard filters.","properties":{"from":{"format":"date","type":"string"},"preset":{"enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"},"to":{"format":"date","type":"string"}},"type":"object"},"title":{"maxLength":120,"type":"string"},"viz":{"$ref":"#/components/schemas/analytics_VizSpec"}},"required":["kind","format"],"type":"object"},"analytics_FilterState":{"additionalProperties":false,"properties":{"chips":{"default":[],"items":{"additionalProperties":false,"properties":{"dim":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"exclude":{"type":"boolean"},"value":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["dim","value"],"type":"object"},"maxItems":20,"type":"array"},"values":{"additionalProperties":{"anyOf":[{"anyOf":[{"maxLength":200,"type":"string"},{"type":"number"},{"type":"boolean"}]},{"items":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"number"},{"type":"boolean"}]},"maxItems":500,"type":"array"},{"additionalProperties":false,"properties":{"from":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"preset":{"enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"},"to":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"type":"object"}]},"default":{},"propertyNames":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"},"type":"object"}},"type":"object"},"analytics_Goal":{"properties":{"alert_rule_id":{"type":["integer","null"]},"alert_when_behind":{"type":"boolean"},"can_edit":{"description":"The caller may edit fields and check in.","type":"boolean"},"can_manage":{"description":"The caller may delete, share, or change visibility, owner and alert.","type":"boolean"},"company_id":{"type":"integer"},"created_at":{"type":"string"},"created_by_id":{"type":"integer"},"due_date":{"format":"date","type":["string","null"]},"filters":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"latest_check_in":{"oneOf":[{"$ref":"#/components/schemas/analytics_GoalCheckIn"},{"type":"null"}]},"metric_key":{"type":"string"},"name":{"type":"string"},"op":{"description":"gte: met when value ≥ target; lte: met when value ≤ target. Within 10% of the target on the bad side = at_risk; beyond = behind.","enum":["gte","lte"],"type":"string"},"owner_id":{"type":"integer"},"owner_name":{"type":["string","null"]},"project_id":{"description":"null = company goal","type":["integer","null"]},"setting_key":{"description":"Default goals: the targets setting the target mirrors.","type":["string","null"]},"target":{"type":"number"},"updated_at":{"type":"string"},"visibility":{"enum":["private","project","company"],"type":"string"},"window":{"type":"string"}},"required":["id","company_id","project_id","name","metric_key","filters","window","op","target","due_date","owner_id","owner_name","visibility","alert_when_behind","alert_rule_id","setting_key","created_by_id","created_at","updated_at","can_edit","can_manage","latest_check_in"],"type":"object"},"analytics_GoalCheckIn":{"properties":{"as_of":{"format":"date","type":"string"},"author_id":{"type":"integer"},"author_name":{"type":["string","null"]},"created_at":{"type":"string"},"goal_id":{"type":"integer"},"id":{"type":"integer"},"note":{"type":"string"},"status":{"enum":["on_track","at_risk","behind",null],"type":["string","null"]}},"required":["id","goal_id","as_of","status","note","author_id","author_name","created_at"],"type":"object"},"analytics_GoalCheckInInput":{"additionalProperties":false,"properties":{"as_of":{"format":"date","type":"string"},"note":{"maxLength":2000,"minLength":1,"type":"string"},"status":{"enum":["on_track","at_risk","behind",null],"type":["string","null"]}},"required":["note"],"type":"object"},"analytics_GoalInput":{"additionalProperties":false,"properties":{"alert_when_behind":{"default":false,"type":"boolean"},"due_date":{"format":"date","type":["string","null"]},"filters":{"description":"QuerySpec filters (bound values only).","items":{"type":"object"},"maxItems":20,"type":"array"},"metric_key":{"maxLength":80,"type":"string"},"name":{"maxLength":120,"minLength":1,"type":"string"},"op":{"enum":["gte","lte"],"type":"string"},"owner_id":{"description":"Defaults to the caller. Must be an active member with analytics access at the scope.","type":"integer"},"target":{"type":"number"},"visibility":{"default":"company","enum":["private","project","company"],"type":"string"},"window":{"description":"Time preset the value is read over; all = no time filter (as of now).","enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"}},"required":["name","metric_key","op","target"],"type":"object"},"analytics_GoalPatch":{"additionalProperties":false,"properties":{"alert_when_behind":{"type":"boolean"},"due_date":{"format":"date","type":["string","null"]},"filters":{"description":"QuerySpec filters (bound values only).","items":{"type":"object"},"maxItems":20,"type":"array"},"name":{"maxLength":120,"minLength":1,"type":"string"},"op":{"enum":["gte","lte"],"type":"string"},"owner_id":{"type":"integer"},"target":{"type":"number"},"visibility":{"enum":["private","project","company"],"type":"string"},"window":{"description":"Time preset the value is read over; all = no time filter (as of now).","enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"}},"type":"object"},"analytics_GoalValue":{"properties":{"as_of":{"format":"date","type":"string"},"auto_status":{"enum":["met","at_risk","behind",null],"type":["string","null"]},"goal_id":{"type":"integer"},"history":{"items":{"properties":{"as_of":{"type":"string"},"value":{"type":"number"}},"required":["as_of","value"],"type":"object"},"type":["array","null"]},"history_note":{"type":["string","null"]},"op":{"enum":["gte","lte"],"type":"string"},"status":{"enum":["met","on_track","at_risk","behind","unavailable"],"type":"string"},"status_source":{"description":"manual = the latest check-in's status overrides the automatic one.","enum":["auto","manual"],"type":"string"},"target":{"type":"number"},"unavailable":{"description":"Why value is null. partial = some projects behind the total are unreadable to the caller, so no total is shown.","enum":["forbidden","source_failed","timeout","scope","partial","no_data",null],"type":["string","null"]},"value":{"type":["number","null"]}},"required":["goal_id","value","unavailable","target","op","auto_status","status","status_source","as_of","history","history_note"],"type":"object"},"analytics_Health":{"properties":{"cache":{"description":"Process-wide (every tenant on this server). Present only for platform super-admins.","properties":{"entries":{"type":"integer"},"hit_rate":{"type":["number","null"]},"hits":{"type":"integer"},"misses":{"type":"integer"}},"required":["entries","hits","misses","hit_rate"],"type":"object"},"gate":{"description":"Process-wide (every tenant on this server). Present only for platform super-admins.","properties":{"active":{"type":"integer"},"waiting":{"type":"integer"}},"required":["active","waiting"],"type":"object"},"generated_at":{"type":"string"},"scope":{"properties":{"company_id":{"type":"integer"},"project_id":{"type":["integer","null"]},"projects":{"description":"Projects in the viewer's analytics scope.","type":"integer"}},"required":["company_id","project_id","projects"],"type":"object"},"slow_queries":{"description":"Company admins only (null otherwise): this company's slowest recent queries, SQL without bound values.","items":{"properties":{"at":{"type":"string"},"ms":{"type":"number"},"sql":{"type":"string"}},"required":["at","ms","sql"],"type":"object"},"type":["array","null"]},"slow_threshold_ms":{"type":"number"},"snapshots":{"properties":{"coverage_pct":{"type":["number","null"]},"expected_metrics":{"type":"integer"},"latest_as_of":{"type":["string","null"]},"metrics":{"type":"integer"},"projects_covered":{"type":"integer"},"projects_total":{"type":"integer"},"rows":{"type":"integer"}},"required":["latest_as_of","metrics","rows","expected_metrics","projects_covered","projects_total","coverage_pct"],"type":"object"},"sources":{"items":{"properties":{"label":{"type":"string"},"last_updated_at":{"type":["string","null"]},"projects":{"description":"Projects whose rows the viewer can read for this source.","type":"integer"},"rows":{"type":["integer","null"]},"source":{"type":"string"},"tool":{"type":"string"},"unavailable":{"description":"Why the source could not be counted (forbidden, scope, timeout, source_failed).","type":"string"}},"required":["source","label","tool","rows","last_updated_at","projects"],"type":"object"},"type":"array"},"ticker":{"description":"Process-wide (every tenant on this server). Present only for platform super-admins.","properties":{"tasks":{"items":{"type":"string"},"type":"array"}},"required":["tasks"],"type":"object"}},"required":["generated_at","sources","snapshots","scope","slow_queries","slow_threshold_ms"],"type":"object"},"analytics_InUse":{"properties":{"errors":{"items":{"type":"string"},"type":"array"},"usage":{"$ref":"#/components/schemas/analytics_Usage"}},"required":["errors","usage"],"type":"object"},"analytics_Insight":{"properties":{"action":{"type":["string","null"]},"assignee_id":{"description":"Ball in court: a user who passes this insight's visibility gate.","type":["integer","null"]},"company_id":{"type":"integer"},"data":{"$ref":"#/components/schemas/analytics_InsightData"},"dismiss_reason":{"maxLength":280,"type":["string","null"]},"dismissed_by_id":{"type":["integer","null"]},"domain":{"type":"string"},"first_seen_at":{"type":"string"},"id":{"type":"integer"},"last_seen_at":{"type":"string"},"magnitude":{"type":"number"},"metric_keys":{"items":{"type":"string"},"type":"array"},"modeled":{"type":"boolean"},"narrative":{"type":"string"},"project_id":{"type":["integer","null"]},"rule_key":{"type":"string"},"score":{"type":"number"},"severity":{"enum":["info","warn","crit","good"],"type":"string"},"status":{"enum":["open","dismissed","resolved"],"type":"string"},"task_item_id":{"description":"The task created from this insight.","type":["integer","null"]},"title":{"type":"string"},"tool":{"type":"string"},"type":{"type":"string"}},"required":["id","company_id","project_id","rule_key","severity","type","domain","title","narrative","action","metric_keys","tool","modeled","magnitude","score","data","status","first_seen_at","last_seen_at","assignee_id","dismissed_by_id","dismiss_reason","task_item_id"],"type":"object"},"analytics_InsightData":{"description":"Evidence behind an insight. Cross-domain `related` signals are hypotheses, never presented as fact.","properties":{"adminTools":{"description":"Tools whose row-private data fed it; the viewer must be their admin.","items":{"type":"string"},"type":"array"},"domain":{"type":"string"},"drill":{"additionalProperties":true,"description":"Query behind the finding (project-scoped at view time), for the evidence chart and Explore.","type":"object"},"facts":{"items":{"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"hypothesis":{"type":"boolean"},"records":{"description":"The metric whose records stand behind the finding: the drill spec listed for it (View records).","type":"string"},"related":{"items":{"properties":{"confidence":{"enum":["hypothesis","medium"],"type":"string"},"detail":{"type":"string"},"label":{"type":"string"}},"required":["label","detail","confidence"],"type":"object"},"type":"array"},"series":{"properties":{"forecast":{"description":"MODELED projection from points[from], with its band.","properties":{"from":{"type":"integer"},"hi":{"items":{"type":["number","null"]},"type":"array"},"lo":{"items":{"type":["number","null"]},"type":"array"}},"required":["from","lo","hi"],"type":"object"},"label":{"type":"string"},"points":{"items":{"properties":{"x":{"type":"string"},"y":{"type":["number","null"]}},"required":["x","y"],"type":"object"},"type":"array"},"unit":{"type":"string"}},"required":["label","unit","points"],"type":"object"},"threshold":{"type":["number","null"]},"tools":{"description":"Every tool whose data fed the finding; the viewer (and token) needs read on all.","items":{"type":"string"},"type":"array"},"unit":{"type":"string"},"value":{"type":["number","null"]}},"required":["domain","tools"],"type":"object"},"analytics_InsightTask":{"properties":{"created":{"type":"boolean"},"number":{"type":"string"},"project_id":{"type":"integer"},"task_item_id":{"type":"integer"},"title":{"type":"string"},"url":{"description":"In-app link to the task.","type":"string"}},"required":["task_item_id","project_id","number","title","url","created"],"type":"object"},"analytics_OrphanedItem":{"properties":{"enabled":{"description":"Schedules and alerts only.","type":["boolean","null"]},"id":{"type":"integer"},"name":{"type":"string"},"owner_active":{"description":"false = the owner is deactivated. true only for a schedule that was paused because its (active) owner lost analytics access.","type":"boolean"},"owner_id":{"type":"integer"},"owner_name":{"type":["string","null"]},"private":{"type":"boolean"},"project_id":{"type":["integer","null"]},"type":{"enum":["dashboard","exploration","schedule","alert"],"type":"string"}},"required":["type","id","name","project_id","owner_id","owner_name","private","enabled","owner_active"],"type":"object"},"analytics_Pack":{"additionalProperties":false,"properties":{"dashboard":{"additionalProperties":false,"properties":{"filters":{"default":[],"items":{"additionalProperties":false,"properties":{"default":{"anyOf":[{"anyOf":[{"maxLength":200,"type":"string"},{"type":"number"},{"type":"boolean"}]},{"items":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"number"},{"type":"boolean"}]},"maxItems":500,"type":"array"},{"additionalProperties":false,"properties":{"from":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"preset":{"enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"},"to":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"type":"object"}]},"dim":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"key":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"},"kind":{"enum":["select","multi","date_range","search"],"type":"string"},"label":{"maxLength":60,"minLength":1,"type":"string"},"parent":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"},"required":{"type":"boolean"}},"required":["key","dim","label","kind"],"type":"object"},"maxItems":12,"type":"array"},"tabs":{"items":{"additionalProperties":false,"properties":{"key":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"},"label":{"maxLength":40,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":12,"type":"array"},"tiles":{"items":{"additionalProperties":false,"properties":{"click":{"anyOf":[{"enum":["cross_filter","drill"],"type":"string"},{"additionalProperties":false,"properties":{"href":{"maxLength":300,"pattern":"^\\/(?!\\/)[^\\s]*$","type":"string"}},"required":["href"],"type":"object"}]},"filterMap":{"additionalProperties":{"anyOf":[{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},{"type":"null"}]},"propertyNames":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"},"type":"object"},"id":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"},"kind":{"enum":["query","text","insights","records"],"type":"string"},"layout":{"additionalProperties":false,"properties":{"h":{"maximum":8,"minimum":1,"type":"integer"},"w":{"maximum":12,"minimum":1,"type":"integer"},"x":{"maximum":11,"minimum":0,"type":"integer"},"y":{"maximum":500,"minimum":0,"type":"integer"}},"required":["x","y","w","h"],"type":"object"},"query":{"additionalProperties":false,"properties":{"compare":{"oneOf":[{"enum":["previous_period","previous_year","ytd_vs_prior_ytd"],"type":"string"},{"additionalProperties":false,"description":"Custom offset window: exactly one of days or months.","properties":{"days":{"maximum":3660,"minimum":1,"type":"integer"},"kind":{"enum":["offset"],"type":"string"},"months":{"maximum":120,"minimum":1,"type":"integer"}},"required":["kind"],"type":"object"}]},"dimensions":{"default":[],"items":{"additionalProperties":false,"properties":{"grain":{"enum":["day","week","month","quarter","year"],"type":"string"},"key":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"}},"required":["key"],"type":"object"},"maxItems":3,"type":"array"},"filters":{"default":[],"items":{"additionalProperties":false,"properties":{"dim":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"op":{"enum":["eq","neq","in","not_in","gt","gte","lt","lte","between","is_null","not_null","contains"],"type":"string"},"values":{"default":[],"items":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"number"},{"type":"boolean"}]},"maxItems":500,"type":"array"}},"required":["dim","op"],"type":"object"},"maxItems":20,"type":"array"},"limit":{"default":1000,"maximum":5000,"minimum":1,"type":"integer"},"metrics":{"items":{"maxLength":80,"pattern":"^[a-z][a-z_]*\\.[a-z0-9_]+$","type":"string"},"maxItems":8,"minItems":1,"type":"array"},"sort":{"default":[],"items":{"additionalProperties":false,"properties":{"dir":{"enum":["asc","desc"],"type":"string"},"key":{"maxLength":80,"type":"string"}},"required":["key","dir"],"type":"object"},"maxItems":3,"type":"array"},"time":{"additionalProperties":false,"properties":{"dim":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"from":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"preset":{"enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"},"to":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"type":"object"},"topN":{"additionalProperties":false,"properties":{"n":{"maximum":50,"minimum":1,"type":"integer"},"other":{"default":true,"type":"boolean"}},"required":["n"],"type":"object"}},"required":["metrics"],"type":"object"},"records":{"additionalProperties":false,"properties":{"cell":{"items":{"additionalProperties":false,"properties":{"dim":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"value":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"required":["dim","value"],"type":"object"},"maxItems":3,"type":"array"},"columns":{"items":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"maxItems":20,"minItems":1,"type":"array"},"limit":{"default":50,"maximum":500,"minimum":10,"type":"integer"},"metric":{"maxLength":80,"pattern":"^[a-z][a-z_]*\\.[a-z0-9_]+$","type":"string"},"sort":{"additionalProperties":false,"properties":{"dir":{"enum":["asc","desc"],"type":"string"},"key":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"}},"required":["key","dir"],"type":"object"}},"required":["metric"],"type":"object"},"subtitle":{"maxLength":200,"type":"string"},"tab":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"},"text":{"maxLength":4000,"type":"string"},"title":{"maxLength":120,"minLength":1,"type":"string"},"viz":{"additionalProperties":false,"properties":{"calcs":{"items":{"additionalProperties":false,"properties":{"a":{"maxLength":80,"type":"string"},"b":{"maxLength":80,"type":"string"},"key":{"pattern":"^calc_[1-9]$","type":"string"},"label":{"maxLength":60,"minLength":1,"type":"string"},"op":{"enum":["pct_of_total","running_total","delta","delta_pct","rank","divide","percentile"],"type":"string"},"scale":{"anyOf":[{"const":1,"type":"number"},{"const":100,"type":"number"}]}},"required":["key","label","op","a"],"type":"object"},"maxItems":5,"type":"array"},"options":{"additionalProperties":false,"default":{},"properties":{"annotateMilestones":{"description":"Also mark the schedule milestones the viewer can see.","type":"boolean"},"annotations":{"description":"Dated chart notes (line, area, column): a dashed line + label, listed in the chart table. Never values.","items":{"additionalProperties":false,"properties":{"date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"label":{"maxLength":60,"minLength":1,"type":"string"}},"required":["date","label"],"type":"object"},"maxItems":12,"type":"array"},"color":{"maxLength":80,"type":"string"},"compact":{"type":"boolean"},"cone":{"description":"Line over evm.bac / evm.ev / evm.ac by as_of: EAC P50 with the P10–P90 cone (MODELED).","type":"boolean"},"cumulative":{"type":"boolean"},"dataBars":{"items":{"maxLength":80,"type":"string"},"maxItems":4,"type":"array"},"digits":{"maximum":4,"minimum":0,"type":"integer"},"legend":{"enum":["auto","hidden"],"type":"string"},"maxCategories":{"maximum":50,"minimum":1,"type":"integer"},"percent":{"type":"boolean"},"referenceLines":{"items":{"additionalProperties":false,"properties":{"label":{"maxLength":60,"type":"string"},"settingKey":{"maxLength":80,"type":"string"},"value":{"type":"number"}},"required":["label"],"type":"object"},"maxItems":4,"type":"array"},"rules":{"items":{"additionalProperties":false,"properties":{"metric":{"maxLength":80,"type":"string"},"op":{"enum":["gt","gte","lt","lte","between"],"type":"string"},"settingKey":{"maxLength":80,"type":"string"},"tone":{"enum":["ok","warn","risk","info"],"type":"string"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["metric","op","tone"],"type":"object"},"maxItems":8,"type":"array"},"sameRegion":{"description":"strip: peers must also share the focus project’s region (viewers can toggle it).","type":"boolean"},"scenario":{"additionalProperties":false,"description":"The tile is the slip-cost SCENARIO panel; its saved inputs (never a value).","properties":{"milestone":{"exclusiveMinimum":0,"type":"integer"},"slipWeeks":{"maximum":26,"minimum":0,"type":"integer"}},"type":"object"},"seriesColors":{"additionalProperties":{"enum":["c0","c1","c2","c3","c4","c5","c6","c7","ok","warn","risk","info","neutral"],"type":"string"},"propertyNames":{"maxLength":80,"type":"string"},"type":"object"},"showValues":{"type":"boolean"},"size":{"maxLength":80,"type":"string"},"sparkline":{"type":"boolean"},"targetMetric":{"maxLength":80,"type":"string"},"x":{"maxLength":80,"type":"string"},"y2":{"items":{"maxLength":80,"type":"string"},"maxItems":4,"type":"array"},"yMax":{"type":"number"},"yMin":{"type":"number"}},"type":"object"},"type":{"enum":["kpi","bar","hbar","stacked_bar","line","area","combo","scatter","waterfall","heatmap","donut","gantt","table","pivot","strip"],"type":"string"}},"required":["type"],"type":"object"}},"required":["id","title","kind","layout"],"type":"object"},"maxItems":40,"type":"array"},"version":{"const":1,"type":"number"}},"required":["version","tiles"],"type":"object"},"description":{"maxLength":400,"type":"string"},"domain":{"enum":["portfolio","financials","evm","preconstruction","pm","field","quality_safety","schedule","vendors","bench","data_health","crm","documents","accounting"],"type":"string"},"key":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9-]*$","type":"string"},"persona":{"maxLength":60,"type":"string"},"scope":{"enum":["company","project","both"],"type":"string"},"title":{"maxLength":80,"minLength":1,"type":"string"}},"required":["key","title","description","domain","scope","persona","dashboard"],"type":"object"},"analytics_QueryBatchResult":{"properties":{"items":{"items":{"oneOf":[{"properties":{"ok":{"enum":[true],"type":"boolean"},"result":{"$ref":"#/components/schemas/analytics_QueryResult"}},"required":["ok","result"],"type":"object"},{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]},"ok":{"enum":[false],"type":"boolean"},"status":{"type":"integer"}},"required":["ok","status","errors"],"type":"object"}]},"type":"array"}},"required":["items"],"type":"object"},"analytics_QueryBody":{"additionalProperties":false,"properties":{"compare":{"oneOf":[{"enum":["previous_period","previous_year","ytd_vs_prior_ytd"],"type":"string"},{"additionalProperties":false,"description":"Custom offset window: exactly one of days or months.","properties":{"days":{"maximum":3660,"minimum":1,"type":"integer"},"kind":{"enum":["offset"],"type":"string"},"months":{"maximum":120,"minimum":1,"type":"integer"}},"required":["kind"],"type":"object"}]},"dimensions":{"default":[],"items":{"additionalProperties":false,"properties":{"grain":{"enum":["day","week","month","quarter","year"],"type":"string"},"key":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"}},"required":["key"],"type":"object"},"maxItems":3,"type":"array"},"filters":{"default":[],"description":"A value of \"$me\" on a people dimension (created_by, assignee, ball_in_court) binds to the viewer on the server, so one shared view is personal to everyone; it is 422 on any other dimension.","items":{"additionalProperties":false,"properties":{"dim":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"op":{"enum":["eq","neq","in","not_in","gt","gte","lt","lte","between","is_null","not_null","contains"],"type":"string"},"values":{"default":[],"items":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"number"},{"type":"boolean"}]},"maxItems":500,"type":"array"}},"required":["dim","op"],"type":"object"},"maxItems":20,"type":"array"},"limit":{"default":1000,"maximum":5000,"minimum":1,"type":"integer"},"metrics":{"items":{"maxLength":80,"pattern":"^[a-z][a-z_]*\\.[a-z0-9_]+$","type":"string"},"maxItems":8,"minItems":1,"type":"array"},"sort":{"default":[],"items":{"additionalProperties":false,"properties":{"dir":{"enum":["asc","desc"],"type":"string"},"key":{"maxLength":80,"type":"string"}},"required":["key","dir"],"type":"object"},"maxItems":3,"type":"array"},"time":{"additionalProperties":false,"properties":{"dim":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"from":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"preset":{"enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"},"to":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"type":"object"},"topN":{"additionalProperties":false,"properties":{"n":{"maximum":50,"minimum":1,"type":"integer"},"other":{"default":true,"type":"boolean"}},"required":["n"],"type":"object"}},"required":["metrics"],"type":"object"},"analytics_QueryResult":{"properties":{"columns":{"items":{"properties":{"direction":{"enum":["higher_better","lower_better","neutral"],"type":"string"},"grain":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"role":{"enum":["dim","metric"],"type":"string"},"type":{"enum":["string","number","date","bool"],"type":"string"},"unit":{"enum":["count","currency","hours","days","pct","ratio","rate","sqft","currency_per_sqft"],"type":"string"}},"required":["key","label","role","type"],"type":"object"},"type":"array"},"compare":{"properties":{"from":{"type":"string"},"rows":{"items":{"items":{"type":["string","number","null"]},"type":"array"},"type":"array"},"to":{"type":"string"},"totals":{"items":{"type":["number","null"]},"type":["array","null"]}},"required":["rows","totals","from","to"],"type":"object"},"labels":{"additionalProperties":{"additionalProperties":{"type":"string"},"type":"object"},"type":"object"},"meta":{"properties":{"asOf":{"type":"string"},"cached":{"type":"boolean"},"ms":{"type":"number"},"plans":{"items":{"properties":{"note":{"description":"Why the planner passed over a rollup (e.g. a grain no smaller than half its source). Analytics admins with SQL attached only.","type":"string"},"source":{"type":"string"},"via":{"enum":["base","snapshot","computed"],"type":"string"}},"required":["source","via"],"type":"object"},"type":"array"},"projects":{"description":"How many of the caller's readable projects the answer covers (never the company total).","type":"integer"},"sql":{"items":{"type":"string"},"type":"array"},"timezone":{"type":"string"}},"required":["ms","cached","asOf","timezone","plans"],"type":"object"},"partial":{"items":{"properties":{"excludedProjectIds":{"items":{"type":"integer"},"type":"array"},"metrics":{"items":{"type":"string"},"type":"array"},"reason":{"type":"string"}},"required":["reason","excludedProjectIds","metrics"],"type":"object"},"type":"array"},"rows":{"items":{"items":{"type":["string","number","null"]},"type":"array"},"type":"array"},"totals":{"items":{"type":["number","null"]},"type":["array","null"]},"truncated":{"type":"boolean"},"unavailable":{"items":{"properties":{"metric":{"type":"string"},"reason":{"enum":["forbidden","source_failed","timeout","scope"],"type":"string"}},"required":["metric","reason"],"type":"object"},"type":"array"}},"required":["columns","rows","labels","totals","truncated","partial","unavailable","meta"],"type":"object"},"analytics_QuerySpec":{"additionalProperties":false,"properties":{"compare":{"oneOf":[{"enum":["previous_period","previous_year","ytd_vs_prior_ytd"],"type":"string"},{"additionalProperties":false,"description":"Custom offset window: exactly one of days or months.","properties":{"days":{"maximum":3660,"minimum":1,"type":"integer"},"kind":{"enum":["offset"],"type":"string"},"months":{"maximum":120,"minimum":1,"type":"integer"}},"required":["kind"],"type":"object"}]},"dimensions":{"default":[],"items":{"additionalProperties":false,"properties":{"grain":{"enum":["day","week","month","quarter","year"],"type":"string"},"key":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"}},"required":["key"],"type":"object"},"maxItems":3,"type":"array"},"filters":{"default":[],"items":{"additionalProperties":false,"properties":{"dim":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"op":{"enum":["eq","neq","in","not_in","gt","gte","lt","lte","between","is_null","not_null","contains"],"type":"string"},"values":{"default":[],"items":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"number"},{"type":"boolean"}]},"maxItems":500,"type":"array"}},"required":["dim","op"],"type":"object"},"maxItems":20,"type":"array"},"limit":{"default":1000,"maximum":5000,"minimum":1,"type":"integer"},"metrics":{"items":{"maxLength":80,"pattern":"^[a-z][a-z_]*\\.[a-z0-9_]+$","type":"string"},"maxItems":8,"minItems":1,"type":"array"},"scope":{"additionalProperties":false,"default":{},"properties":{"projectIds":{"items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"maxItems":1000,"type":"array"}},"type":"object"},"sort":{"default":[],"items":{"additionalProperties":false,"properties":{"dir":{"enum":["asc","desc"],"type":"string"},"key":{"maxLength":80,"type":"string"}},"required":["key","dir"],"type":"object"},"maxItems":3,"type":"array"},"time":{"additionalProperties":false,"properties":{"dim":{"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$","type":"string"},"from":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"preset":{"enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"},"to":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"type":"object"},"topN":{"additionalProperties":false,"properties":{"n":{"maximum":50,"minimum":1,"type":"integer"},"other":{"default":true,"type":"boolean"}},"required":["n"],"type":"object"}},"required":["metrics"],"type":"object"},"analytics_ReportLink":{"description":"A published report link: a frozen render (PDF + read-only page at /r/{token}) made as its creator. Never carries the token after creation.","properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_viewed_at":{"format":"date-time","type":["string","null"]},"pack_key":{"type":["string","null"]},"project_id":{"type":["integer","null"]},"refresh":{"enum":["none","weekly"],"type":"string"},"rendered_at":{"format":"date-time","type":"string"},"revoke_reason":{"type":["string","null"]},"revoked_at":{"format":"date-time","type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"target_id":{"type":["integer","null"]},"target_type":{"enum":["dashboard","pack"],"type":"string"},"title":{"type":"string"},"view_count":{"type":"integer"}},"required":["id","title","target_type","target_id","pack_key","project_id","created_by","created_at","expires_at","revoked_at","revoke_reason","refresh","rendered_at","view_count","last_viewed_at","status"],"type":"object"},"analytics_ReportLinkCreated":{"allOf":[{"$ref":"#/components/schemas/analytics_ReportLink"},{"properties":{"token":{"description":"32 random bytes, base64url. Returned only here; the server stores a SHA-256 hash.","type":"string"},"url":{"description":"The public link (/r/{token}). Shown once.","type":"string"}},"required":["url","token"],"type":"object"}]},"analytics_ReportLinkInput":{"properties":{"expires_in_days":{"description":"At most the company report_link_max_days (default 90); defaults to it.","minimum":1,"type":"integer"},"filters":{"$ref":"#/components/schemas/analytics_FilterState"},"pack_key":{"description":"Curated pack key (target_type pack; analytics admins only).","type":"string"},"refresh":{"default":"none","description":"weekly: re-rendered as the creator every 7 days while they still have access and the setting is on; otherwise revoked.","enum":["none","weekly"],"type":"string"},"target_id":{"description":"Dashboard id (target_type dashboard).","type":"integer"},"target_type":{"enum":["dashboard","pack"],"type":"string"}},"required":["target_type"],"type":"object"},"analytics_Revision":{"properties":{"actor_id":{"type":"integer"},"actor_name":{"type":["string","null"]},"created_at":{"type":"string"},"current":{"type":"boolean"},"name":{"type":"string"},"summary":{"description":"What changed from the previous version (never values), e.g. \"tiles 7->8\".","type":"string"},"version":{"type":"integer"}},"required":["version","name","actor_id","actor_name","created_at","current","summary"],"type":"object"},"analytics_SavedView":{"properties":{"can_edit":{"description":"The caller may rename, change or delete it (own personal view, or a shared one as a dashboard editor).","type":"boolean"},"created_at":{"type":"string"},"dashboard_id":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"},"owner_id":{"type":"integer"},"shared":{"description":"Visible to everyone who can open the dashboard; false = the owner only.","type":"boolean"},"state":{"$ref":"#/components/schemas/analytics_FilterState"},"updated_at":{"type":"string"}},"required":["id","dashboard_id","name","state","shared","owner_id","can_edit","created_at","updated_at"],"type":"object"},"analytics_SavedViewInput":{"additionalProperties":false,"properties":{"name":{"maxLength":80,"minLength":1,"type":"string"},"shared":{"default":false,"description":"Share with everyone who can open the dashboard (dashboard editors only, else 403).","type":"boolean"},"state":{"$ref":"#/components/schemas/analytics_FilterState"}},"required":["name","state"],"type":"object"},"analytics_SavedViewPatch":{"additionalProperties":false,"properties":{"name":{"maxLength":80,"minLength":1,"type":"string"},"shared":{"description":"Changing it needs dashboard edit rights.","type":"boolean"},"state":{"$ref":"#/components/schemas/analytics_FilterState"}},"required":[],"type":"object"},"analytics_Schedule":{"properties":{"burst":{"enum":["none","project"],"type":"string"},"cadence":{"enum":["daily","weekly","monthly"],"type":"string"},"company_id":{"type":"integer"},"condition":{"oneOf":[{"$ref":"#/components/schemas/analytics_ScheduleCondition"},{"type":"null"}]},"created_at":{"type":"string"},"created_by_id":{"type":"integer"},"download_url":{"type":["string","null"]},"enabled":{"type":"boolean"},"filters":{"$ref":"#/components/schemas/analytics_FilterState"},"format":{"enum":["csv","xlsx","pdf"],"type":"string"},"hour":{"type":"integer"},"id":{"type":"integer"},"last_error":{"type":["string","null"]},"last_run_at":{"type":["string","null"]},"last_status":{"type":["string","null"]},"monthday":{"type":["integer","null"]},"name":{"type":"string"},"next_run_at":{"type":"string"},"pack_key":{"type":["string","null"]},"project_id":{"type":["integer","null"]},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"target_id":{"type":["integer","null"]},"target_type":{"enum":["dashboard","exploration","pack","story"],"type":"string"},"timezone":{"type":"string"},"updated_at":{"type":"string"},"view_id":{"description":"Saved filter view of the target dashboard (dashboards only), applied before `filters` (a key in `filters` wins). A personal view can only go to its owner; share it to send it to others.","type":["integer","null"]},"webhook":{"description":"Also post `analytics.schedule.delivered` to the company's webhook subscriptions: metadata plus a signed, expiring download link to ONE file rendered as the schedule owner (never per recipient, never values in the payload). With burst: project, one event per project the owner can read, each with that project_id and its own file. The link needs the report_links_enabled setting (else download_url is null). Analytics admins only; not for story schedules.","type":"boolean"},"weekday":{"type":["integer","null"]}},"required":["id","company_id","project_id","name","target_type","target_id","pack_key","filters","format","cadence","hour","weekday","monthday","timezone","recipient_ids","enabled","next_run_at","last_run_at","last_status","last_error","download_url","created_by_id","created_at","updated_at","burst","condition","webhook","view_id"],"type":"object"},"analytics_ScheduleCondition":{"additionalProperties":false,"description":"\"Send only if\": evaluated before each run as the schedule owner (owner's frozen token scopes as ceiling), through the same read as an alert. False, unreadable or no value = the run is skipped (last_status `skipped`, audited); nothing is sent.","properties":{"filters":{"items":{"type":"object"},"maxItems":20,"type":"array"},"metric_key":{"type":"string"},"op":{"description":"As AlertRuleInput.op (pct_*: threshold is a percent change vs the previous window; window all is rejected).","enum":["gt","lt","pct_up","pct_down"],"type":"string"},"threshold":{"type":"number"},"window":{"default":"last_30d","enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"}},"required":["metric_key","op","threshold"],"type":"object"},"analytics_ScheduleInput":{"properties":{"burst":{"default":"none","description":"One file per readable project (company scope only).","enum":["none","project"],"type":"string"},"cadence":{"enum":["daily","weekly","monthly"],"type":"string"},"condition":{"$ref":"#/components/schemas/analytics_ScheduleCondition"},"enabled":{"type":"boolean"},"filters":{"$ref":"#/components/schemas/analytics_FilterState"},"format":{"enum":["csv","xlsx","pdf"],"type":"string"},"hour":{"maximum":23,"minimum":0,"type":"integer"},"monthday":{"maximum":31,"minimum":1,"type":"integer"},"name":{"maxLength":120,"minLength":1,"type":"string"},"pack_key":{"type":"string"},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"target_id":{"type":"integer"},"target_type":{"description":"story = the weekly Project Story: no target_id or pack_key, format pdf, and at company scope burst=project.","enum":["dashboard","exploration","pack","story"],"type":"string"},"timezone":{"type":"string"},"view_id":{"description":"Saved filter view of the target dashboard (dashboards only), applied before `filters` (a key in `filters` wins). A personal view can only go to its owner; share it to send it to others.","type":"integer"},"webhook":{"default":false,"description":"Also post `analytics.schedule.delivered` to the company's webhook subscriptions: metadata plus a signed, expiring download link to ONE file rendered as the schedule owner (never per recipient, never values in the payload). With burst: project, one event per project the owner can read, each with that project_id and its own file. The link needs the report_links_enabled setting (else download_url is null). Analytics admins only; not for story schedules.","type":"boolean"},"weekday":{"maximum":6,"minimum":0,"type":"integer"}},"required":["name","target_type","format","cadence","recipient_ids"],"type":"object"},"analytics_SchedulePatch":{"properties":{"burst":{"enum":["none","project"],"type":"string"},"cadence":{"enum":["daily","weekly","monthly"],"type":"string"},"condition":{"description":"null removes the condition (always send).","oneOf":[{"$ref":"#/components/schemas/analytics_ScheduleCondition"},{"type":"null"}]},"enabled":{"type":"boolean"},"filters":{"$ref":"#/components/schemas/analytics_FilterState"},"format":{"enum":["csv","xlsx","pdf"],"type":"string"},"hour":{"maximum":23,"minimum":0,"type":"integer"},"monthday":{"maximum":31,"minimum":1,"type":"integer"},"name":{"maxLength":120,"minLength":1,"type":"string"},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"timezone":{"type":"string"},"view_id":{"description":"null removes the saved view. Saved filter view of the target dashboard (dashboards only), applied before `filters` (a key in `filters` wins). A personal view can only go to its owner; share it to send it to others.","type":["integer","null"]},"webhook":{"description":"Also post `analytics.schedule.delivered` to the company's webhook subscriptions: metadata plus a signed, expiring download link to ONE file rendered as the schedule owner (never per recipient, never values in the payload). With burst: project, one event per project the owner can read, each with that project_id and its own file. The link needs the report_links_enabled setting (else download_url is null). Analytics admins only; not for story schedules.","type":"boolean"},"weekday":{"maximum":6,"minimum":0,"type":"integer"}},"required":[],"type":"object"},"analytics_Settings":{"properties":{"company_id":{"type":"integer"},"project_id":{"type":["integer","null"]},"settings":{"items":{"properties":{"default":{},"description":{"type":"string"},"group":{"type":"string"},"inherited":{"description":"Project scope only: the company default under this project's override (null otherwise)."},"key":{"type":"string"},"label":{"type":"string"},"origin":{"enum":["default","company","project"],"type":"string"},"scope":{"description":"company = ignores project overrides (e.g. timezone).","enum":["company","both"],"type":"string"},"unit":{"type":["string","null"]},"value":{}},"required":["key","label","description","group","unit","value","default","origin","scope","inherited"],"type":"object"},"type":"array"}},"required":["company_id","project_id","settings"],"type":"object"},"analytics_Share":{"properties":{"access":{"enum":["view","edit"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"detail":{"description":"Login for people (\"(inactive)\" when deactivated); \"Everyone with this role\" for roles","type":["string","null"]},"name":{"description":"Person or role name","type":"string"},"principal_id":{"type":"integer"},"principal_type":{"enum":["user","template"],"type":"string"}},"required":["principal_type","principal_id","name","detail","access","created_at"],"type":"object"},"analytics_ShareList":{"properties":{"shares":{"items":{"$ref":"#/components/schemas/analytics_Share"},"type":"array"}},"required":["shares"],"type":"object"},"analytics_ShareSet":{"additionalProperties":false,"properties":{"shares":{"items":{"additionalProperties":false,"properties":{"access":{"default":"view","enum":["view","edit"],"type":"string"},"principal_id":{"minimum":1,"type":"integer"},"principal_type":{"enum":["user","template"],"type":"string"}},"required":["principal_type","principal_id"],"type":"object"},"maxItems":200,"type":"array"}},"required":["shares"],"type":"object"},"analytics_Story":{"additionalProperties":false,"description":"A sentence whose input metric the caller cannot read is absent (never zero, never marked hidden). At most 3 sentences per section and 18 per week story.","properties":{"asOf":{"format":"date","type":"string"},"horizon":{"enum":["week","today"],"type":"string"},"magnitude":{"type":"number"},"projectId":{"type":"integer"},"projectName":{"type":"string"},"sections":{"items":{"$ref":"#/components/schemas/analytics_StorySection"},"type":"array"},"title":{"type":"string"}},"required":["title","horizon","asOf","projectId","projectName","magnitude","sections"],"type":"object"},"analytics_StorySection":{"additionalProperties":false,"properties":{"heading":{"type":"string"},"key":{"type":"string"},"sentences":{"items":{"$ref":"#/components/schemas/analytics_StorySentence"},"type":"array"}},"required":["key","heading","sentences"],"type":"object"},"analytics_StorySentence":{"additionalProperties":false,"properties":{"figure":{"description":"Today: the big number on the tile.","type":"string"},"href":{"description":"Internal app path to the cited number (Explore on the exact query, or the insights feed).","type":"string"},"key":{"type":"string"},"metricKeys":{"items":{"type":"string"},"type":"array"},"score":{"type":"number"},"spark":{"description":"Today: a small series behind the figure, oldest first.","items":{"type":"number"},"type":"array"},"text":{"description":"Deterministic template filled from engine results computed as the caller.","type":"string"},"tone":{"enum":["ok","risk","warn","neutral"],"type":"string"}},"required":["key","text","tone","href","metricKeys","score"],"type":"object"},"analytics_Usage":{"properties":{"count":{"type":"integer"},"items":{"items":{"$ref":"#/components/schemas/analytics_UsageItem"},"type":"array"},"key":{"type":"string"}},"required":["key","count","items"],"type":"object"},"analytics_UsageItem":{"properties":{"href":{"type":"string"},"id":{"type":["integer","string"]},"name":{"type":"string"},"project_id":{"type":["integer","null"]},"type":{"enum":["dashboard","exploration","alert","schedule","custom_metric","pack"],"type":"string"}},"required":["type","id","name","href","project_id"],"type":"object"},"analytics_ValueGroup":{"properties":{"base":{"type":"string"},"base_label":{"type":"string"},"description":{"type":"string"},"groups":{"$ref":"#/components/schemas/analytics_ValueGroups"},"id":{"type":"integer"},"key":{"pattern":"^grp_","type":"string"},"label":{"type":"string"},"other_label":{"type":"string"},"status":{"enum":["published","archived"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"updated_by_id":{"type":"integer"},"version":{"type":"integer"}},"required":["id","key","label","description","base","base_label","groups","other_label","version","status","updated_by_id","updated_at"],"type":"object"},"analytics_ValueGroupBand":{"additionalProperties":false,"properties":{"label":{"maxLength":60,"type":"string"},"max":{"type":["number","null"]}},"required":["label","max"],"type":"object"},"analytics_ValueGroupInput":{"additionalProperties":false,"properties":{"base":{"description":"Base dimension key (static or cf_; never grp_ or a date).","maxLength":64,"type":"string"},"description":{"maxLength":500,"type":"string"},"groups":{"$ref":"#/components/schemas/analytics_ValueGroups"},"label":{"maxLength":80,"type":"string"},"other_label":{"default":"Other","maxLength":60,"type":"string"},"slug":{"description":"Key becomes grp_<slug>; derived from the label when omitted.","pattern":"^[a-z][a-z0-9_]{0,40}$","type":"string"}},"required":["label","base","groups"],"type":"object"},"analytics_ValueGroupList":{"additionalProperties":false,"properties":{"label":{"maxLength":60,"type":"string"},"values":{"items":{"type":["string","number","boolean"]},"maxItems":1000,"minItems":1,"type":"array"}},"required":["label","values"],"type":"object"},"analytics_ValueGroupPatch":{"additionalProperties":false,"properties":{"base":{"type":"string"},"description":{"type":"string"},"groups":{"$ref":"#/components/schemas/analytics_ValueGroups"},"label":{"type":"string"},"other_label":{"type":"string"}},"type":"object"},"analytics_ValueGroups":{"oneOf":[{"items":{"$ref":"#/components/schemas/analytics_ValueGroupList"},"maxItems":30,"minItems":1,"type":"array"},{"items":{"$ref":"#/components/schemas/analytics_ValueGroupBand"},"maxItems":30,"minItems":1,"type":"array"}]},"analytics_VizSpec":{"additionalProperties":false,"properties":{"calcs":{"items":{"additionalProperties":false,"properties":{"a":{"maxLength":80,"type":"string"},"b":{"maxLength":80,"type":"string"},"key":{"pattern":"^calc_[1-9]$","type":"string"},"label":{"maxLength":60,"minLength":1,"type":"string"},"op":{"enum":["pct_of_total","running_total","delta","delta_pct","rank","divide","percentile"],"type":"string"},"scale":{"anyOf":[{"const":1,"type":"number"},{"const":100,"type":"number"}]}},"required":["key","label","op","a"],"type":"object"},"maxItems":5,"type":"array"},"options":{"additionalProperties":false,"default":{},"properties":{"annotateMilestones":{"description":"Also mark the schedule milestones the viewer can see.","type":"boolean"},"annotations":{"description":"Dated chart notes (line, area, column): a dashed line + label, listed in the chart table. Never values.","items":{"additionalProperties":false,"properties":{"date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"label":{"maxLength":60,"minLength":1,"type":"string"}},"required":["date","label"],"type":"object"},"maxItems":12,"type":"array"},"color":{"maxLength":80,"type":"string"},"compact":{"type":"boolean"},"cone":{"description":"Line over evm.bac / evm.ev / evm.ac by as_of: EAC P50 with the P10–P90 cone (MODELED).","type":"boolean"},"cumulative":{"type":"boolean"},"dataBars":{"items":{"maxLength":80,"type":"string"},"maxItems":4,"type":"array"},"digits":{"maximum":4,"minimum":0,"type":"integer"},"legend":{"enum":["auto","hidden"],"type":"string"},"maxCategories":{"maximum":50,"minimum":1,"type":"integer"},"percent":{"type":"boolean"},"referenceLines":{"items":{"additionalProperties":false,"properties":{"label":{"maxLength":60,"type":"string"},"settingKey":{"maxLength":80,"type":"string"},"value":{"type":"number"}},"required":["label"],"type":"object"},"maxItems":4,"type":"array"},"rules":{"items":{"additionalProperties":false,"properties":{"metric":{"maxLength":80,"type":"string"},"op":{"enum":["gt","gte","lt","lte","between"],"type":"string"},"settingKey":{"maxLength":80,"type":"string"},"tone":{"enum":["ok","warn","risk","info"],"type":"string"},"value":{"type":"number"},"value2":{"type":"number"}},"required":["metric","op","tone"],"type":"object"},"maxItems":8,"type":"array"},"sameRegion":{"description":"strip: peers must also share the focus project’s region (viewers can toggle it).","type":"boolean"},"scenario":{"additionalProperties":false,"description":"The tile is the slip-cost SCENARIO panel; its saved inputs (never a value).","properties":{"milestone":{"exclusiveMinimum":0,"type":"integer"},"slipWeeks":{"maximum":26,"minimum":0,"type":"integer"}},"type":"object"},"seriesColors":{"additionalProperties":{"enum":["c0","c1","c2","c3","c4","c5","c6","c7","ok","warn","risk","info","neutral"],"type":"string"},"propertyNames":{"maxLength":80,"type":"string"},"type":"object"},"showValues":{"type":"boolean"},"size":{"maxLength":80,"type":"string"},"sparkline":{"type":"boolean"},"targetMetric":{"maxLength":80,"type":"string"},"x":{"maxLength":80,"type":"string"},"y2":{"items":{"maxLength":80,"type":"string"},"maxItems":4,"type":"array"},"yMax":{"type":"number"},"yMin":{"type":"number"}},"type":"object"},"type":{"enum":["kpi","bar","hbar","stacked_bar","line","area","combo","scatter","waterfall","heatmap","donut","gantt","table","pivot","strip"],"type":"string"}},"required":["type"],"type":"object"},"approvals_Approval":{"properties":{"amount":{"description":"Decimal string with two places","nullable":true,"type":"string"},"completed_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"events":{"items":{"$ref":"#/components/schemas/approvals_Event"},"type":"array"},"facts":{"type":"object"},"id":{"type":"integer"},"object_id":{"type":"integer"},"object_label":{"type":"string"},"object_type":{"type":"string"},"plan":{"items":{"type":"object"},"type":"array"},"policy_id":{"nullable":true,"type":"integer"},"policy_version":{"nullable":true,"type":"integer"},"project_id":{"nullable":true,"type":"integer"},"record_url":{"nullable":true,"type":"string"},"rejected_reason":{"nullable":true,"type":"string"},"round":{"type":"integer"},"source_ref":{"nullable":true,"type":"string"},"started_via":{"enum":["user","automation"],"type":"string"},"status":{"enum":["pending","approved","rejected","cancelled","superseded"],"type":"string"},"submitted_by_id":{"type":"integer"},"supersedes_id":{"nullable":true,"type":"integer"},"tasks":{"items":{"$ref":"#/components/schemas/approvals_Task"},"type":"array"},"title":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","object_type","object_id","status","tasks"],"type":"object"},"approvals_ApproverRef":{"description":"user {user_id} | project_role {role} | permission_template {template_id} | accounting_role {role} | company_admin | dynamic {key: project_manager | project_executive | cost_code_owner}","properties":{"key":{"enum":["project_manager","project_executive","cost_code_owner"],"type":"string"},"role":{"type":"string"},"template_id":{"type":"integer"},"type":{"enum":["user","project_role","permission_template","accounting_role","company_admin","dynamic"],"type":"string"},"user_id":{"type":"integer"}},"required":["type"],"type":"object"},"approvals_BulkResult":{"properties":{"results":{"items":{"properties":{"error":{"type":"string"},"instance_id":{"type":"integer"},"ok":{"type":"boolean"},"outcome":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"approvals_Clearance":{"properties":{"approval_id":{"nullable":true,"type":"integer"},"clear":{"type":"boolean"},"message":{"nullable":true,"type":"string"},"reason":{"enum":["no_policy","approved","approval_required","approval_pending","reapproval_required"],"type":"string"}},"type":"object"},"approvals_Condition":{"properties":{"field":{"enum":["amount","pct_of_contract","cost_type","project_id","vendor_id","vendor_risk","cost_code_id","change_amount"],"type":"string"},"op":{"enum":["gt","gte","lt","lte","eq","neq","in","not_in"],"type":"string"},"value":{"oneOf":[{"type":"number"},{"type":"string"},{"items":{"oneOf":[{"type":"number"},{"type":"string"}]},"type":"array"}]}},"required":["field","op","value"],"type":"object"},"approvals_CostCodeOwner":{"properties":{"cost_code_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"project_id":{"type":"integer"},"user_id":{"type":"integer"}},"type":"object"},"approvals_DecisionResult":{"properties":{"approval":{"$ref":"#/components/schemas/approvals_Approval"},"outcome":{"enum":["recorded","approved","rejected"],"type":"string"}},"required":["outcome","approval"],"type":"object"},"approvals_Delegation":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"ends_at":{"format":"date-time","type":"string"},"from_user_id":{"type":"integer"},"id":{"type":"integer"},"object_types":{"items":{"type":"string"},"type":"array"},"reason":{"type":"string"},"revoked_at":{"format":"date-time","nullable":true,"type":"string"},"starts_at":{"format":"date-time","type":"string"},"to_user_id":{"type":"integer"}},"required":["id","from_user_id","to_user_id"],"type":"object"},"approvals_Event":{"properties":{"actor_user_id":{"nullable":true,"type":"integer"},"changes":{"nullable":true},"comment":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"task_id":{"nullable":true,"type":"integer"}},"required":["id","kind","created_at"],"type":"object"},"approvals_ObjectType":{"properties":{"bulk_approve":{"type":"boolean"},"guards":{"items":{"type":"string"},"type":"array"},"label":{"type":"string"},"object_type":{"type":"string"}},"type":"object"},"approvals_Policy":{"properties":{"conditions":{"items":{"$ref":"#/components/schemas/approvals_Condition"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"description":{"nullable":true,"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"object_type":{"type":"string"},"priority":{"type":"integer"},"project_id":{"nullable":true,"type":"integer"},"reapproval":{"$ref":"#/components/schemas/approvals_Reapproval"},"stages":{"items":{"$ref":"#/components/schemas/approvals_Stage"},"type":"array"},"template_key":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"updated_by_id":{"type":"integer"},"version":{"type":"integer"}},"required":["id","object_type","name","stages","is_active","version"],"type":"object"},"approvals_PolicyInput":{"properties":{"conditions":{"items":{"$ref":"#/components/schemas/approvals_Condition"},"type":"array"},"description":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"object_type":{"enum":["change_order","commitment_change_order","payment_application","purchase_request","subcontract","purchase_order","ap_bill","payment_batch","ar_invoice","submittal","expense_report","budget_change","contingency_draw"],"type":"string"},"priority":{"type":"integer"},"project_id":{"nullable":true,"type":"integer"},"reapproval":{"$ref":"#/components/schemas/approvals_Reapproval"},"stages":{"items":{"$ref":"#/components/schemas/approvals_Stage"},"type":"array"},"template_key":{"nullable":true,"type":"string"}},"type":"object"},"approvals_Quorum":{"properties":{"n":{"type":"integer"},"type":{"enum":["any","all","n"],"type":"string"}},"required":["type"],"type":"object"},"approvals_Reapproval":{"properties":{"amount":{"nullable":true,"type":"number"},"on_decrease":{"type":"boolean"},"percent":{"nullable":true,"type":"number"}},"type":"object"},"approvals_RecordStatus":{"properties":{"approvals":{"items":{"$ref":"#/components/schemas/approvals_Approval"},"type":"array"},"clearance":{"$ref":"#/components/schemas/approvals_Clearance"},"object_id":{"type":"integer"},"object_type":{"type":"string"}},"type":"object"},"approvals_Simulation":{"properties":{"approval_required":{"type":"boolean"},"facts":{"type":"object"},"guards":{"items":{"type":"string"},"type":"array"},"object_id":{"nullable":true,"type":"integer"},"object_type":{"type":"string"},"policy":{"nullable":true,"properties":{"id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"project_id":{"nullable":true,"type":"integer"}},"type":"object"},"stages":{"items":{"properties":{"approvers":{"items":{"properties":{"name":{"type":"string"},"source":{"type":"string"},"user_id":{"type":"integer"}},"type":"object"},"type":"array"},"excluded":{"items":{"properties":{"name":{"type":"string"},"reason":{"type":"string"},"user_id":{"type":"integer"}},"type":"object"},"type":"array"},"fallback":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"parallel":{"type":"boolean"},"quorum":{"type":"integer"},"quorum_rule":{"$ref":"#/components/schemas/approvals_Quorum"},"seq":{"type":"integer"},"sla_hours":{"nullable":true,"type":"number"}},"type":"object"},"type":"array"},"title":{"type":"string"}},"required":["object_type","approval_required","stages","guards"],"type":"object"},"approvals_Stage":{"properties":{"approvers":{"items":{"$ref":"#/components/schemas/approvals_ApproverRef"},"type":"array"},"conditions":{"items":{"$ref":"#/components/schemas/approvals_Condition"},"type":"array"},"escalate_after_hours":{"nullable":true,"type":"number"},"escalate_to":{"items":{"$ref":"#/components/schemas/approvals_ApproverRef"},"type":"array"},"key":{"type":"string"},"name":{"type":"string"},"parallel_with_previous":{"type":"boolean"},"quorum":{"$ref":"#/components/schemas/approvals_Quorum"},"reminder_every_hours":{"nullable":true,"type":"number"},"sla_hours":{"nullable":true,"type":"number"}},"required":["key","name","approvers"],"type":"object"},"approvals_StartResult":{"properties":{"approval":{"$ref":"#/components/schemas/approvals_Approval","nullable":true},"status":{"enum":["pending","not_required"],"type":"string"}},"required":["status"],"type":"object"},"approvals_Task":{"properties":{"acted_as_delegate_of_id":{"nullable":true,"type":"integer"},"acted_at":{"format":"date-time","nullable":true,"type":"string"},"acted_by_id":{"nullable":true,"type":"integer"},"activated_at":{"format":"date-time","nullable":true,"type":"string"},"approver_user_id":{"type":"integer"},"comment":{"nullable":true,"type":"string"},"due_at":{"format":"date-time","nullable":true,"type":"string"},"escalated_to_user_ids":{"items":{"type":"integer"},"type":"array"},"escalation_level":{"type":"integer"},"id":{"type":"integer"},"quorum":{"type":"integer"},"reminder_count":{"type":"integer"},"seq":{"type":"integer"},"source":{"type":"string"},"stage_index":{"type":"integer"},"stage_key":{"type":"string"},"stage_name":{"type":"string"},"status":{"enum":["waiting","pending","approved","rejected","void"],"type":"string"}},"required":["id","seq","stage_name","approver_user_id","status","quorum"],"type":"object"},"approvals_Template":{"properties":{"conditions":{"items":{"$ref":"#/components/schemas/approvals_Condition"},"type":"array"},"description":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"object_type":{"type":"string"},"reapproval":{"$ref":"#/components/schemas/approvals_Reapproval"},"stages":{"items":{"$ref":"#/components/schemas/approvals_Stage"},"type":"array"}},"required":["key","name","object_type","stages"],"type":"object"},"automations_Automation":{"properties":{"actions":{"items":{"type":"object"},"type":"array"},"conditions":{"type":"object"},"consecutive_failures":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"description":{"nullable":true,"type":"string"},"enabled":{"type":"boolean"},"id":{"type":"integer"},"last_run_at":{"format":"date-time","nullable":true,"type":"string"},"last_run_status":{"nullable":true,"type":"string"},"max_runs_per_hour":{"type":"integer"},"name":{"type":"string"},"next_run_at":{"format":"date-time","nullable":true,"type":"string"},"owner":{"description":"Actions run with this person's permissions; the last person to save the rule.","properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"paused_reason":{"nullable":true,"type":"string"},"project":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"scope":{"enum":["company","project"],"type":"string"},"template_key":{"nullable":true,"type":"string"},"trigger":{"type":"object"},"trigger_summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"type":"integer"}},"required":["id","name","enabled","scope","trigger","conditions","actions","version","owner"],"type":"object"},"automations_AutomationDryRun":{"properties":{"actions":{"items":{"properties":{"index":{"type":"integer"},"preview":{"type":"string"},"type":{"type":"string"}},"type":"object"},"type":"array"},"context":{"nullable":true,"type":"object"},"matched":{"type":"boolean"},"run_id":{"type":"string"},"skipped_reason":{"nullable":true,"type":"string"},"trace":{"nullable":true,"type":"object"}},"required":["matched","actions"],"type":"object"},"automations_AutomationRun":{"properties":{"attempts":{"type":"integer"},"automation_id":{"type":"integer"},"automation_name":{"nullable":true,"type":"string"},"automation_version":{"type":"integer"},"condition_trace":{"nullable":true,"type":"object"},"conditions_matched":{"nullable":true,"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"depth":{"description":"Automation chain depth; runs stop at 3.","type":"integer"},"dry_run":{"type":"boolean"},"error":{"nullable":true,"type":"string"},"event":{"nullable":true,"properties":{"id":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"}},"type":"object"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"input":{"type":"object"},"outcomes":{"items":{"properties":{"detail":{"nullable":true,"type":"string"},"error":{"nullable":true,"type":"string"},"index":{"type":"integer"},"record":{"nullable":true,"type":"object"},"status":{"enum":["started","succeeded","failed","retrying","uncertain","skipped","preview"],"type":"string"},"type":{"type":"string"}},"type":"object"},"type":"array"},"project_id":{"nullable":true,"type":"integer"},"resource":{"nullable":true,"properties":{"id":{"nullable":true,"type":"string"},"type":{"type":"string"}},"type":"object"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"enum":["queued","running","succeeded","partial","failed","skipped","dry_run"],"type":"string"},"trigger_key":{"type":"string"}},"required":["id","automation_id","status","dry_run","outcomes","created_at"],"type":"object"},"bidding_BidAddendumAcknowledgment":{"additionalProperties":false,"properties":{"acknowledged_at":{"format":"date-time","type":"string"},"bid_package_id":{"minimum":1,"type":"integer"},"changed_fields":{"items":{"$ref":"#/components/schemas/bidding_BidAddendumChangedField"},"maxItems":9,"type":"array"},"company_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"invitation_id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"recipient_user_id":{"minimum":1,"type":"integer"},"release_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"release_version_id":{"minimum":1,"type":"integer"},"source_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["id","company_id","project_id","bid_package_id","invitation_id","recipient_user_id","release_version_id","release_sha256","source_sha256","changed_fields","acknowledged_at"],"type":"object"},"bidding_BidAddendumChangedField":{"additionalProperties":false,"properties":{"current_value":{"nullable":true,"type":"string"},"field":{"enum":["title","description","bidWebMessage","bidEmailMessage","bidDueDate","blindBidding","sealed","forms","attachments"],"type":"string"}},"required":["field","current_value"],"type":"object"},"bidding_BidAddendumCurrent":{"additionalProperties":false,"properties":{"changes":{"items":{"$ref":"#/components/schemas/bidding_BidAddendumChangedField"},"maxItems":9,"type":"array"},"current":{"additionalProperties":false,"nullable":true,"properties":{"acknowledged_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"source_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["id","source_sha256","acknowledged_at"],"type":"object"},"release_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"release_version":{"minimum":1,"type":"integer"},"release_version_id":{"minimum":1,"type":"integer"},"required":{"type":"boolean"}},"required":["required","release_version_id","release_version","release_sha256","changes","current"],"type":"object"},"bidding_BidAwardCandidate":{"additionalProperties":false,"properties":{"addendum_acknowledgment_id":{"minimum":1,"type":"integer"},"addendum_acknowledgment_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"bid_id":{"minimum":1,"type":"integer"},"bidder_terms":{"$ref":"#/components/schemas/bidding_BidAwardCandidateTerms"},"lump_sum_amount":{"nullable":true,"type":"string"},"priced_total":{"nullable":true,"type":"string"},"pricing_reconciled":{"type":"boolean"},"receipt_id":{"minimum":1,"type":"integer"},"receipt_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"revision":{"minimum":1,"type":"integer"},"submitted_at":{"format":"date-time","type":"string"},"vendor_id":{"minimum":1,"type":"integer"}},"required":["bid_id","vendor_id","receipt_id","revision","receipt_sha256","submitted_at","lump_sum_amount","priced_total","pricing_reconciled","bidder_terms"],"type":"object"},"bidding_BidAwardCandidateTerms":{"additionalProperties":false,"properties":{"alternates":{"items":{"$ref":"#/components/schemas/bidding_BidSubmissionAlternate"},"maxItems":10,"type":"array"},"comments":{"nullable":true,"type":"string"},"exclusion":{"nullable":true,"type":"string"},"inclusion":{"nullable":true,"type":"string"},"lead_time":{"nullable":true,"type":"string"},"qualifications":{"items":{"maxLength":500,"minLength":1,"type":"string"},"maxItems":10,"type":"array"}},"required":["comments","inclusion","exclusion","lead_time"],"type":"object"},"bidding_BidAwardComparisonSnapshot":{"additionalProperties":false,"properties":{"candidates":{"items":{"$ref":"#/components/schemas/bidding_BidAwardCandidate"},"maxItems":500,"type":"array"},"company_id":{"minimum":1,"type":"integer"},"package_id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"release_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"release_version":{"minimum":1,"type":"integer"},"release_version_id":{"minimum":1,"type":"integer"},"selected_bid_id":{"minimum":1,"type":"integer"},"selected_receipt_id":{"minimum":1,"type":"integer"},"version":{"enum":[1],"type":"integer"}},"required":["version","company_id","project_id","package_id","release_version_id","release_version","release_sha256","selected_bid_id","selected_receipt_id","candidates"],"type":"object"},"bidding_BidAwardRecommendation":{"additionalProperties":false,"properties":{"approval_reason":{"minLength":10,"nullable":true,"type":"string"},"approved_at":{"format":"date-time","nullable":true,"type":"string"},"approver_id":{"minimum":1,"nullable":true,"type":"integer"},"bid_package_id":{"minimum":1,"type":"integer"},"company_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"proposal_reason":{"minLength":10,"type":"string"},"proposed_at":{"format":"date-time","type":"string"},"proposer_id":{"minimum":1,"type":"integer"},"release_version_id":{"minimum":1,"type":"integer"},"review_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"review_snapshot":{"$ref":"#/components/schemas/bidding_BidAwardReviewSnapshot"},"selected_bid_id":{"minimum":1,"type":"integer"},"selected_receipt_id":{"minimum":1,"type":"integer"},"source_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"source_snapshot":{"$ref":"#/components/schemas/bidding_BidAwardComparisonSnapshot"},"status":{"enum":["proposed","approved","superseded"],"type":"string"},"superseded_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","company_id","project_id","bid_package_id","release_version_id","selected_bid_id","selected_receipt_id","status","source_sha256","source_snapshot","review_sha256","review_snapshot","proposer_id","proposal_reason","proposed_at","approver_id","approval_reason","approved_at","superseded_at"],"type":"object"},"bidding_BidAwardRecommendationPreview":{"additionalProperties":false,"properties":{"release_version_id":{"minimum":1,"type":"integer"},"selected_receipt_id":{"minimum":1,"type":"integer"},"snapshot":{"$ref":"#/components/schemas/bidding_BidAwardComparisonSnapshot"},"source_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["source_sha256","release_version_id","selected_receipt_id","snapshot"],"type":"object"},"bidding_BidAwardRecommendationProposalInput":{"additionalProperties":false,"properties":{"alternates_note":{"maxLength":1000,"nullable":true,"type":"string"},"bid_id":{"minimum":1,"type":"integer"},"cost_code_note":{"maxLength":1000,"nullable":true,"type":"string"},"qualifications_note":{"maxLength":1000,"nullable":true,"type":"string"},"reason":{"maxLength":1000,"minLength":10,"type":"string"},"request_key":{"format":"uuid","type":"string"},"schedule_note":{"maxLength":1000,"nullable":true,"type":"string"},"scope_exceptions":{"items":{"maxLength":500,"minLength":1,"type":"string"},"maxItems":20,"type":"array"},"selected_cost_code_ids":{"items":{"minimum":1,"type":"integer"},"maxItems":20,"type":"array","uniqueItems":true},"source_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["bid_id","source_sha256","reason","request_key"],"type":"object"},"bidding_BidAwardReviewSnapshot":{"additionalProperties":false,"properties":{"alternates_note":{"maxLength":1000,"nullable":true,"type":"string"},"cost_code_note":{"maxLength":1000,"nullable":true,"type":"string"},"qualifications_note":{"maxLength":1000,"nullable":true,"type":"string"},"schedule_note":{"maxLength":1000,"nullable":true,"type":"string"},"scope_exceptions":{"items":{"maxLength":500,"minLength":1,"type":"string"},"maxItems":20,"type":"array"},"selected_cost_code_ids":{"items":{"minimum":1,"type":"integer"},"maxItems":20,"type":"array","uniqueItems":true}},"required":["scope_exceptions","alternates_note","qualifications_note","schedule_note","cost_code_note","selected_cost_code_ids"],"type":"object"},"bidding_BidForm":{"properties":{"bid_form_items":{"items":{"$ref":"#/components/schemas/bidding_BidFormItem"},"type":"array"},"id":{"minimum":1,"type":"integer"},"position":{"minimum":0,"type":"integer"},"title":{"type":"string"}},"required":["id","title","position","bid_form_items"],"type":"object"},"bidding_BidFormItem":{"properties":{"amount":{"nullable":true,"type":"number"},"cost_code_id":{"minimum":1,"nullable":true,"type":"integer"},"cost_code_name":{"nullable":true,"type":"string"},"cost_code_number":{"nullable":true,"type":"string"},"description":{"type":"string"},"id":{"minimum":1,"type":"integer"},"position":{"minimum":0,"type":"integer"},"quantity":{"nullable":true,"type":"string"},"unit_cost":{"nullable":true,"type":"string"},"uom":{"nullable":true,"type":"string"}},"required":["id","description","position","quantity","uom","unit_cost","amount","cost_code_id","cost_code_name","cost_code_number"],"type":"object"},"bidding_BidFormItemInput":{"properties":{"amount":{"anyOf":[{"type":"number"},{"nullable":true,"pattern":"^\\s*[+-]?[0-9]+(?:[.][0-9]+)?\\s*$","type":"string"}],"description":"Numeric amount rounded to two decimal places. When absent or null, the amount is calculated from quantity and unit cost if both are present."},"cost_code_id":{"description":"Cost code ID from this project.","minimum":1,"nullable":true,"type":"integer"},"description":{"minLength":1,"type":"string"},"quantity":{"anyOf":[{"type":"number"},{"nullable":true,"pattern":"^\\s*[+-]?[0-9]+(?:[.][0-9]+)?\\s*$","type":"string"}],"description":"Numeric value rounded to two decimal places. The supported absolute value after rounding is at most 999999999999.99."},"unit_cost":{"anyOf":[{"type":"number"},{"nullable":true,"pattern":"^\\s*[+-]?[0-9]+(?:[.][0-9]+)?\\s*$","type":"string"}],"description":"Numeric value rounded to two decimal places. The supported absolute value after rounding is at most 999999999999.99."},"uom":{"nullable":true,"type":"string"}},"required":["description"],"type":"object"},"bidding_BidPackageListItem":{"properties":{"bid_due_date":{"format":"date-time","nullable":true,"type":"string"},"bid_invitations_sent":{"minimum":0,"type":"integer"},"bidders_count":{"minimum":0,"type":"integer"},"bids_received_count":{"minimum":0,"type":"integer"},"blind_bidding":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"low_bid":{"nullable":true,"type":"number"},"number":{"nullable":true,"type":"number"},"open":{"type":"boolean"},"project_id":{"minimum":1,"type":"integer"},"release_required":{"type":"boolean"},"sealed":{"type":"boolean"},"status":{"enum":["draft","open","closed","awarded"],"type":"string"},"submitted_bids_count":{"minimum":0,"type":"integer"},"title":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor_revision":{"minimum":0,"type":"integer"},"will_bid_count":{"minimum":0,"type":"integer"}},"required":["id","project_id","number","title","bid_due_date","created_at","updated_at","status","release_required","vendor_revision","translated_status","open","sealed","blind_bidding","submitted_bids_count","bid_invitations_sent","will_bid_count","bids_received_count","bidders_count","low_bid"],"type":"object"},"bidding_BidPackageReleaseAttachment":{"additionalProperties":false,"properties":{"bid_package_id":{"minimum":1,"type":"integer"},"classification":{"enum":["vendor_visible"],"type":"string"},"classification_reason":{"maxLength":500,"minLength":10,"type":"string"},"content_type":{"enum":["application/pdf","image/png","image/jpeg"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"removal_reason":{"nullable":true,"type":"string"},"removed_at":{"format":"date-time","nullable":true,"type":"string"},"removed_by_id":{"minimum":1,"nullable":true,"type":"integer"},"scan_mode":{"type":"string"},"sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"size_bytes":{"maximum":8388608,"minimum":1,"type":"integer"}},"required":["id","bid_package_id","name","content_type","size_bytes","sha256","classification","classification_reason","scan_mode","created_by_id","created_at","removed_at","removed_by_id","removal_reason"],"type":"object"},"bidding_BidPackageStatusOption":{"properties":{"key":{"enum":["draft","open","closed","awarded"],"type":"string"},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"bidding_BidPackageVendorAttachment":{"additionalProperties":false,"properties":{"contentType":{"enum":["application/pdf","image/png","image/jpeg"],"type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"sizeBytes":{"maximum":8388608,"minimum":1,"type":"integer"}},"required":["id","name","contentType","sizeBytes","sha256"],"type":"object"},"bidding_BidPackageVendorSnapshot":{"additionalProperties":false,"properties":{"attachments":{"items":{"$ref":"#/components/schemas/bidding_BidPackageVendorAttachment"},"maxItems":10,"type":"array"},"bidDueDate":{"format":"date-time","nullable":true,"type":"string"},"bidEmailMessage":{"nullable":true,"type":"string"},"bidWebMessage":{"nullable":true,"type":"string"},"blindBidding":{"type":"boolean"},"description":{"nullable":true,"type":"string"},"forms":{"items":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"items":{"items":{"additionalProperties":false,"properties":{"description":{"type":"string"},"id":{"type":"integer"},"quantity":{"nullable":true,"type":"string"},"uom":{"nullable":true,"type":"string"}},"required":["id","description","quantity","uom"],"type":"object"},"type":"array"},"title":{"type":"string"}},"required":["id","title","items"],"type":"object"},"type":"array"},"sealed":{"type":"boolean"},"title":{"minLength":1,"type":"string"}},"required":["title","description","bidWebMessage","bidEmailMessage","bidDueDate","blindBidding","sealed","forms"],"type":"object"},"bidding_BidSubmissionAlternate":{"additionalProperties":false,"properties":{"amount":{"pattern":"^(?:0|[1-9][0-9]{0,11})\\.[0-9]{2}$","type":"string"},"description":{"maxLength":500,"minLength":1,"type":"string"},"kind":{"enum":["additive","deductive"],"type":"string"}},"required":["description","kind","amount"],"type":"object"},"bidding_BidSubmissionQuoteItemRecipient":{"additionalProperties":false,"properties":{"amount":{"nullable":true,"type":"string"},"description":{"type":"string"},"included":{"type":"boolean"},"quantity":{"nullable":true,"type":"string"},"unit_cost":{"nullable":true,"type":"string"},"uom":{"nullable":true,"type":"string"}},"required":["description","amount","unit_cost","quantity","uom","included"],"type":"object"},"bidding_BidSubmissionQuoteItemStaff":{"additionalProperties":false,"properties":{"amount":{"nullable":true,"type":"string"},"bid_form_item_id":{"minimum":1,"type":"integer"},"description":{"type":"string"},"included":{"type":"boolean"},"quantity":{"nullable":true,"type":"string"},"unit_cost":{"nullable":true,"type":"string"},"uom":{"nullable":true,"type":"string"}},"required":["bid_form_item_id","description","amount","unit_cost","quantity","uom","included"],"type":"object"},"bidding_BidSubmissionQuoteRecipient":{"additionalProperties":false,"properties":{"alternates":{"items":{"$ref":"#/components/schemas/bidding_BidSubmissionAlternate"},"maxItems":10,"type":"array"},"bidder_comments":{"nullable":true,"type":"string"},"bidder_exclusion":{"nullable":true,"type":"string"},"bidder_inclusion":{"nullable":true,"type":"string"},"items":{"items":{"$ref":"#/components/schemas/bidding_BidSubmissionQuoteItemRecipient"},"type":"array"},"lead_time":{"nullable":true,"type":"string"},"lump_sum_amount":{"nullable":true,"type":"string"},"qualifications":{"items":{"maxLength":500,"minLength":1,"type":"string"},"maxItems":10,"type":"array"}},"required":["lump_sum_amount","bidder_comments","bidder_inclusion","bidder_exclusion","lead_time","alternates","qualifications","items"],"type":"object"},"bidding_BidSubmissionQuoteStaff":{"additionalProperties":false,"properties":{"alternates":{"items":{"$ref":"#/components/schemas/bidding_BidSubmissionAlternate"},"maxItems":10,"type":"array"},"bidder_comments":{"nullable":true,"type":"string"},"bidder_exclusion":{"nullable":true,"type":"string"},"bidder_inclusion":{"nullable":true,"type":"string"},"items":{"items":{"$ref":"#/components/schemas/bidding_BidSubmissionQuoteItemStaff"},"type":"array"},"lead_time":{"nullable":true,"type":"string"},"lump_sum_amount":{"nullable":true,"type":"string"},"qualifications":{"items":{"maxLength":500,"minLength":1,"type":"string"},"maxItems":10,"type":"array"}},"required":["lump_sum_amount","bidder_comments","bidder_inclusion","bidder_exclusion","lead_time","alternates","qualifications","items"],"type":"object"},"bidding_BidSubmissionReceiptRecipient":{"additionalProperties":false,"properties":{"addendum_acknowledgment_id":{"minimum":1,"type":"integer"},"addendum_acknowledgment_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"current":{"type":"boolean"},"quote":{"$ref":"#/components/schemas/bidding_BidSubmissionQuoteRecipient"},"release_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"release_version":{"minimum":1,"type":"integer"},"revision":{"minimum":1,"type":"integer"},"snapshot_version":{"enum":[1,2,3],"type":"integer"},"source_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"submitted_at":{"format":"date-time","type":"string"},"superseded_at":{"format":"date-time","nullable":true,"type":"string"},"withdrawn_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["revision","submitted_at","superseded_at","withdrawn_at","current","source_sha256","snapshot_version","release_version","release_sha256","quote"],"type":"object"},"bidding_BidSubmissionReceiptStaff":{"additionalProperties":false,"properties":{"addendum_acknowledgment_id":{"minimum":1,"type":"integer"},"addendum_acknowledgment_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"bid_id":{"minimum":1,"type":"integer"},"bid_package_id":{"minimum":1,"type":"integer"},"current":{"type":"boolean"},"id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"quote":{"$ref":"#/components/schemas/bidding_BidSubmissionQuoteStaff"},"release_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"release_version":{"minimum":1,"type":"integer"},"release_version_id":{"minimum":1,"type":"integer"},"revision":{"minimum":1,"type":"integer"},"snapshot_version":{"enum":[1,2,3],"type":"integer"},"source_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"submitted_at":{"format":"date-time","type":"string"},"submitter_id":{"minimum":1,"type":"integer"},"superseded_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_id":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","project_id","bid_package_id","bid_id","vendor_id","release_version_id","revision","submitter_id","submitted_at","superseded_at","withdrawn_at","current","source_sha256","snapshot_version","release_version","release_sha256","quote"],"type":"object"},"bidding_RecycledBidPackageListItem":{"allOf":[{"$ref":"#/components/schemas/bidding_BidPackageListItem"},{"properties":{"deleted":{"enum":[true],"type":"boolean"},"deleted_at":{"format":"date-time","type":"string"}},"required":["deleted","deleted_at"],"type":"object"}]},"bidding_StaffBidInvitation":{"additionalProperties":false,"properties":{"bidId":{"minimum":1,"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"outbox":{"additionalProperties":false,"nullable":true,"properties":{"createdAt":{"format":"date-time","type":"string"},"state":{"description":"Recorded local handoff state.","enum":["local_recorded","unknown"],"type":"string"}},"required":["state","createdAt"],"type":"object"},"recipientUserId":{"minimum":1,"type":"integer"},"revokedAt":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","bidId","recipientUserId","expiresAt","revokedAt","createdAt","outbox"],"type":"object"},"budget_Adjustment":{"properties":{"amount":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"budget_line_item_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"cost_code":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name","code","full_code"],"type":"object"},"cost_code_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"notes":{"type":"string"}},"required":["id","cost_code_id","budget_line_item_id","amount","notes"],"type":"object"},"budget_BudgetLineItem":{"properties":{"approved_budget_changes":{"format":"float","type":"number"},"budget_forecast":{"format":"float","type":"number"},"budget_modifications":{"format":"float","type":"number"},"calculation_strategy":{"type":"string"},"committed_costs":{"format":"float","type":"number"},"cost_code":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"currency_iso_code":{"type":"string"}},"type":"object"},"direct_costs":{"format":"float","type":"number"},"division":{"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"estimated_cost_at_completion":{"format":"float","type":"number"},"id":{"type":"integer"},"line_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"original_budget_amount":{"format":"float","type":"number"},"pending_budget_changes":{"format":"float","type":"number"},"pending_cost_changes":{"format":"float","type":"number"},"projected_budget":{"format":"float","type":"number"},"projected_costs":{"format":"float","type":"number"},"projected_over_under":{"format":"float","type":"number"},"quantity":{"format":"float","type":"number"},"revised_budget":{"format":"float","type":"number"},"unit_cost":{"format":"float","type":"number"},"uom":{"type":"string"}},"type":"object"},"budget_CapturedLine":{"additionalProperties":false,"properties":{"budgetLineItemId":{"type":"integer"},"categoryId":{"type":["integer","null"]},"costCode":{"type":["string","null"]},"costCodeId":{"type":"integer"},"costCodeName":{"type":["string","null"]},"description":{"type":["string","null"]},"id":{"type":"integer"},"lineItemType":{"type":["string","null"]},"position":{"type":"integer"},"values":{"$ref":"#/components/schemas/budget_CapturedMoneyValues"}},"required":["id","budgetLineItemId","costCodeId","costCode","costCodeName","categoryId","lineItemType","description","position","values"],"type":"object"},"budget_CapturedMoneyValues":{"additionalProperties":false,"properties":{"approvedBudgetChanges":{"$ref":"#/components/schemas/budget_Money"},"budgetModifications":{"$ref":"#/components/schemas/budget_Money"},"committedCosts":{"$ref":"#/components/schemas/budget_Money"},"directCosts":{"$ref":"#/components/schemas/budget_Money"},"estimatedCostAtCompletion":{"$ref":"#/components/schemas/budget_Money"},"forecastToComplete":{"$ref":"#/components/schemas/budget_Money"},"originalBudgetAmount":{"$ref":"#/components/schemas/budget_Money"},"pendingBudgetChanges":{"$ref":"#/components/schemas/budget_Money"},"projectedBudget":{"$ref":"#/components/schemas/budget_Money"},"projectedCosts":{"$ref":"#/components/schemas/budget_Money"},"projectedOverUnder":{"$ref":"#/components/schemas/budget_Money"},"revisedBudget":{"$ref":"#/components/schemas/budget_Money"}},"required":["originalBudgetAmount","budgetModifications","approvedBudgetChanges","revisedBudget","pendingBudgetChanges","projectedBudget","committedCosts","directCosts","projectedCosts","forecastToComplete","estimatedCostAtCompletion","projectedOverUnder"],"type":"object"},"budget_CapturedSnapshot":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","type":"string"},"createdById":{"type":"integer"},"description":{"type":["string","null"]},"evidenceVersion":{"type":["integer","null"]},"id":{"type":"integer"},"lines":{"items":{"$ref":"#/components/schemas/budget_CapturedLine"},"type":"array"},"name":{"type":"string"},"totals":{"$ref":"#/components/schemas/budget_CapturedMoneyValues"}},"required":["id","name","description","createdAt","createdById","evidenceVersion","lines","totals"],"type":"object"},"budget_Change":{"properties":{"adjustment_line_items":{"items":{"$ref":"#/components/schemas/budget_Adjustment"},"type":"array"},"amount":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"approved_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"anyOf":[{"properties":{"id":{"minimum":1,"type":"integer"},"login":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","login"],"type":"object"},{"type":"null"}]},"currency_configuration":{"properties":{"currency_iso_code":{"const":"USD","type":"string"}},"required":["currency_iso_code"],"type":"object"},"description":{"type":"string"},"id":{"minimum":1,"type":"integer"},"number":{"type":"string"},"status":{"enum":["draft","under_review","approved","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","number","title","description","status","amount","created_at","updated_at","approved_at","created_by","adjustment_line_items","currency_configuration"],"type":"object"},"budget_Create":{"properties":{"budget_change":{"properties":{"adjustments":{"items":{"properties":{"amount":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}],"description":"Coerced to number by the handler; non-finite values fail validation."},"budget_line_item_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"cost_code_id":{"minimum":1,"type":"integer"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["cost_code_id","amount"],"type":"object"},"type":"array"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","under_review","approved","void"],"type":"string"},"title":{"minLength":1,"type":"string"}},"required":["title"],"type":"object"}},"required":["budget_change"],"type":"object"},"budget_Currency":{"properties":{"currency_iso_code":{"const":"USD","type":"string"}},"required":["currency_iso_code"],"type":"object"},"budget_Detail":{"properties":{"biller":{"type":"string"},"biller_id":{"minimum":1,"type":"integer"},"biller_type":{"const":"Project","type":"string"},"budget_forecast":{"properties":{"amount":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"automatic_amount":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"automatically_calculated":{"type":"boolean"},"calculation_strategy":{"const":"itemized","type":"string"},"id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"manual_amount":{"anyOf":[{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","manual_amount","automatic_amount","amount","automatically_calculated","calculation_strategy","notes"],"type":"object"},"budget_modifications":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"budgetable":{"type":"boolean"},"budgeted":{"type":"boolean"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}]},"company":{"anyOf":[{"type":"string"},{"type":"null"}]},"company_id":{"minimum":1,"type":"integer"},"cost_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"cost_code_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"cost_code_origin_id":{"type":"null"},"currency_configuration":{"properties":{"currency_iso_code":{"const":"USD","type":"string"}},"required":["currency_iso_code"],"type":"object"},"curve":{"type":"null"},"deletable":{"type":"boolean"},"end_date":{"type":"null"},"id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"original_budget_amount":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"project":{"type":"string"},"project_id":{"minimum":1,"type":"integer"},"root_cost_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"root_cost_code_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"start_date":{"type":"null"},"unbudgeted_reason":{"type":"string"},"wbs_code_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]}},"required":["id","deletable","budgeted","budgetable","company_id","company","project_id","wbs_code_id","biller_id","biller","biller_type","root_cost_code_id","root_cost_code","cost_code_id","cost_code","cost_code_origin_id","category_id","category","project","curve","start_date","end_date","budget_modifications","original_budget_amount","budget_forecast","currency_configuration"],"type":"object"},"budget_Forecast":{"properties":{"currency_configuration":{"properties":{"currency_iso_code":{"const":"USD","type":"string"}},"required":["currency_iso_code"],"type":"object"},"grand_total":{"properties":{"committed_costs":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"direct_costs":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"estimated_cost_at_completion":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"forecast_to_complete":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"projected_budget":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"projected_costs":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"projected_over_under":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"revised_budget":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"}},"required":["revised_budget","projected_budget","committed_costs","direct_costs","projected_costs","forecast_to_complete","estimated_cost_at_completion","projected_over_under"],"type":"object"},"groups":{"items":{"properties":{"id":{"type":"string"},"lines":{"items":{"$ref":"#/components/schemas/budget_ForecastLine"},"type":"array"},"name":{"type":"string"},"subtotal":{"properties":{"committed_costs":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"direct_costs":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"estimated_cost_at_completion":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"forecast_to_complete":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"projected_budget":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"projected_costs":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"projected_over_under":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"revised_budget":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"}},"required":["revised_budget","projected_budget","committed_costs","direct_costs","projected_costs","forecast_to_complete","estimated_cost_at_completion","projected_over_under"],"type":"object"}},"required":["id","name","lines","subtotal"],"type":"object"},"type":"array"}},"required":["groups","grand_total","currency_configuration"],"type":"object"},"budget_ForecastLine":{"properties":{"auto_forecast_to_complete":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"committed_costs":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"cost_code":{"anyOf":[{"properties":{"full_code":{"type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name","full_code"],"type":"object"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"direct_costs":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"estimated_cost_at_completion":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"forecast_overridden":{"type":"boolean"},"forecast_to_complete":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"id":{"type":"string"},"is_synthetic":{"type":"boolean"},"line_item_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"manual_forecast_to_complete":{"anyOf":[{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"projected_budget":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"projected_costs":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"projected_over_under":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"revised_budget":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"}},"required":["id","is_synthetic","cost_code","line_item_type","description","revised_budget","projected_budget","committed_costs","direct_costs","projected_costs","forecast_to_complete","estimated_cost_at_completion","projected_over_under","auto_forecast_to_complete","manual_forecast_to_complete","forecast_overridden","notes"],"type":"object"},"budget_ForecastUpdate":{"properties":{"manual_forecast_to_complete":{"anyOf":[{"type":"null"},{"pattern":"^\\s*[+-]?\\d{1,12}(?:\\.\\d{1,2})?\\s*$","type":"string"},{"maximum":999999999999.99,"minimum":-999999999999.99,"multipleOf":0.01,"type":"number"}],"description":"Signed decimal money with up to 12 integer digits and 2 decimal digits. Strings are trimmed. Null restores automatic forecasting."},"project_id":{"minimum":1,"type":"integer"}},"required":["project_id","manual_forecast_to_complete"],"type":"object"},"budget_ForecastUpdateResult":{"properties":{"id":{"minimum":1,"type":"integer"},"manual_forecast_to_complete":{"anyOf":[{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},{"type":"null"}]}},"required":["id","manual_forecast_to_complete"],"type":"object"},"budget_History":{"properties":{"adjustment_count":{"minimum":0,"type":"integer"},"amount":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"approved_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"anyOf":[{"properties":{"id":{"minimum":1,"type":"integer"},"login":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","login"],"type":"object"},{"type":"null"}]},"id":{"minimum":1,"type":"integer"},"number":{"type":"string"},"status":{"enum":["draft","under_review","approved","void"],"type":"string"},"title":{"type":"string"}},"required":["id","number","title","status","amount","created_at","approved_at","created_by","adjustment_count"],"type":"object"},"budget_Lock":{"properties":{"locked":{"type":"boolean"},"locked_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"locked_by":{"anyOf":[{"properties":{"id":{"minimum":1,"type":"integer"},"login":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","login"],"type":"object"},{"type":"null"}]}},"required":["locked","locked_at","locked_by"],"type":"object"},"budget_Money":{"description":"Signed decimal money with two fractional digits.","pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"budget_PostingJournal":{"properties":{"current":{"anyOf":[{"$ref":"#/components/schemas/budget_PostingSnapshot"},{"type":"null"}]},"legacyBaseline":{"type":"boolean"},"rows":{"items":{"properties":{"actorUserId":{"minimum":1,"type":"integer"},"after":{"anyOf":[{"$ref":"#/components/schemas/budget_PostingSnapshot"},{"type":"null"}]},"before":{"anyOf":[{"$ref":"#/components/schemas/budget_PostingSnapshot"},{"type":"null"}]},"budgetChangeId":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"changeEventId":{"minimum":1,"type":"integer"},"companyId":{"minimum":1,"type":"integer"},"createdAt":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"projectId":{"minimum":1,"type":"integer"},"revision":{"type":"integer"},"source":{"$ref":"#/components/schemas/budget_PostingSource"}},"required":["id","companyId","projectId","changeEventId","budgetChangeId","revision","actorUserId","source","before","after","createdAt"],"type":"object"},"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["rows","total","current","legacyBaseline"],"type":"object"},"budget_PostingSnapshot":{"properties":{"adjustments":{"items":{"properties":{"amount":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"budgetLineItemId":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"costCodeId":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"integer"}},"required":["id","costCodeId","budgetLineItemId","amount","notes","position"],"type":"object"},"type":"array"},"deleted":{"type":"boolean"},"id":{"minimum":1,"type":"integer"},"number":{"type":"string"},"source":{"anyOf":[{"$ref":"#/components/schemas/budget_PostingSource"},{"type":"null"}]},"status":{"type":"string"},"title":{"type":"string"}},"required":["id","number","title","status","deleted","source","adjustments"],"type":"object"},"budget_PostingSource":{"properties":{"deleted":{"type":"boolean"},"lines":{"items":{"properties":{"budgetAmount":{"anyOf":[{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},{"type":"null"}]},"costCodeId":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"}},"required":["id","costCodeId","budgetAmount"],"type":"object"},"type":"array"},"status":{"type":"string"},"title":{"type":"string"}},"required":["status","deleted","title"],"type":"object"},"budget_SnapshotDetailRow":{"additionalProperties":false,"properties":{"approved_budget_changes":{"$ref":"#/components/schemas/budget_Money"},"budget_modifications":{"$ref":"#/components/schemas/budget_Money"},"budgetable":{"enum":[true],"type":"boolean"},"budgeted":{"type":"boolean"},"category":{"type":["string","null"]},"category_id":{"type":["integer","null"]},"committed_costs":{"$ref":"#/components/schemas/budget_Money"},"cost_code":{"type":["string","null"]},"cost_code_id":{"type":["integer","null"]},"currency_configuration":{"$ref":"#/components/schemas/budget_Currency"},"description":{"type":["string","null"]},"direct_costs":{"$ref":"#/components/schemas/budget_Money"},"estimated_cost_at_completion":{"$ref":"#/components/schemas/budget_Money"},"forecast_to_complete":{"$ref":"#/components/schemas/budget_Money"},"id":{"type":["integer","null"]},"original_budget_amount":{"$ref":"#/components/schemas/budget_Money"},"pending_budget_changes":{"$ref":"#/components/schemas/budget_Money"},"project_id":{"type":"integer"},"projected_budget":{"$ref":"#/components/schemas/budget_Money"},"projected_costs":{"$ref":"#/components/schemas/budget_Money"},"projected_over_under":{"$ref":"#/components/schemas/budget_Money"},"revised_budget":{"$ref":"#/components/schemas/budget_Money"},"root_cost_code":{"type":["string","null"]},"root_cost_code_id":{"type":["integer","null"]},"wbs_code_id":{"type":["integer","null"]}},"required":["id","budgeted","budgetable","project_id","wbs_code_id","root_cost_code_id","root_cost_code","cost_code_id","cost_code","category_id","category","description","original_budget_amount","budget_modifications","approved_budget_changes","revised_budget","pending_budget_changes","projected_budget","committed_costs","direct_costs","projected_costs","forecast_to_complete","estimated_cost_at_completion","projected_over_under","currency_configuration"],"type":"object"},"budget_SnapshotSummaryRow":{"additionalProperties":false,"properties":{"approved_budget_changes":{"$ref":"#/components/schemas/budget_Money"},"budget_modifications":{"$ref":"#/components/schemas/budget_Money"},"committed_costs":{"$ref":"#/components/schemas/budget_Money"},"currency_configuration":{"$ref":"#/components/schemas/budget_Currency"},"direct_costs":{"$ref":"#/components/schemas/budget_Money"},"estimated_cost_at_completion":{"$ref":"#/components/schemas/budget_Money"},"id":{"type":"string"},"name":{"type":"string"},"original_budget_amount":{"$ref":"#/components/schemas/budget_Money"},"pending_budget_changes":{"$ref":"#/components/schemas/budget_Money"},"pending_cost_changes":{"$ref":"#/components/schemas/budget_Money"},"projected_budget":{"$ref":"#/components/schemas/budget_Money"},"projected_costs":{"$ref":"#/components/schemas/budget_Money"},"projected_over_under":{"$ref":"#/components/schemas/budget_Money"},"revised_budget":{"$ref":"#/components/schemas/budget_Money"}},"required":["id","name","original_budget_amount","budget_modifications","approved_budget_changes","revised_budget","pending_budget_changes","projected_budget","committed_costs","direct_costs","projected_costs","estimated_cost_at_completion","projected_over_under","pending_cost_changes","currency_configuration"],"type":"object"},"budget_Update":{"properties":{"budget_change":{"properties":{"adjustments":{"items":{"properties":{"amount":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}],"description":"Coerced to number by the handler; non-finite values fail validation."},"budget_line_item_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"cost_code_id":{"minimum":1,"type":"integer"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["cost_code_id","amount"],"type":"object"},"type":"array"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","under_review","approved","void"],"type":"string"},"title":{"minLength":1,"type":"string"}},"required":[],"type":"object"}},"required":["budget_change"],"type":"object"},"change_orders_ChangeOrderProjectConfiguration":{"properties":{"change_order_tiers":{"default":2,"enum":[1,2,3],"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["project_id","change_order_tiers"],"type":"object"},"change_orders_ChangeOrderTaxCode":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"rate":{"description":"Tax rate as a decimal percentage. For example, 8.25 represents 8.25%.","pattern":"^-?[0-9]+[.][0-9]{1,4}$","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","rate","created_at","updated_at"],"type":"object"},"change_orders_PcoFixedMarkupValue":{"anyOf":[{"maximum":999999999999.99,"minimum":-999999999999.99,"type":"number"},{"pattern":"^\\s*[+-]?0*[0-9]{1,12}(?:[.][0-9]{1,2}0*)?\\s*$","type":"string"}],"description":"Fixed signed amount as a JSON number or decimal string. Use up to two fractional digits."},"change_orders_PcoMarkupCreateFields":{"allOf":[{"$ref":"#/components/schemas/change_orders_PcoMarkupFields"},{"oneOf":[{"properties":{"amount":{"$ref":"#/components/schemas/change_orders_PcoFixedMarkupValue"},"percentage":{"enum":[null],"nullable":true,"type":"string"}},"required":["amount"]},{"properties":{"amount":{"enum":[null],"nullable":true,"type":"string"},"percentage":{"$ref":"#/components/schemas/change_orders_PcoPercentageMarkupValue"}},"required":["percentage"]}]}]},"change_orders_PcoMarkupFields":{"properties":{"amount":{"anyOf":[{"$ref":"#/components/schemas/change_orders_PcoFixedMarkupValue"},{"enum":[null],"nullable":true,"type":"string"}]},"compounds_markups_above":{"description":"When true, a percentage is applied to the line base plus earlier markup contributions.","type":"boolean"},"markup_set":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"percentage":{"anyOf":[{"$ref":"#/components/schemas/change_orders_PcoPercentageMarkupValue"},{"enum":[null],"nullable":true,"type":"string"}]},"position":{"minimum":1,"type":"integer"}},"type":"object"},"change_orders_PcoMarkupLineItem":{"properties":{"amount":{"description":"Computed monetary contribution, rounded to cents and serialized as a decimal string.","pattern":"^-?[0-9]+[.][0-9]{1,2}$","type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"markup":{"properties":{"compounds_markups_above":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"destination_cost_code":{"properties":{"full_code":{"type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","full_code","name"],"type":"object"},"id":{"minimum":1,"type":"integer"},"markup_set":{"type":"string"},"name":{"type":"string"},"percentage":{"pattern":"^-?[0-9]+[.][0-9]{1,4}$","type":"string"},"position":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","position","compounds_markups_above","created_at","updated_at"],"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","amount","created_at","updated_at","markup"],"type":"object"},"change_orders_PcoMarkupUpdateFields":{"allOf":[{"$ref":"#/components/schemas/change_orders_PcoMarkupFields"},{"not":{"anyOf":[{"properties":{"amount":{"$ref":"#/components/schemas/change_orders_PcoFixedMarkupValue"},"percentage":{"$ref":"#/components/schemas/change_orders_PcoPercentageMarkupValue"}},"required":["amount","percentage"]},{"properties":{"amount":{"enum":[null],"nullable":true,"type":"string"},"percentage":{"enum":[null],"nullable":true,"type":"string"}},"required":["amount","percentage"]}]}}]},"change_orders_PcoPercentageMarkupValue":{"anyOf":[{"maximum":99999.9999,"minimum":-99999.9999,"type":"number"},{"pattern":"^\\s*[+-]?0*[0-9]{1,5}(?:[.][0-9]{1,4}0*)?\\s*$","type":"string"}],"description":"Signed percentage as a JSON number or decimal string. Use up to four fractional digits. For example, 10 represents 10%."},"commitments_ApiErrors":{"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"required":["errors"],"type":"object"},"commitments_ChangeOrder":{"additionalProperties":false,"properties":{"amount":{"description":"Decimal amount serialized as a string.","type":"string"},"commitment_id":{"minimum":1,"type":"integer"},"commitment_type":{"enum":["WorkOrderContract","PurchaseOrderContract"],"type":"string"},"contract_id":{"minimum":1,"type":"integer"},"contract_type":{"enum":["WorkOrderContract","PurchaseOrderContract"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"additionalProperties":false,"nullable":true,"properties":{"id":{"minimum":1,"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name","login"],"type":"object"},"currency_configuration":{"$ref":"#/components/schemas/commitments_CurrencyConfiguration"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"grand_total":{"description":"Decimal amount serialized as a string.","type":"string"},"id":{"minimum":1,"type":"integer"},"invoiced_date":{"format":"date","nullable":true,"type":"string"},"line_items":{"description":"Line details appear when the actor can view the parent schedule of values.","items":{"$ref":"#/components/schemas/commitments_ChangeOrderLine"},"type":"array"},"number":{"type":"string"},"paid_date":{"format":"date","nullable":true,"type":"string"},"project_id":{"minimum":1,"type":"integer"},"reason":{"nullable":true,"type":"string"},"status":{"enum":["draft","pending","approved","rejected","void"],"type":"string"},"title":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","project_id","contract_id","commitment_id","contract_type","commitment_type","number","title","status","description","reason","due_date","invoiced_date","paid_date","grand_total","amount","line_items","created_by","currency_configuration","created_at","updated_at","deleted_at"],"type":"object"},"commitments_ChangeOrderCreate":{"properties":{"change_order":{"$ref":"#/components/schemas/commitments_ChangeOrderInput"},"project_id":{"minimum":1,"type":"integer"}},"required":["change_order"],"type":"object"},"commitments_ChangeOrderInput":{"properties":{"contract_id":{"minimum":1,"type":"integer"},"contract_type":{"default":"WorkOrderContract","enum":["WorkOrderContract","PurchaseOrderContract"],"type":"string"},"description":{"nullable":true,"type":"string"},"due_date":{"description":"ISO 8601 calendar date or timestamp.","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}","type":"string"},"invoiced_date":{"description":"ISO 8601 calendar date or timestamp.","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}","type":"string"},"line_items":{"items":{"$ref":"#/components/schemas/commitments_ChangeOrderLineInput"},"type":"array"},"number":{"nullable":true,"type":"string"},"paid_date":{"description":"ISO 8601 calendar date or timestamp.","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}","type":"string"},"reason":{"nullable":true,"type":"string"},"status":{"$ref":"#/components/schemas/commitments_ChangeOrderStatusInput"},"title":{"nullable":true,"type":"string"}},"required":["contract_id"],"type":"object"},"commitments_ChangeOrderLine":{"additionalProperties":false,"properties":{"amount":{"description":"Decimal amount serialized as a string.","type":"string"},"change_order_id":{"minimum":1,"type":"integer"},"commitment_line_item_id":{"minimum":1,"nullable":true,"type":"integer"},"cost_code":{"additionalProperties":false,"nullable":true,"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name","full_code","code"],"type":"object"},"cost_code_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"$ref":"#/components/schemas/commitments_CurrencyConfiguration"},"description":{"type":"string"},"extended_amount":{"description":"Decimal amount serialized as a string.","type":"string"},"extended_type":{"enum":["calculated","manual"],"type":"string"},"id":{"minimum":1,"type":"integer"},"position":{"minimum":1,"type":"integer"},"quantity":{"description":"Decimal amount serialized as a string.","nullable":true,"type":"string"},"tax_code_id":{"enum":[null],"nullable":true,"type":"integer"},"unit_cost":{"description":"Decimal amount serialized as a string.","nullable":true,"type":"string"},"uom":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"additionalProperties":false,"nullable":true,"properties":{"description":{"type":"string"},"flat_code":{"type":"string"},"id":{"minimum":1,"type":"integer"}},"required":["id","flat_code","description"],"type":"object"}},"required":["id","change_order_id","position","commitment_line_item_id","cost_code_id","description","quantity","uom","unit_cost","amount","extended_amount","extended_type","wbs_code","cost_code","tax_code_id","currency_configuration","created_at","updated_at"],"type":"object"},"commitments_ChangeOrderLineCreate":{"properties":{"line_item":{"$ref":"#/components/schemas/commitments_ChangeOrderLineInput"},"project_id":{"minimum":1,"type":"integer"}},"required":["line_item"],"type":"object"},"commitments_ChangeOrderLineInput":{"anyOf":[{"properties":{"amount":{"anyOf":[{"type":"number"},{"minLength":1,"type":"string"}]}},"required":["amount"]},{"properties":{"quantity":{"anyOf":[{"type":"number"},{"minLength":1,"type":"string"}]},"unit_cost":{"anyOf":[{"type":"number"},{"minLength":1,"type":"string"}]}},"required":["quantity","unit_cost"]}],"description":"Provide an amount, or provide both quantity and unit_cost to calculate it.","properties":{"amount":{"anyOf":[{"type":"number"},{"nullable":true,"type":"string"}],"description":"Decimal input can be a JSON number, decimal string or null."},"commitment_line_item_id":{"minimum":1,"nullable":true,"type":"integer"},"cost_code_id":{"minimum":1,"type":"integer"},"description":{"nullable":true,"type":"string"},"position":{"minimum":1,"nullable":true,"type":"integer"},"quantity":{"anyOf":[{"type":"number"},{"nullable":true,"type":"string"}],"description":"Decimal input can be a JSON number, decimal string or null."},"unit_cost":{"anyOf":[{"type":"number"},{"nullable":true,"type":"string"}],"description":"Decimal input can be a JSON number, decimal string or null."},"uom":{"nullable":true,"type":"string"}},"required":["cost_code_id"],"type":"object"},"commitments_ChangeOrderLinePatch":{"properties":{"line_item":{"$ref":"#/components/schemas/commitments_ChangeOrderLinePatchInput"},"project_id":{"minimum":1,"type":"integer"}},"type":"object"},"commitments_ChangeOrderLinePatchInput":{"description":"The service applies supplied fields to the existing line. An omitted amount retains the stored amount. Pass a null or empty amount with a resulting quantity and unit cost to recalculate the amount.","properties":{"amount":{"anyOf":[{"type":"number"},{"nullable":true,"type":"string"}],"description":"Decimal input can be a JSON number, decimal string or null."},"commitment_line_item_id":{"minimum":1,"nullable":true,"type":"integer"},"cost_code_id":{"minimum":1,"type":"integer"},"description":{"nullable":true,"type":"string"},"position":{"minimum":1,"nullable":true,"type":"integer"},"quantity":{"anyOf":[{"type":"number"},{"nullable":true,"type":"string"}],"description":"Decimal input can be a JSON number, decimal string or null."},"unit_cost":{"anyOf":[{"type":"number"},{"nullable":true,"type":"string"}],"description":"Decimal input can be a JSON number, decimal string or null."},"uom":{"nullable":true,"type":"string"}},"type":"object"},"commitments_ChangeOrderPatch":{"properties":{"change_order":{"$ref":"#/components/schemas/commitments_ChangeOrderPatchInput"},"project_id":{"minimum":1,"type":"integer"}},"required":["change_order"],"type":"object"},"commitments_ChangeOrderPatchInput":{"properties":{"contract_id":{"description":"Existing parent is retained. Omit this field on update.","minimum":1,"type":"integer"},"contract_type":{"description":"Existing parent type is retained. Omit this field on update.","enum":["WorkOrderContract","PurchaseOrderContract"],"type":"string"},"description":{"nullable":true,"type":"string"},"due_date":{"description":"ISO 8601 calendar date or timestamp.","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}","type":"string"},"invoiced_date":{"description":"ISO 8601 calendar date or timestamp.","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}","type":"string"},"line_items":{"description":"Existing lines are retained. Use the line-item operations for changes.","items":{"$ref":"#/components/schemas/commitments_ChangeOrderLineInput"},"type":"array"},"number":{"nullable":true,"type":"string"},"paid_date":{"description":"ISO 8601 calendar date or timestamp.","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}","type":"string"},"reason":{"nullable":true,"type":"string"},"status":{"$ref":"#/components/schemas/commitments_ChangeOrderStatusInput"},"title":{"nullable":true,"type":"string"}},"type":"object"},"commitments_ChangeOrderStatusInput":{"description":"Canonical values are draft, pending, approved, rejected, void. Case and spaces in labels are normalized.","example":"draft","pattern":"^\\s*(?:[dD][rR][aA][fF][tT]|[pP][eE][nN][dD][iI][nN][gG]|[aA][pP][pP][rR][oO][vV][eE][dD]|[rR][eE][jJ][eE][cC][tT][eE][dD]|[vV][oO][iI][dD])\\s*$","type":"string"},"commitments_CurrencyConfiguration":{"additionalProperties":false,"properties":{"base_currency_iso_code":{"enum":[null],"nullable":true,"type":"string"},"currency_exchange_rate":{"enum":[null],"nullable":true,"type":"string"},"currency_iso_code":{"enum":["USD"],"type":"string"}},"required":["base_currency_iso_code","currency_iso_code","currency_exchange_rate"],"type":"object"},"commitments_Requisition":{"additionalProperties":false,"properties":{"attachments":{"items":{"type":"object"},"maxItems":0,"type":"array"},"billing_date":{"format":"date","nullable":true,"type":"string"},"comment":{"enum":[null],"nullable":true,"type":"string"},"commitment_id":{"minimum":1,"type":"integer"},"commitment_type":{"enum":["WorkOrderContract","PurchaseOrderContract"],"type":"string"},"contract_invoicing_method":{"enum":["progressive"],"type":"string"},"contract_name":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"additionalProperties":false,"nullable":true,"properties":{"company_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name","login","company_name"],"type":"object"},"currency_configuration":{"$ref":"#/components/schemas/commitments_CurrencyConfiguration"},"custom_fields":{"additionalProperties":false,"type":"object"},"deletable":{"type":"boolean"},"details_available":{"type":"boolean"},"electronic_signature_id":{"enum":[null],"nullable":true,"type":"integer"},"erp_status":{"enum":[null],"nullable":true,"type":"string"},"final":{"type":"boolean"},"id":{"minimum":1,"type":"integer"},"invoice_number":{"nullable":true,"type":"string"},"invoice_type":{"enum":["progress"],"type":"string"},"line_items":{"description":"Null when the actor lacks schedule-of-values visibility.","items":{"$ref":"#/components/schemas/commitments_RequisitionLine"},"nullable":true,"type":"array"},"move_materials_to_previous_work_completed":{"type":"boolean"},"number":{"minimum":1,"type":"integer"},"origin_data":{"enum":[null],"nullable":true,"type":"string"},"origin_id":{"enum":[null],"nullable":true,"type":"string"},"payment_date":{"enum":[null],"nullable":true,"type":"string"},"percent_complete":{"description":"Decimal amount serialized as a string.","type":"string"},"period_id":{"enum":[null],"nullable":true,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"requisition_end":{"format":"date","nullable":true,"type":"string"},"requisition_start":{"format":"date","nullable":true,"type":"string"},"status":{"enum":["draft","submitted","under_review","revise_and_resubmit","approved","approved_as_noted","pending_owner_approval"],"type":"string"},"submitted_at":{"format":"date-time","nullable":true,"type":"string"},"summary":{"$ref":"#/components/schemas/commitments_RequisitionSummary"},"total_claimed_amount":{"description":"Decimal amount serialized as a string.","type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor_name":{"nullable":true,"type":"string"}},"required":["id","project_id","commitment_id","commitment_type","contract_name","vendor_name","number","invoice_number","status","final","requisition_start","requisition_end","billing_date","payment_date","period_id","percent_complete","total_claimed_amount","details_available","line_items","contract_invoicing_method","invoice_type","move_materials_to_previous_work_completed","deletable","electronic_signature_id","erp_status","origin_data","origin_id","comment","submitted_at","attachments","custom_fields","currency_configuration","created_by","summary","created_at","updated_at"],"type":"object"},"commitments_RequisitionLine":{"additionalProperties":false,"properties":{"balance_to_finish":{"description":"Decimal amount serialized as a string.","type":"string"},"completed_work_retainage_percent_this_period":{"description":"Decimal amount serialized as a string.","type":"string"},"cost_code":{"additionalProperties":false,"nullable":true,"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name","full_code","code"],"type":"object"},"cost_code_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"$ref":"#/components/schemas/commitments_CurrencyConfiguration"},"description_of_work":{"type":"string"},"detail_line_item_id":{"minimum":1,"nullable":true,"type":"integer"},"id":{"minimum":1,"type":"integer"},"item_number":{"nullable":true,"type":"string"},"materials_presently_stored":{"description":"Decimal amount serialized as a string.","type":"string"},"position":{"type":"integer"},"requisition_id":{"minimum":1,"type":"integer"},"scheduled_value":{"description":"Decimal amount serialized as a string.","type":"string"},"subcontractor_claimed_amount":{"description":"Decimal amount serialized as a string.","type":"string"},"total_completed_and_stored_to_date":{"description":"Decimal amount serialized as a string.","type":"string"},"total_completed_and_stored_to_date_percent":{"description":"Decimal amount serialized as a string.","type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"additionalProperties":false,"nullable":true,"properties":{"description":{"type":"string"},"flat_code":{"type":"string"},"id":{"minimum":1,"type":"integer"}},"required":["id","flat_code","description"],"type":"object"},"work_completed_from_previous_application":{"description":"Decimal amount serialized as a string.","type":"string"},"work_completed_retainage_retained_this_period":{"description":"Decimal amount serialized as a string.","type":"string"},"work_completed_this_period":{"description":"Decimal amount serialized as a string.","type":"string"}},"required":["id","requisition_id","position","detail_line_item_id","cost_code_id","description_of_work","item_number","scheduled_value","work_completed_from_previous_application","work_completed_this_period","materials_presently_stored","total_completed_and_stored_to_date","total_completed_and_stored_to_date_percent","balance_to_finish","completed_work_retainage_percent_this_period","work_completed_retainage_retained_this_period","subcontractor_claimed_amount","wbs_code","cost_code","currency_configuration","created_at","updated_at"],"type":"object"},"commitments_RequisitionSummary":{"additionalProperties":false,"properties":{"balance_to_finish_including_retainage":{"description":"Decimal amount serialized as a string.","type":"string"},"billing_issue":{"nullable":true,"type":"string"},"completed_work_retainage_amount":{"description":"Decimal amount serialized as a string.","type":"string"},"completed_work_retainage_percent":{"description":"Decimal amount serialized as a string.","type":"string"},"contract_sum_to_date":{"description":"Decimal amount serialized as a string.","type":"string"},"current_payment_due":{"description":"Decimal amount serialized as a string.","nullable":true,"type":"string"},"formatted_period":{"type":"string"},"less_previous_certificates_for_payment":{"description":"Decimal amount serialized as a string.","nullable":true,"type":"string"},"negative_change_order_item_total":{"description":"Decimal amount serialized as a string.","type":"string"},"negative_new_change_order_item_total":{"description":"Decimal amount serialized as a string.","type":"string"},"negative_previous_change_order_item_total":{"description":"Decimal amount serialized as a string.","type":"string"},"net_change_by_change_orders":{"description":"Decimal amount serialized as a string.","type":"string"},"original_contract_sum":{"description":"Decimal amount serialized as a string.","type":"string"},"positive_change_order_item_total":{"description":"Decimal amount serialized as a string.","type":"string"},"positive_new_change_order_item_total":{"description":"Decimal amount serialized as a string.","type":"string"},"positive_previous_change_order_item_total":{"description":"Decimal amount serialized as a string.","type":"string"},"stored_materials_retainage_amount":{"description":"Decimal amount serialized as a string.","type":"string"},"stored_materials_retainage_percent":{"description":"Decimal amount serialized as a string.","type":"string"},"tax_applicable_to_this_payment":{"description":"Decimal amount serialized as a string.","type":"string"},"total_completed_and_stored_to_date":{"description":"Decimal amount serialized as a string.","type":"string"},"total_earned_less_retainage":{"description":"Decimal amount serialized as a string.","type":"string"},"total_retainage":{"description":"Decimal amount serialized as a string.","type":"string"}},"required":["original_contract_sum","net_change_by_change_orders","contract_sum_to_date","total_completed_and_stored_to_date","completed_work_retainage_percent","completed_work_retainage_amount","stored_materials_retainage_percent","stored_materials_retainage_amount","total_retainage","total_earned_less_retainage","balance_to_finish_including_retainage","tax_applicable_to_this_payment","positive_change_order_item_total","positive_new_change_order_item_total","positive_previous_change_order_item_total","negative_change_order_item_total","negative_new_change_order_item_total","negative_previous_change_order_item_total","less_previous_certificates_for_payment","current_payment_due","billing_issue","formatted_period"],"type":"object"},"commitments_RequisitionTransitionInput":{"properties":{"project_id":{"minimum":1,"type":"integer"}},"type":"object"},"commitments_SsovPatch":{"properties":{"project_id":{"minimum":1,"type":"integer"},"status":{"$ref":"#/components/schemas/commitments_SsovStatusInput"}},"required":["status"],"type":"object"},"commitments_SsovStatus":{"additionalProperties":false,"properties":{"status":{"enum":["draft","under_review","revise_and_resubmit","approved"],"type":"string"}},"required":["status"],"type":"object"},"commitments_SsovStatusInput":{"description":"Canonical values are draft, under_review, revise_and_resubmit, approved. Case and spaces in labels are normalized.","example":"draft","pattern":"^\\s*(?:[dD][rR][aA][fF][tT]|[uU][nN][dD][eE][rR][ _][rR][eE][vV][iI][eE][wW]|[rR][eE][vV][iI][sS][eE][ _][aA][nN][dD][ _][rR][eE][sS][uU][bB][mM][iI][tT]|[aA][pP][pP][rR][oO][vV][eE][dD])\\s*$","type":"string"},"commitments_ValidationErrors":{"properties":{"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}},"required":["errors"],"type":"object"},"company_admin_Assignment":{"properties":{"permission_template_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}],"description":"Only explicit null clears. Omission or any accepted numeric value assigns the template identified by the URL, ignoring that numeric body value."},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"user_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["project_id","user_id"],"type":"object"},"company_admin_AssignmentResult":{"properties":{"permission_template_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}]},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"user_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["project_id","user_id","permission_template_id"],"type":"object"},"company_admin_Department":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","description","active","position","created_at","updated_at"],"type":"object"},"company_admin_DepartmentCreate":{"description":"Unknown properties are ignored by the handler. Defaults: active=true and position=0. ","properties":{"department":{"properties":{"active":{"description":"Prefer a JSON boolean. The handler uses JavaScript Boolean coercion: null, 0 and empty string become false; nonempty strings (including \"false\"), arrays and objects become true. Omitted values keep the existing value on update."},"description":{"type":["string","null"]},"name":{"description":"Trimmed; must contain a non-whitespace character.","minLength":1,"pattern":"\\S","type":"string"},"position":{"description":"Prefer an integer. The handler applies JavaScript Number coercion and requires a safe integer; numeric strings, null (0), booleans (0/1) and coercible arrays are also accepted. Invalid or fractional results return 422. This server-side coercion is not fully expressible in JSON Schema."}},"required":["name"],"type":"object"}},"required":["department"],"type":"object"},"company_admin_DepartmentUpdate":{"description":"Unknown properties are ignored by the handler. ","properties":{"department":{"properties":{"active":{"description":"Prefer a JSON boolean. The handler uses JavaScript Boolean coercion: null, 0 and empty string become false; nonempty strings (including \"false\"), arrays and objects become true. Omitted values keep the existing value on update."},"description":{"type":["string","null"]},"name":{"description":"Trimmed when nonblank; a whitespace-only name is ignored.","minLength":1,"type":"string"},"position":{"description":"Prefer an integer. The handler applies JavaScript Number coercion and requires a safe integer; numeric strings, null (0), booleans (0/1) and coercible arrays are also accepted. Invalid or fractional results return 422. This server-side coercion is not fully expressible in JSON Schema."}},"type":"object"}},"required":["department"],"type":"object"},"company_admin_Event":{"additionalProperties":false,"properties":{"actor_user_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"decision":{"enum":["accepted","rejected","revoked",null],"nullable":true,"type":"string"},"evidence_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"kind":{"enum":["received","reviewed","renewed","renewal_created","metadata_updated","followup_create","followup_update","followup_complete","followup_reopen"],"type":"string"},"note":{"type":"string"},"policy_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"recorded_at":{"format":"date-time","type":"string"},"related_policy_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"request_key":{"format":"uuid","type":"string"}},"required":["id","evidence_id","actor_user_id","kind","decision","note","request_key","policy_version","related_policy_id","recorded_at"],"type":"object"},"company_admin_Evidence":{"additionalProperties":false,"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"kind":{"enum":["certificate","policy","endorsement"],"type":"string"},"policy_snapshot":{"type":"object"},"received_at":{"format":"date-time","type":"string"},"received_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"replaces_evidence_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"size":{"minimum":1,"type":"integer"},"storage_project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"upload_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","upload_id","storage_project_id","kind","filename","content_type","size","sha256","policy_snapshot","received_by_id","received_at","replaces_evidence_id"],"type":"object"},"company_admin_EvidenceInboxItem":{"additionalProperties":false,"properties":{"evidence_id":{"minimum":1,"type":"integer"},"filename":{"type":"string"},"follow_up":{"additionalProperties":false,"nullable":true,"properties":{"due_date":{"format":"date","type":"string"},"owner_available":{"type":"boolean"},"owner_name":{"type":"string"},"status":{"enum":["open","completed"],"type":"string"}},"required":["status","due_date","owner_name","owner_available"],"type":"object"},"insurance_type":{"type":"string"},"kind":{"enum":["certificate","policy","endorsement"],"type":"string"},"policy_id":{"minimum":1,"type":"integer"},"policy_number":{"nullable":true,"type":"string"},"received_at":{"format":"date-time","type":"string"},"review_status":{"enum":["unreviewed","accepted","rejected","revoked"],"type":"string"}},"required":["evidence_id","policy_id","filename","kind","received_at","insurance_type","policy_number","review_status","follow_up"],"type":"object"},"company_admin_InsuranceCreate":{"properties":{"insurance_policy":{"properties":{"carrier":{"anyOf":[{"type":"string"},{"type":"null"}]},"coverage_amount":{"anyOf":[{"anyOf":[{"maximum":999999999999.99,"minimum":0,"type":"number"},{"minLength":1,"type":"string"}],"description":"Finite nonnegative amount, at most 999999999999.99. Nonblank numeric strings are converted to numbers; invalid or out-of-range strings return 422."},{"type":"null"}]},"effective_date":{"anyOf":[{"format":"date","pattern":"^(?!0000)[0-9]{4}-[0-9]{2}-[0-9]{2}$","type":"string"},{"type":"null"}]},"expiration_date":{"anyOf":[{"format":"date","pattern":"^(?!0000)[0-9]{4}-[0-9]{2}-[0-9]{2}$","type":"string"},{"type":"null"}]},"insurance_type":{"description":"Trimmed and must not be blank.","minLength":1,"pattern":"\\S","type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}]},"status":{"description":"Optional stored status. The response always derives status freshly from expiration_date, so it may differ.","enum":["active","expiring","expired","pending"],"type":"string"},"vendor_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}]}},"required":["insurance_type"],"type":"object"}},"required":["insurance_policy"],"type":"object"},"company_admin_InsuranceEvidenceDetail":{"additionalProperties":false,"properties":{"carrier":{"nullable":true,"type":"string"},"coverage_amount":{"nullable":true,"type":"number"},"created_at":{"format":"date-time","type":"string"},"effective_date":{"format":"date","nullable":true,"type":"string"},"events":{"items":{"$ref":"#/components/schemas/company_admin_Event"},"type":"array"},"evidence":{"items":{"$ref":"#/components/schemas/company_admin_Evidence"},"type":"array"},"expiration_date":{"format":"date","nullable":true,"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"insurance_type":{"type":"string"},"notes":{"nullable":true,"type":"string"},"policy_number":{"nullable":true,"type":"string"},"project_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"renewal_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"renewed_from_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"status":{"enum":["active","expiring","expired","pending"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["insurance_type","carrier","policy_number","coverage_amount","effective_date","expiration_date","project_id","vendor_id","notes","status","id","created_at","updated_at","version","renewed_from_id","renewal_id","evidence","events"],"type":"object"},"company_admin_InsuranceFollowUp":{"additionalProperties":false,"properties":{"completed_at":{"format":"date-time","nullable":true,"type":"string"},"completed_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"linked_renewal_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"note":{"type":"string"},"owner_available":{"type":"boolean"},"owner_name":{"type":"string"},"owner_user_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"policy_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"policy_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"status":{"enum":["open","completed"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","policy_id","owner_user_id","owner_name","owner_available","due_date","status","note","completed_at","completed_by_id","linked_renewal_id","policy_version","created_at","updated_at"],"type":"object"},"company_admin_InsuranceFollowUpCommand":{"oneOf":[{"additionalProperties":false,"properties":{"action":{"enum":["create"],"type":"string"},"due_date":{"format":"date","type":"string"},"expected_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"note":{"maxLength":2000,"minLength":3,"type":"string"},"owner_user_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"request_key":{"format":"uuid","type":"string"}},"required":["expected_version","request_key","note","action","owner_user_id","due_date"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"enum":["update"],"type":"string"},"due_date":{"format":"date","type":"string"},"expected_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"note":{"maxLength":2000,"minLength":3,"type":"string"},"owner_user_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"request_key":{"format":"uuid","type":"string"}},"required":["expected_version","request_key","note","action","owner_user_id","due_date"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"enum":["complete"],"type":"string"},"expected_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"linked_renewal_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"note":{"maxLength":2000,"minLength":3,"type":"string"},"request_key":{"format":"uuid","type":"string"}},"required":["expected_version","request_key","note","action"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"enum":["reopen"],"type":"string"},"due_date":{"format":"date","type":"string"},"expected_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"note":{"maxLength":2000,"minLength":3,"type":"string"},"owner_user_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"request_key":{"format":"uuid","type":"string"}},"required":["expected_version","request_key","note","action","owner_user_id","due_date"],"type":"object"}]},"company_admin_InsurancePolicy":{"properties":{"carrier":{"anyOf":[{"type":"string"},{"type":"null"}]},"coverage_amount":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"format":"date-time","type":"string"},"effective_date":{"anyOf":[{"format":"date","pattern":"^(?!0000)[0-9]{4}-[0-9]{2}-[0-9]{2}$","type":"string"},{"type":"null"}]},"expiration_date":{"anyOf":[{"format":"date","pattern":"^(?!0000)[0-9]{4}-[0-9]{2}-[0-9]{2}$","type":"string"},{"type":"null"}]},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"insurance_type":{"type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}]},"status":{"enum":["active","expiring","expired","pending"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}]}},"required":["id","project_id","vendor_id","insurance_type","carrier","policy_number","coverage_amount","effective_date","expiration_date","status","notes","created_at","updated_at"],"type":"object"},"company_admin_InsuranceUpdate":{"properties":{"insurance_policy":{"properties":{"carrier":{"anyOf":[{"type":"string"},{"type":"null"}]},"coverage_amount":{"anyOf":[{"anyOf":[{"maximum":999999999999.99,"minimum":0,"type":"number"},{"minLength":1,"type":"string"}],"description":"Finite nonnegative amount, at most 999999999999.99. Nonblank numeric strings are converted to numbers; invalid or out-of-range strings return 422."},{"type":"null"}]},"effective_date":{"anyOf":[{"format":"date","pattern":"^(?!0000)[0-9]{4}-[0-9]{2}-[0-9]{2}$","type":"string"},{"type":"null"}]},"expiration_date":{"anyOf":[{"format":"date","pattern":"^(?!0000)[0-9]{4}-[0-9]{2}-[0-9]{2}$","type":"string"},{"type":"null"}]},"insurance_type":{"description":"Trimmed and must not be blank.","minLength":1,"pattern":"\\S","type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"project_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}]},"status":{"description":"Optional stored status. The response always derives status freshly from expiration_date, so it may differ.","enum":["active","expiring","expired","pending"],"type":"string"},"vendor_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}]}},"required":[],"type":"object"}},"required":["insurance_policy"],"type":"object"},"company_admin_Office":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"address":{"type":["string","null"]},"city":{"type":["string","null"]},"country_code":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"division":{"type":["string","null"]},"fax":{"type":["string","null"]},"id":{"type":"integer"},"main_office":{"type":"boolean"},"name":{"type":"string"},"phone":{"type":["string","null"]},"position":{"type":"integer"},"state_code":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"zip":{"type":["string","null"]}},"required":["id","name","address","city","state_code","country_code","zip","phone","fax","division","active","position","created_at","updated_at","main_office"],"type":"object"},"company_admin_OfficeCreate":{"description":"Unknown properties are ignored by the handler. Defaults: active=true and position=0. main_office defaults to false on create. Setting it true clears the main-office flag on other offices in this company.","properties":{"office":{"properties":{"active":{"description":"Prefer a JSON boolean. The handler uses JavaScript Boolean coercion: null, 0 and empty string become false; nonempty strings (including \"false\"), arrays and objects become true. Omitted values keep the existing value on update."},"address":{"type":["string","null"]},"city":{"type":["string","null"]},"country_code":{"type":["string","null"]},"division":{"type":["string","null"]},"fax":{"type":["string","null"]},"main_office":{"description":"Prefer a JSON boolean. The handler uses JavaScript Boolean coercion: null, 0 and empty string become false; nonempty strings (including \"false\"), arrays and objects become true. Omitted values keep the existing value on update."},"name":{"description":"Trimmed; must contain a non-whitespace character.","minLength":1,"pattern":"\\S","type":"string"},"phone":{"type":["string","null"]},"position":{"description":"Prefer an integer. The handler applies JavaScript Number coercion and requires a safe integer; numeric strings, null (0), booleans (0/1) and coercible arrays are also accepted. Invalid or fractional results return 422. This server-side coercion is not fully expressible in JSON Schema."},"state_code":{"type":["string","null"]},"zip":{"type":["string","null"]}},"required":["name"],"type":"object"}},"required":["office"],"type":"object"},"company_admin_OfficeUpdate":{"description":"Unknown properties are ignored by the handler. main_office defaults to false on create. Setting it true clears the main-office flag on other offices in this company.","properties":{"office":{"properties":{"active":{"description":"Prefer a JSON boolean. The handler uses JavaScript Boolean coercion: null, 0 and empty string become false; nonempty strings (including \"false\"), arrays and objects become true. Omitted values keep the existing value on update."},"address":{"type":["string","null"]},"city":{"type":["string","null"]},"country_code":{"type":["string","null"]},"division":{"type":["string","null"]},"fax":{"type":["string","null"]},"main_office":{"description":"Prefer a JSON boolean. The handler uses JavaScript Boolean coercion: null, 0 and empty string become false; nonempty strings (including \"false\"), arrays and objects become true. Omitted values keep the existing value on update."},"name":{"description":"Trimmed when nonblank; a whitespace-only name is ignored.","minLength":1,"type":"string"},"phone":{"type":["string","null"]},"position":{"description":"Prefer an integer. The handler applies JavaScript Number coercion and requires a safe integer; numeric strings, null (0), booleans (0/1) and coercible arrays are also accepted. Invalid or fractional results return 422. This server-side coercion is not fully expressible in JSON Schema."},"state_code":{"type":["string","null"]},"zip":{"type":["string","null"]}},"type":"object"}},"required":["office"],"type":"object"},"company_admin_PermissionTemplate":{"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"permissions":{"additionalProperties":{"type":"string"},"type":"object"},"project_specific":{"type":"boolean"},"type":{"enum":["global","project_specific"],"type":"string"}},"required":["id","name","project_specific","type","permissions"],"type":"object"},"company_admin_ProjectRegion":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","active","position","created_at","updated_at"],"type":"object"},"company_admin_ProjectRegionCreate":{"description":"Unknown properties are ignored by the handler. Defaults: active=true and position=0. ","properties":{"project_region":{"properties":{"active":{"description":"Prefer a JSON boolean. The handler uses JavaScript Boolean coercion: null, 0 and empty string become false; nonempty strings (including \"false\"), arrays and objects become true. Omitted values keep the existing value on update."},"name":{"description":"Trimmed; must contain a non-whitespace character.","minLength":1,"pattern":"\\S","type":"string"},"position":{"description":"Prefer an integer. The handler applies JavaScript Number coercion and requires a safe integer; numeric strings, null (0), booleans (0/1) and coercible arrays are also accepted. Invalid or fractional results return 422. This server-side coercion is not fully expressible in JSON Schema."}},"required":["name"],"type":"object"}},"required":["project_region"],"type":"object"},"company_admin_ProjectRegionUpdate":{"description":"Unknown properties are ignored by the handler. ","properties":{"project_region":{"properties":{"active":{"description":"Prefer a JSON boolean. The handler uses JavaScript Boolean coercion: null, 0 and empty string become false; nonempty strings (including \"false\"), arrays and objects become true. Omitted values keep the existing value on update."},"name":{"description":"Trimmed when nonblank; a whitespace-only name is ignored.","minLength":1,"type":"string"},"position":{"description":"Prefer an integer. The handler applies JavaScript Number coercion and requires a safe integer; numeric strings, null (0), booleans (0/1) and coercible arrays are also accepted. Invalid or fractional results return 422. This server-side coercion is not fully expressible in JSON Schema."}},"type":"object"}},"required":["project_region"],"type":"object"},"company_admin_ProjectStage":{"additionalProperties":false,"properties":{"formatted_name":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name","formatted_name"],"type":"object"},"company_admin_ProjectStageUpdate":{"description":"Unknown properties are ignored by the handler. ","properties":{"project_stage":{"properties":{"formatted_name":{"type":["string","null"]},"name":{"description":"Trimmed when nonblank; a whitespace-only name is ignored.","minLength":1,"type":"string"}},"type":"object"}},"required":["project_stage"],"type":"object"},"company_admin_ProjectType":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","active","position","created_at","updated_at"],"type":"object"},"company_admin_ProjectTypeCreate":{"description":"Unknown properties are ignored by the handler. Defaults: active=true and position=0. ","properties":{"project_type":{"properties":{"active":{"description":"Prefer a JSON boolean. The handler uses JavaScript Boolean coercion: null, 0 and empty string become false; nonempty strings (including \"false\"), arrays and objects become true. Omitted values keep the existing value on update."},"name":{"description":"Trimmed; must contain a non-whitespace character.","minLength":1,"pattern":"\\S","type":"string"},"position":{"description":"Prefer an integer. The handler applies JavaScript Number coercion and requires a safe integer; numeric strings, null (0), booleans (0/1) and coercible arrays are also accepted. Invalid or fractional results return 422. This server-side coercion is not fully expressible in JSON Schema."}},"required":["name"],"type":"object"}},"required":["project_type"],"type":"object"},"company_admin_ProjectTypeUpdate":{"description":"Unknown properties are ignored by the handler. ","properties":{"project_type":{"properties":{"active":{"description":"Prefer a JSON boolean. The handler uses JavaScript Boolean coercion: null, 0 and empty string become false; nonempty strings (including \"false\"), arrays and objects become true. Omitted values keep the existing value on update."},"name":{"description":"Trimmed when nonblank; a whitespace-only name is ignored.","minLength":1,"type":"string"},"position":{"description":"Prefer an integer. The handler applies JavaScript Number coercion and requires a safe integer; numeric strings, null (0), booleans (0/1) and coercible arrays are also accepted. Invalid or fractional results return 422. This server-side coercion is not fully expressible in JSON Schema."}},"type":"object"}},"required":["project_type"],"type":"object"},"company_admin_Receipt":{"additionalProperties":false,"properties":{"expected_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"file":{"format":"binary","type":"string"},"kind":{"enum":["certificate","policy","endorsement"],"type":"string"},"note":{"maxLength":2000,"minLength":1,"type":"string"},"replaces_evidence_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"request_key":{"format":"uuid","type":"string"},"storage_project_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["expected_version","request_key","storage_project_id","kind","note","file"],"type":"object"},"company_admin_Renewal":{"additionalProperties":false,"description":"Effective and expiration dates required; expiration must extend the previous policy. Vendor and project must match. Renewal creates a new record without copying evidence or decisions.","properties":{"expected_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"note":{"maxLength":4000,"minLength":3,"type":"string"},"policy":{"additionalProperties":false,"properties":{"carrier":{"nullable":true,"type":"string"},"coverage_amount":{"nullable":true,"type":"number"},"effective_date":{"format":"date","nullable":true,"type":"string"},"expiration_date":{"format":"date","nullable":true,"type":"string"},"insurance_type":{"type":"string"},"notes":{"nullable":true,"type":"string"},"policy_number":{"nullable":true,"type":"string"},"project_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"status":{"enum":["active","expiring","expired","pending"],"type":"string"},"vendor_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["insurance_type"],"type":"object"},"request_key":{"format":"uuid","type":"string"}},"required":["expected_version","request_key","policy","note"],"type":"object"},"company_admin_Review":{"additionalProperties":false,"properties":{"decision":{"enum":["accepted","rejected","revoked"],"type":"string"},"evidence_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"expected_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"note":{"maxLength":4000,"minLength":3,"type":"string"},"request_key":{"format":"uuid","type":"string"}},"required":["expected_version","request_key","evidence_id","decision","note"],"type":"object"},"company_admin_TemplateCreate":{"properties":{"permission_template":{"properties":{"name":{"description":"Create trims and rejects blank names with 400. PATCH whitespace-only name is accepted but retains the existing name.","minLength":1,"type":"string"},"permissions":{"additionalProperties":{"enum":["none","read_only","standard","admin"],"type":"string"},"description":"Tool slug to permission level. PATCH replaces the whole map. Unknown tool keys are accepted; this does not grant company administrator status.","type":"object"},"project_specific":{"description":"Boolean coercion uses JavaScript truthiness. Prefer a JSON boolean; a nonempty string, including \"false\", becomes true. Defaults false on create."}},"required":["name"],"type":"object"}},"required":["permission_template"],"type":"object"},"company_admin_TemplateUpdate":{"properties":{"permission_template":{"properties":{"name":{"description":"Create trims and rejects blank names with 400. PATCH whitespace-only name is accepted but retains the existing name.","minLength":1,"type":"string"},"permissions":{"additionalProperties":{"enum":["none","read_only","standard","admin"],"type":"string"},"description":"Tool slug to permission level. PATCH replaces the whole map. Unknown tool keys are accepted; this does not grant company administrator status.","type":"object"},"project_specific":{"description":"Boolean coercion uses JavaScript truthiness. Prefer a JSON boolean; a nonempty string, including \"false\", becomes true. Defaults false on create."}},"required":[],"type":"object"}},"required":["permission_template"],"type":"object"},"company_admin_Trade":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"code":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"csi_code":{"type":["string","null"]},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","code","csi_code","active","position","created_at","updated_at"],"type":"object"},"company_admin_TradeCreate":{"description":"Unknown properties are ignored by the handler. Defaults: active=true and position=0. ","properties":{"trade":{"properties":{"active":{"description":"Prefer a JSON boolean. The handler uses JavaScript Boolean coercion: null, 0 and empty string become false; nonempty strings (including \"false\"), arrays and objects become true. Omitted values keep the existing value on update."},"code":{"type":["string","null"]},"csi_code":{"type":["string","null"]},"name":{"description":"Trimmed; must contain a non-whitespace character.","minLength":1,"pattern":"\\S","type":"string"},"position":{"description":"Prefer an integer. The handler applies JavaScript Number coercion and requires a safe integer; numeric strings, null (0), booleans (0/1) and coercible arrays are also accepted. Invalid or fractional results return 422. This server-side coercion is not fully expressible in JSON Schema."}},"required":["name"],"type":"object"}},"required":["trade"],"type":"object"},"company_admin_TradeUpdate":{"description":"Unknown properties are ignored by the handler. ","properties":{"trade":{"properties":{"active":{"description":"Prefer a JSON boolean. The handler uses JavaScript Boolean coercion: null, 0 and empty string become false; nonempty strings (including \"false\"), arrays and objects become true. Omitted values keep the existing value on update."},"code":{"type":["string","null"]},"csi_code":{"type":["string","null"]},"name":{"description":"Trimmed when nonblank; a whitespace-only name is ignored.","minLength":1,"type":"string"},"position":{"description":"Prefer an integer. The handler applies JavaScript Number coercion and requires a safe integer; numeric strings, null (0), booleans (0/1) and coercible arrays are also accepted. Invalid or fractional results return 422. This server-side coercion is not fully expressible in JSON Schema."}},"type":"object"}},"required":["trade"],"type":"object"},"connectors_AuthenticationMetadata":{"additionalProperties":false,"properties":{"authorization":{"enum":["unknown"],"type":"string"},"binding_status":{"enum":["not_configured","recorded","mismatch"],"type":"string"},"credential_recorded":{"type":"boolean"},"oauth_pending":{"type":"boolean"},"refresh_state":{"enum":["none","claimed","request_started","uncertain"],"type":"string"},"remote_revocation":{"enum":["unknown"],"type":"string"},"token_expiry":{"enum":["unknown"],"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["binding_status","credential_recorded","oauth_pending","refresh_state","authorization","token_expiry","remote_revocation","updated_at"],"type":"object"},"connectors_Connection":{"additionalProperties":false,"properties":{"authentication":{"$ref":"#/components/schemas/connectors_AuthenticationMetadata"},"authorization":{"enum":["unknown"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"environment":{"enum":["sandbox","production","unknown"],"type":"string"},"id":{"format":"uuid","type":"string"},"mutations_available":{"enum":[false],"type":"boolean"},"operational_status":{"enum":["active","paused","revoked","unknown"],"type":"string"},"provider_label":{"type":"string"},"setup_available":{"enum":[false],"type":"boolean"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","provider_label","environment","operational_status","authorization","setup_available","mutations_available","created_at","updated_at"],"type":"object"},"connectors_ConnectionList":{"additionalProperties":false,"properties":{"data":{"items":{"$ref":"#/components/schemas/connectors_Connection"},"type":"array"},"page":{"minimum":1,"type":"integer"},"per_page":{"maximum":100,"minimum":1,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["data","total","page","per_page"],"type":"object"},"connectors_Error":{"additionalProperties":false,"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"required":["errors"],"type":"object"},"connectors_Run":{"additionalProperties":false,"properties":{"adapter_version":{"nullable":true,"type":"string"},"authentication":{"$ref":"#/components/schemas/connectors_AuthenticationMetadata"},"authorization":{"enum":["unknown"],"type":"string"},"coverage":{"enum":["unknown"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"deprecation":{"enum":["unknown"],"type":"string"},"domain_applied":{"enum":[null],"nullable":true,"type":"integer"},"error_code":{"nullable":true,"type":"string"},"health":{"enum":["error","partial","staged","queued","running","paused","cancelled","unknown"],"type":"string"},"id":{"format":"uuid","type":"string"},"lag_seconds":{"enum":[null],"nullable":true,"type":"integer"},"pages":{"minimum":0,"type":"integer"},"quarantine_count":{"minimum":0,"type":"integer"},"source_api_version":{"nullable":true,"type":"string"},"staged_count":{"minimum":0,"type":"integer"},"status":{"enum":["queued","running","paused","completed","cancelled","unknown"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","status","health","pages","staged_count","quarantine_count","error_code","adapter_version","source_api_version","authorization","coverage","lag_seconds","deprecation","domain_applied","created_at","updated_at"],"type":"object"},"connectors_RunList":{"additionalProperties":false,"properties":{"authentication":{"$ref":"#/components/schemas/connectors_AuthenticationMetadata"},"data":{"items":{"$ref":"#/components/schemas/connectors_Run"},"type":"array"},"page":{"minimum":1,"type":"integer"},"per_page":{"maximum":100,"minimum":1,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["data","total","page","per_page"],"type":"object"},"conversations_ConversationListItem":{"properties":{"created_at":{"nullable":true,"type":"string"},"created_by":{"$ref":"#/components/schemas/conversations_UserStub"},"id":{"type":"integer"},"is_group":{"type":"boolean"},"last_message":{"allOf":[{"$ref":"#/components/schemas/conversations_Message"}],"nullable":true},"message_count":{"type":"integer"},"participant_count":{"type":"integer"},"participants":{"items":{"$ref":"#/components/schemas/conversations_Participant"},"type":"array"},"project_id":{"type":"integer"},"subject":{"nullable":true,"type":"string"},"title":{"type":"string"},"unread_count":{"type":"integer"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","project_id","subject","title","is_group","participants","participant_count","message_count","last_message","unread_count","created_at"],"type":"object"},"conversations_ConversationShow":{"properties":{"created_at":{"nullable":true,"type":"string"},"created_by":{"$ref":"#/components/schemas/conversations_UserStub"},"has_older":{"type":"boolean"},"id":{"type":"integer"},"is_group":{"type":"boolean"},"message_count":{"type":"integer"},"messages":{"items":{"$ref":"#/components/schemas/conversations_Message"},"type":"array"},"older_cursor":{"nullable":true,"type":"string"},"participant_count":{"type":"integer"},"participants":{"items":{"$ref":"#/components/schemas/conversations_Participant"},"type":"array"},"project_id":{"type":"integer"},"read_through":{"nullable":true,"type":"string"},"subject":{"nullable":true,"type":"string"},"title":{"type":"string"},"unread_count":{"type":"integer"},"updated_at":{"nullable":true,"type":"string"},"window_count":{"maximum":100,"minimum":0,"type":"integer"}},"required":["id","project_id","subject","title","is_group","participants","participant_count","messages","message_count","has_older","older_cursor","window_count","read_through","unread_count","created_at"],"type":"object"},"conversations_Message":{"properties":{"body":{"type":"string"},"conversation_id":{"type":"integer"},"created_at":{"nullable":true,"type":"string"},"id":{"type":"integer"},"sender":{"$ref":"#/components/schemas/conversations_UserStub"},"sender_id":{"type":"integer"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","conversation_id","sender_id","body","created_at"],"type":"object"},"conversations_Participant":{"properties":{"id":{"type":"integer"},"last_read_at":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"user":{"$ref":"#/components/schemas/conversations_UserStub"},"user_id":{"type":"integer"}},"required":["id","user_id","last_read_at"],"type":"object"},"conversations_UserStub":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login","name"],"type":"object"},"coordination_issues_Comment":{"properties":{"body":{"nullable":true,"type":"string"},"coordination_issue_id":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"parent_id":{"nullable":true,"type":"integer"},"replies":{"items":{"type":"object"},"type":"array"},"status":{"nullable":true,"type":"string"},"type":{"enum":["comment","status_change"],"type":"string"},"updated_at":{"type":"string"}},"required":["id","coordination_issue_id","type"],"type":"object"},"coordination_issues_CoordinationIssueListItem":{"properties":{"assignee":{"$ref":"#/components/schemas/coordination_issues_LoginInformation"},"bim_model_id":{"nullable":true,"type":"integer"},"comments_count":{"type":"integer"},"coordination_issue_file":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"uuid":{"nullable":true,"type":"string"}},"type":"object"},"coordination_issue_file_id":{"nullable":true,"type":"integer"},"created_at":{"type":"string"},"created_by":{"$ref":"#/components/schemas/coordination_issues_LoginInformation"},"creation_source":{"type":"string"},"discipline":{"enum":["architectural","structural","mechanical","electrical","plumbing","fire_protection","civil","landscape","other"],"nullable":true,"type":"string"},"drawing_revision":{"nullable":true,"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"drawing_revision_id":{"nullable":true,"type":"integer"},"due_date":{"nullable":true,"type":"string"},"id":{"type":"integer"},"issue_number":{"type":"integer"},"issue_type":{"nullable":true,"type":"string"},"linked_drawing":{"nullable":true,"properties":{"display":{"type":"string"},"id":{"type":"integer"},"number":{"type":"string"},"title":{"nullable":true,"type":"string"}},"type":"object"},"linked_drawing_id":{"nullable":true,"type":"integer"},"linked_model":{"nullable":true,"properties":{"discipline":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"linked_model_id":{"nullable":true,"type":"integer"},"location":{"$ref":"#/components/schemas/coordination_issues_Location"},"priority":{"nullable":true,"type":"string"},"project_id":{"type":"integer"},"status":{"enum":["open","in_progress","blocked","unblocked","ready_for_review","moved_to_observation","closed"],"type":"string"},"title":{"type":"string"},"trade":{"$ref":"#/components/schemas/coordination_issues_Trade"},"translated_discipline":{"nullable":true,"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"updated_by":{"$ref":"#/components/schemas/coordination_issues_LoginInformation"},"uuid":{"type":"string"}},"required":["id","uuid","title","status","issue_number","project_id","created_by"],"type":"object"},"coordination_issues_CoordinationIssueShow":{"allOf":[{"$ref":"#/components/schemas/coordination_issues_CoordinationIssueListItem"},{"properties":{"ball_in_court_ids":{"items":{"type":"integer"},"type":"array"},"deleted_at":{"nullable":true,"type":"string"},"is_private":{"type":"boolean"},"item_associations":{"items":{"type":"object"},"type":"array"},"linked_drawings":{"items":{"type":"object"},"type":"array"},"linked_observation_items":{"items":{"type":"object"},"type":"array"},"watcher_ids":{"items":{"type":"integer"},"type":"array"},"watchers":{"items":{"$ref":"#/components/schemas/coordination_issues_LoginInformation"},"type":"array"}},"required":["is_private","ball_in_court_ids"],"type":"object"}]},"coordination_issues_Location":{"nullable":true,"properties":{"code":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"nullable":true,"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"type":"string"}},"type":"object"},"coordination_issues_LoginInformation":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name","login"],"type":"object"},"coordination_issues_StatusOption":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"coordination_issues_Trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"type":"string"}},"type":"object"},"crm_Create":{"additionalProperties":false,"properties":{"handoff_evidence":{"additionalProperties":false,"properties":{"document_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"note":{"maxLength":10000,"minLength":1,"type":"string"},"purpose":{"maxLength":200,"minLength":1,"type":"string"},"request_key":{"format":"uuid","type":"string"},"supersedes_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version","document_version_id","purpose","note","request_key"],"type":"object"}},"required":["handoff_evidence"],"type":"object"},"crm_CrmAssetCaseHistory":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/crm_CrmAssetCaseHistoryRow"},"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["rows","total"],"type":"object"},"crm_CrmAssetCaseHistoryRow":{"properties":{"active":{"type":"boolean"},"asset_id":{"minimum":1,"type":"integer"},"case_id":{"minimum":1,"type":"integer"},"case_status":{"type":"string"},"case_title":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"revocation_note":{"anyOf":[{"type":"string"},{"type":"null"}]},"revoked_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"revoked_by_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]}},"required":["id","case_id","case_title","case_status","asset_id","active","created_at","created_by_id","revoked_at","revoked_by_id","revocation_note"],"type":"object"},"crm_CrmAssetLinkRevocation":{"properties":{"id":{"minimum":1,"type":"integer"},"revoked_at":{"format":"date-time","type":"string"},"revoked_by_id":{"minimum":1,"type":"integer"}},"required":["id","revoked_at","revoked_by_id"],"type":"object"},"crm_CrmBiddingHandoff":{"additionalProperties":false,"properties":{"bid_package_id":{"minimum":1,"type":"integer"},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"opportunity_id":{"minimum":1,"type":"integer"},"package_title":{"type":"string"},"project_id":{"minimum":1,"type":"integer"},"proposal_id":{"minimum":1,"type":"integer"},"revision":{"minimum":1,"type":"integer"},"source_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"transfer_snapshot":{"$ref":"#/components/schemas/crm_CrmBiddingTransferSnapshot"}},"required":["id","company_id","project_id","opportunity_id","proposal_id","revision","bid_package_id","package_title","source_sha256","transfer_snapshot","created_at","created_by_id"],"type":"object"},"crm_CrmBiddingHandoffCreate":{"additionalProperties":false,"properties":{"handoff":{"additionalProperties":false,"properties":{"package_title":{"maxLength":200,"minLength":1,"type":"string"},"request_key":{"format":"uuid","type":"string"},"review_token":{"maxLength":43,"minLength":43,"type":"string"}},"required":["package_title","review_token","request_key"],"type":"object"}},"required":["handoff"],"type":"object"},"crm_CrmBiddingHandoffCreated":{"additionalProperties":false,"properties":{"handoff":{"$ref":"#/components/schemas/crm_CrmBiddingHandoff"},"replayed":{"type":"boolean"}},"required":["handoff","replayed"],"type":"object"},"crm_CrmBiddingHandoffPreview":{"additionalProperties":false,"properties":{"expires_at":{"format":"date-time","type":"string"},"package_title":{"type":"string"},"proposal":{"$ref":"#/components/schemas/crm_CrmBiddingTransferSnapshot"},"review_token":{"maxLength":43,"minLength":43,"type":"string"},"source_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["proposal","package_title","source_sha256","review_token","expires_at"],"type":"object"},"crm_CrmBiddingHandoffPreviewRequest":{"additionalProperties":false,"properties":{"handoff":{"additionalProperties":false,"properties":{"package_title":{"maxLength":200,"minLength":1,"type":"string"}},"required":["package_title"],"type":"object"}},"required":["handoff"],"type":"object"},"crm_CrmBiddingHandoffRead":{"additionalProperties":false,"properties":{"handoff":{"oneOf":[{"$ref":"#/components/schemas/crm_CrmBiddingHandoff"},{"type":"null"}]}},"required":["handoff"],"type":"object"},"crm_CrmBiddingTransferSnapshot":{"additionalProperties":false,"description":"Private CRM source text, never copied automatically into a vendor-facing bidding package.","properties":{"estimate_lines":{"items":{"additionalProperties":false,"properties":{"description":{"type":"string"},"quantity":{"type":"string"},"unit":{"type":"string"}},"required":["description","quantity","unit"],"type":"object"},"type":"array"},"exclusions":{"type":["string","null"]},"proposal_id":{"minimum":1,"type":"integer"},"revision":{"minimum":1,"type":"integer"},"scope":{"type":["string","null"]},"title":{"type":"string"}},"required":["proposal_id","revision","title","scope","exclusions","estimate_lines"],"type":"object"},"crm_CrmCaseAssetLink":{"properties":{"asset_id":{"minimum":1,"type":"integer"},"asset_name":{"type":"string"},"asset_status":{"enum":["active","retired"],"type":"string"},"asset_tag":{"type":"string"},"case_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"}},"required":["id","case_id","asset_id","asset_tag","asset_name","asset_status","created_at","created_by_id"],"type":"object"},"crm_CrmContactImportCommitRequest":{"additionalProperties":false,"properties":{"import":{"additionalProperties":false,"properties":{"accept_duplicate_suggestions":{"type":"boolean"},"csv":{"maxLength":262144,"minLength":1,"type":"string"},"mapping":{"$ref":"#/components/schemas/crm_CrmContactImportMapping"},"request_key":{"format":"uuid","type":"string"},"review_sha256":{"pattern":"^[0-9a-f]{64}$","type":"string"},"source_key":{"pattern":"^[a-z][a-z0-9_-]{0,79}$","type":"string"}},"required":["source_key","csv","mapping","request_key","review_sha256","accept_duplicate_suggestions"],"type":"object"}},"required":["import"],"type":"object"},"crm_CrmContactImportMapping":{"additionalProperties":false,"properties":{"email":{"maxLength":200,"minLength":1,"type":"string"},"external_id":{"maxLength":200,"minLength":1,"type":"string"},"first_name":{"maxLength":200,"minLength":1,"type":"string"},"last_name":{"maxLength":200,"minLength":1,"type":"string"},"notes":{"maxLength":200,"minLength":1,"type":"string"},"organization":{"maxLength":200,"minLength":1,"type":"string"},"owner_id":{"maxLength":200,"minLength":1,"type":"string"},"phone":{"maxLength":200,"minLength":1,"type":"string"},"relationship":{"maxLength":200,"minLength":1,"type":"string"},"role":{"maxLength":200,"minLength":1,"type":"string"},"source":{"maxLength":200,"minLength":1,"type":"string"}},"required":["external_id","first_name","last_name"],"type":"object"},"crm_CrmContactImportPreview":{"additionalProperties":false,"properties":{"duplicate_suggestion_count":{"minimum":0,"type":"integer"},"error_count":{"minimum":0,"type":"integer"},"payload_sha256":{"pattern":"^[0-9a-f]{64}$","type":"string"},"review_sha256":{"pattern":"^[0-9a-f]{64}$","type":"string"},"row_count":{"maximum":200,"minimum":1,"type":"integer"},"rows":{"items":{"additionalProperties":false,"properties":{"contact":{"anyOf":[{"type":"object"},{"type":"null"}]},"duplicate_candidates":{"items":{"additionalProperties":false,"properties":{"contact_id":{"minimum":1,"type":"integer"},"first_name":{"type":"string"},"last_name":{"type":"string"},"organization":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"enum":["email","name"],"type":"string"}},"required":["contact_id","first_name","last_name","organization","reason"],"type":"object"},"maxItems":3,"type":"array"},"duplicate_csv_rows":{"items":{"minimum":2,"type":"integer"},"type":"array"},"errors":{"items":{"type":"string"},"type":"array"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"more_candidates":{"type":"boolean"},"row_number":{"minimum":2,"type":"integer"}},"required":["row_number","external_id","contact","errors","duplicate_candidates","duplicate_csv_rows","more_candidates"],"type":"object"},"maxItems":200,"type":"array"},"source_key":{"type":"string"},"valid_count":{"minimum":0,"type":"integer"}},"required":["source_key","payload_sha256","review_sha256","row_count","valid_count","error_count","duplicate_suggestion_count","rows"],"type":"object"},"crm_CrmContactImportPreviewRequest":{"additionalProperties":false,"properties":{"import":{"additionalProperties":false,"properties":{"csv":{"maxLength":262144,"minLength":1,"type":"string"},"mapping":{"$ref":"#/components/schemas/crm_CrmContactImportMapping"},"source_key":{"pattern":"^[a-z][a-z0-9_-]{0,79}$","type":"string"}},"required":["source_key","csv","mapping"],"type":"object"}},"required":["import"],"type":"object"},"crm_CrmContactImportReceipt":{"additionalProperties":false,"properties":{"acknowledged_duplicates":{"type":"boolean"},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"created_count":{"maximum":200,"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"idempotent":{"type":"boolean"},"payload_sha256":{"pattern":"^[0-9a-f]{64}$","type":"string"},"request_key":{"format":"uuid","type":"string"},"review_sha256":{"pattern":"^[0-9a-f]{64}$","type":"string"},"row_count":{"maximum":200,"minimum":1,"type":"integer"},"rows":{"items":{"additionalProperties":false,"properties":{"contact_id":{"minimum":1,"type":"integer"},"row_number":{"minimum":2,"type":"integer"}},"required":["row_number","contact_id"],"type":"object"},"maxItems":200,"type":"array"},"source_key":{"type":"string"}},"required":["id","company_id","source_key","request_key","payload_sha256","review_sha256","acknowledged_duplicates","row_count","created_count","created_by_id","created_at","rows"],"type":"object"},"crm_CrmCustomerDocumentShare":{"additionalProperties":false,"properties":{"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"filename":{"type":"string"},"id":{"minimum":1,"type":"integer"},"published_at":{"format":"date-time","type":["string","null"]},"recipient_grant_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"review_confirmed":{"description":"Retained staff attestation that the source, public text and exact recipients were reviewed before publication.","type":"boolean"},"size_bytes":{"minimum":0,"type":"integer"},"source_file_id":{"minimum":1,"type":"integer"},"source_review_needed":{"type":"boolean"},"source_sha256":{"description":"Staff-only digest of reviewed source bytes; never returned to customers.","pattern":"^[a-f0-9]{64}$","type":"string"},"source_version_id":{"minimum":1,"type":"integer"},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","title","description","filename","content_type","size_bytes","state","version","source_file_id","source_version_id","source_review_needed","published_at","withdrawn_at","recipient_grant_ids","created_at","updated_at","source_sha256","review_confirmed"],"type":"object"},"crm_CrmCustomerDocumentShareDetail":{"additionalProperties":false,"properties":{"content_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"filename":{"type":"string"},"id":{"minimum":1,"type":"integer"},"published_at":{"format":"date-time","type":["string","null"]},"recipient_grant_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"recipients":{"items":{"additionalProperties":false,"properties":{"grant_id":{"minimum":1,"type":"integer"},"recipient_email":{"type":"string"},"recipient_name":{"type":"string"}},"required":["grant_id","recipient_name","recipient_email"],"type":"object"},"type":"array"},"review_confirmed":{"description":"Retained staff attestation that the source, public text and exact recipients were reviewed before publication.","type":"boolean"},"revisions":{"items":{"type":"object"},"type":"array"},"size_bytes":{"minimum":0,"type":"integer"},"source_file_id":{"minimum":1,"type":"integer"},"source_review_needed":{"type":"boolean"},"source_sha256":{"description":"Staff-only digest of reviewed source bytes; never returned to customers.","pattern":"^[a-f0-9]{64}$","type":"string"},"source_version_id":{"minimum":1,"type":"integer"},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","title","description","filename","content_type","size_bytes","state","version","source_file_id","source_version_id","source_review_needed","published_at","withdrawn_at","recipient_grant_ids","created_at","updated_at","recipients","revisions","source_sha256","review_confirmed"],"type":"object"},"crm_CrmCustomerDocumentShareDraftRequest":{"additionalProperties":false,"properties":{"share":{"additionalProperties":false,"properties":{"description":{"maxLength":2000,"type":["string","null"]},"filename":{"maxLength":200,"minLength":1,"type":"string"},"source_file_id":{"minimum":1,"type":"integer"},"title":{"maxLength":160,"minLength":1,"type":"string"}},"required":["source_file_id","title","filename"],"type":"object"}},"required":["share"],"type":"object"},"crm_CrmCustomerDocumentSharePublishRequest":{"additionalProperties":false,"properties":{"publication":{"additionalProperties":false,"properties":{"expected_version":{"minimum":1,"type":"integer"},"grant_ids":{"items":{"minimum":1,"type":"integer"},"maxItems":100,"minItems":1,"type":"array","uniqueItems":true},"request_key":{"format":"uuid","type":"string"},"review_confirmed":{"const":true,"description":"Staff attests they reviewed exact source content/version, public wording and filename, and named grants.","type":"boolean"}},"required":["expected_version","grant_ids","request_key","review_confirmed"],"type":"object"}},"required":["publication"],"type":"object"},"crm_CrmCustomerDocumentShareWithdrawRequest":{"additionalProperties":false,"properties":{"withdrawal":{"additionalProperties":false,"properties":{"expected_version":{"minimum":1,"type":"integer"},"reason":{"maxLength":1000,"minLength":1,"type":"string"}},"required":["expected_version","reason"],"type":"object"}},"required":["withdrawal"],"type":"object"},"crm_CrmCustomerOffer":{"additionalProperties":false,"properties":{"contact_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency":{"enum":["USD"],"type":"string"},"delivery_state":{"enum":["not_sent","queued","provider_accepted","failed","unknown"],"type":"string"},"expires_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"invitation_redeemed_at":{"format":"date-time","type":["string","null"]},"mailbox_verification_required":{"description":"A separate code sent to the frozen recipient email is required before PDF view or response. Confirms mailbox control, not legal identity or authority.","type":"boolean"},"opportunity_id":{"minimum":1,"type":"integer"},"pdf_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"proposal_amount":{"pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]{2})$","type":"string"},"proposal_id":{"minimum":1,"type":"integer"},"proposal_revision":{"minimum":1,"type":"integer"},"proposal_title":{"type":"string"},"recipient_email":{"format":"email","type":"string"},"recipient_name":{"minLength":1,"type":"string"},"response":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"decision":{"enum":["accepted","declined"],"type":"string"},"mailbox_control_confirmed_at":{"description":"A separate code sent to the offer recipient mailbox was verified in this session. This does not establish legal identity or signatory authority.","format":"date-time","type":["string","null"]},"receipt_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["decision","created_at","receipt_sha256","mailbox_control_confirmed_at"],"type":["object","null"]},"revoke_reason":{"type":["string","null"]},"revoked_at":{"format":"date-time","type":["string","null"]},"revoked_by_id":{"type":["integer","null"]}},"required":["id","opportunity_id","proposal_id","proposal_revision","proposal_title","proposal_amount","currency","contact_id","recipient_name","recipient_email","delivery_state","mailbox_verification_required","pdf_sha256","created_at","expires_at","invitation_redeemed_at","revoked_at","revoked_by_id","revoke_reason","response"],"type":"object"},"crm_CrmCustomerOfferCreate":{"additionalProperties":false,"properties":{"offer":{"additionalProperties":false,"properties":{"contact_id":{"minimum":1,"type":"integer"},"mailbox_verification_required":{"description":"Opt in to a separate recipient mailbox challenge. Requires configured secure email provider and challenge key.","type":"boolean"}},"required":["contact_id"],"type":"object"}},"required":["offer"],"type":"object"},"crm_CrmCustomerOfferCreated":{"additionalProperties":false,"properties":{"invitation_path":{"description":"Sensitive one-time path with bearer token in URL fragment. Shown once; a later provider dispatch rotates and invalidates it.","type":"string"},"offer":{"$ref":"#/components/schemas/crm_CrmCustomerOffer"}},"required":["offer","invitation_path"],"type":"object"},"crm_CrmCustomerOfferRevoke":{"additionalProperties":false,"properties":{"revoke":{"additionalProperties":false,"properties":{"reason":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["reason"],"type":"object"}},"required":["revoke"],"type":"object"},"crm_CrmCustomerProjectUpdateContent":{"additionalProperties":false,"properties":{"body":{"maxLength":4000,"minLength":1,"type":"string"},"milestone_on":{"format":"date","type":["string","null"]},"source_schedule_task_id":{"description":"Optional current, public schedule milestone to review before publication; also requires Schedule viewing access.","minimum":1,"type":"integer"},"status_label":{"enum":["informational","on_track","at_risk","delayed","completed"],"type":"string"},"title":{"maxLength":160,"minLength":1,"type":"string"}},"required":["title","body","status_label"],"type":"object"},"crm_CrmCustomerProjectUpdateCorrectRequest":{"additionalProperties":false,"properties":{"correction":{"additionalProperties":false,"properties":{"body":{"maxLength":4000,"minLength":1,"type":"string"},"expected_version":{"minimum":1,"type":"integer"},"milestone_on":{"format":"date","type":["string","null"]},"reason":{"maxLength":1000,"minLength":1,"type":"string"},"status_label":{"enum":["informational","on_track","at_risk","delayed","completed"],"type":"string"},"title":{"maxLength":160,"minLength":1,"type":"string"}},"required":["expected_version","title","body","status_label","reason"],"type":"object"}},"required":["correction"],"type":"object"},"crm_CrmCustomerProjectUpdateDraftRequest":{"additionalProperties":false,"properties":{"update":{"$ref":"#/components/schemas/crm_CrmCustomerProjectUpdateContent"}},"required":["update"],"type":"object"},"crm_CrmCustomerProjectUpdatePublishRequest":{"additionalProperties":false,"properties":{"publication":{"additionalProperties":false,"properties":{"expected_version":{"minimum":1,"type":"integer"},"grant_ids":{"items":{"minimum":1,"type":"integer"},"maxItems":100,"minItems":1,"type":"array","uniqueItems":true},"request_key":{"format":"uuid","type":"string"}},"required":["expected_version","grant_ids","request_key"],"type":"object"}},"required":["publication"],"type":"object"},"crm_CrmCustomerProjectUpdateWithdrawRequest":{"additionalProperties":false,"properties":{"withdrawal":{"additionalProperties":false,"properties":{"expected_version":{"minimum":1,"type":"integer"},"reason":{"maxLength":1000,"minLength":1,"type":"string"}},"required":["expected_version","reason"],"type":"object"}},"required":["withdrawal"],"type":"object"},"crm_CrmCustomerResponse":{"additionalProperties":false,"properties":{"contact_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"decision":{"enum":["accepted","declined"],"type":"string"},"evidence_note":{"maxLength":2000,"minLength":1,"type":"string"},"evidence_reference":{"maxLength":500,"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"observed_at":{"format":"date-time","type":"string"},"opportunity_id":{"minimum":1,"type":"integer"},"proposal_amount":{"pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]{2})$","type":"string"},"proposal_currency":{"enum":["USD"],"type":"string"},"proposal_id":{"minimum":1,"type":"integer"},"proposal_revision":{"minimum":1,"type":"integer"},"proposal_title":{"type":"string"},"recipient_email":{"type":["string","null"]},"recipient_name":{"minLength":1,"type":"string"},"recipient_phone":{"type":["string","null"]},"recorded_by_id":{"minimum":1,"type":"integer"},"source":{"enum":["email","phone","meeting","document","other"],"type":"string"},"void_reason":{"maxLength":2000,"type":["string","null"]},"voided_at":{"format":"date-time","type":["string","null"]},"voided_by_id":{"type":["integer","null"]}},"required":["id","opportunity_id","proposal_id","proposal_revision","proposal_title","proposal_amount","proposal_currency","contact_id","decision","recipient_name","recipient_email","recipient_phone","source","evidence_reference","evidence_note","observed_at","recorded_by_id","created_at","voided_at","voided_by_id","void_reason"],"type":"object"},"crm_CrmCustomerResponseCreate":{"additionalProperties":false,"properties":{"customer_response":{"additionalProperties":false,"properties":{"contact_id":{"minimum":1,"type":"integer"},"decision":{"enum":["accepted","declined"],"type":"string"},"evidence_note":{"maxLength":2000,"minLength":1,"type":"string"},"evidence_reference":{"description":"Required when source is document.","maxLength":500,"type":["string","null"]},"observed_at":{"description":"Defaults to the server time when omitted; cannot be future or predate internal approval.","format":"date-time","type":"string"},"request_key":{"format":"uuid","type":"string"},"review_token":{"pattern":"^[a-f0-9]{64}$","type":"string"},"source":{"enum":["email","phone","meeting","document","other"],"type":"string"}},"required":["contact_id","decision","source","evidence_note","request_key","review_token"],"type":"object"}},"required":["customer_response"],"type":"object"},"crm_CrmCustomerResponsePreview":{"additionalProperties":false,"properties":{"proposal":{"$ref":"#/components/schemas/crm_CrmProposal"},"recipient":{"additionalProperties":false,"properties":{"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"organization":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["id","first_name","last_name","organization","email","phone"],"type":"object"},"review_token":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["proposal","recipient","review_token"],"type":"object"},"crm_CrmCustomerResponseVoid":{"additionalProperties":false,"properties":{"void":{"additionalProperties":false,"properties":{"reason":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["reason"],"type":"object"}},"required":["void"],"type":"object"},"crm_CrmCustomerServiceEvidence":{"additionalProperties":false,"properties":{"content_type":{"enum":["image/jpeg","image/png","application/pdf"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"filename":{"maxLength":200,"minLength":1,"type":"string"},"id":{"minimum":1,"type":"integer"},"sha256":{"pattern":"^[0-9a-f]{64}$","type":"string"},"size_bytes":{"maximum":8388608,"minimum":1,"type":"integer"}},"required":["id","filename","content_type","size_bytes","sha256","created_at"],"type":"object"},"crm_CrmEstimateLine":{"additionalProperties":false,"properties":{"description":{"maxLength":500,"minLength":1,"type":"string"},"line_amount":{"pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]{2})$","type":"string"},"quantity":{"pattern":"^(?:[1-9][0-9]{0,5}(?:\\.[0-9]{1,3})?|0\\.(?:[1-9][0-9]{0,2}|0[1-9][0-9]?|00[1-9]))$","type":"string"},"unit":{"maxLength":40,"minLength":1,"type":"string"},"unit_price":{"pattern":"^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,2})?$","type":"string"}},"required":["description","unit","quantity","unit_price","line_amount"],"type":"object"},"crm_CrmEstimateLineInput":{"additionalProperties":false,"properties":{"description":{"maxLength":500,"minLength":1,"type":"string"},"quantity":{"pattern":"^(?:[1-9][0-9]{0,5}(?:\\.[0-9]{1,3})?|0\\.(?:[1-9][0-9]{0,2}|0[1-9][0-9]?|00[1-9]))$","type":"string"},"unit":{"maxLength":40,"minLength":1,"type":"string"},"unit_price":{"pattern":"^(?:0|[1-9][0-9]{0,8})(?:\\.[0-9]{1,2})?$","type":"string"}},"required":["description","unit","quantity","unit_price"],"type":"object"},"crm_CrmInstalledAsset":{"properties":{"asset_tag":{"maxLength":80,"minLength":1,"type":"string"},"commissioned_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"event_total":{"minimum":0,"type":"integer"},"events":{"items":{"$ref":"#/components/schemas/crm_CrmInstalledAssetEvent"},"type":"array"},"evidence_note":{"maxLength":10000,"minLength":1,"type":"string"},"handoff_reference":{"maxLength":500,"minLength":1,"type":"string"},"id":{"minimum":1,"type":"integer"},"installed_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}]},"location_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"manufacturer":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}]},"name":{"maxLength":200,"minLength":1,"type":"string"},"project_id":{"minimum":1,"type":"integer"},"retired_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"retired_by_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"serial_number":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}]},"status":{"enum":["active","retired"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"warranty_coverage_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]}},"required":["id","company_id","project_id","asset_tag","name","manufacturer","model","serial_number","location_id","installed_on","commissioned_on","handoff_reference","evidence_note","warranty_coverage_id","status","version","retired_at","retired_by_id","created_by_id","created_at","updated_at","events","event_total"],"type":"object"},"crm_CrmInstalledAssetEvent":{"properties":{"actor_id":{"minimum":1,"type":"integer"},"after":{"type":"object"},"before":{"anyOf":[{"type":"object"},{"type":"null"}]},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"kind":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"minimum":1,"type":"integer"}},"required":["id","version","kind","note","before","after","actor_id","created_at"],"type":"object"},"crm_CrmInstalledAssetEvents":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/crm_CrmInstalledAssetEvent"},"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["rows","total"],"type":"object"},"crm_CrmLeadAssignableMembers":{"additionalProperties":false,"properties":{"rows":{"items":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"maxItems":100,"type":"array"},"skip":{"type":"integer"},"take":{"type":"integer"},"total":{"type":"integer"}},"required":["rows","total","skip","take"],"type":"object"},"crm_CrmLeadConversionPreview":{"additionalProperties":false,"properties":{"duplicate_candidates":{"items":{"type":"object"},"type":"array"},"inquiry":{"$ref":"#/components/schemas/crm_CrmLeadInquiry"},"review_sha256":{"pattern":"^[0-9a-f]{64}$","type":"string"}},"required":["inquiry","duplicate_candidates","review_sha256"],"type":"object"},"crm_CrmLeadConversionReceipt":{"additionalProperties":false,"properties":{"contact_id":{"type":"integer"},"idempotent":{"type":"boolean"},"inquiry":{"$ref":"#/components/schemas/crm_CrmLeadInquiry"},"opportunity_id":{"type":["integer","null"]}},"required":["inquiry","contact_id","opportunity_id","idempotent"],"type":"object"},"crm_CrmLeadConversionRequest":{"additionalProperties":false,"properties":{"conversion":{"additionalProperties":false,"properties":{"acknowledge_duplicates":{"type":"boolean"},"opportunity_title":{"maxLength":200,"type":"string"},"owner_id":{"minimum":1,"type":["integer","null"]},"review_sha256":{"pattern":"^[0-9a-f]{64}$","type":"string"}},"required":["review_sha256","acknowledge_duplicates"],"type":"object"}},"required":["conversion"],"type":"object"},"crm_CrmLeadDismissalRequest":{"additionalProperties":false,"properties":{"dismissal":{"additionalProperties":false,"properties":{"expected_version":{"minimum":1,"type":"integer"},"reason":{"maxLength":1000,"minLength":3,"type":"string"}},"required":["reason","expected_version"],"type":"object"}},"required":["dismissal"],"type":"object"},"crm_CrmLeadForm":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"company_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"description":{"type":["string","null"]},"id":{"type":"integer"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"type":"integer"}},"required":["id","company_id","title","description","active","version","created_at","updated_at"],"type":"object"},"crm_CrmLeadFormCreateRequest":{"additionalProperties":false,"properties":{"form":{"additionalProperties":false,"properties":{"description":{"maxLength":1000,"type":["string","null"]},"title":{"maxLength":200,"minLength":3,"type":"string"}},"required":["title"],"type":"object"}},"required":["form"],"type":"object"},"crm_CrmLeadFormList":{"additionalProperties":false,"properties":{"rows":{"items":{"$ref":"#/components/schemas/crm_CrmLeadForm"},"type":"array"},"skip":{"type":"integer"},"take":{"type":"integer"},"total":{"type":"integer"}},"required":["rows","total","skip","take"],"type":"object"},"crm_CrmLeadFormTokenReceipt":{"additionalProperties":false,"properties":{"form":{"$ref":"#/components/schemas/crm_CrmLeadForm"},"public_token":{"maxLength":43,"minLength":43,"type":"string"}},"required":["form","public_token"],"type":"object"},"crm_CrmLeadFormUpdateRequest":{"additionalProperties":false,"properties":{"form":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"description":{"maxLength":1000,"type":["string","null"]},"expected_version":{"minimum":1,"type":"integer"},"title":{"maxLength":200,"minLength":3,"type":"string"}},"required":["expected_version"],"type":"object"}},"required":["form"],"type":"object"},"crm_CrmLeadInquiry":{"additionalProperties":false,"properties":{"assigned_to_id":{"type":["integer","null"]},"company_id":{"type":"integer"},"converted_contact_id":{"type":["integer","null"]},"converted_opportunity_id":{"type":["integer","null"]},"description":{"type":"string"},"desired_start_date":{"type":["string","null"]},"email":{"type":"string"},"first_name":{"type":"string"},"first_responded_at":{"format":"date-time","type":["string","null"]},"form_id":{"type":"integer"},"id":{"type":"integer"},"last_name":{"type":"string"},"marketing_consent":{"type":"boolean"},"organization":{"type":["string","null"]},"phone":{"type":["string","null"]},"priority":{"enum":["low","normal","high"],"type":"string"},"project_location":{"type":["string","null"]},"project_summary":{"type":"string"},"project_type":{"type":["string","null"]},"request_key":{"type":"string"},"response_due_at":{"format":"date-time","type":["string","null"]},"review_reason":{"type":["string","null"]},"reviewed_at":{"type":["string","null"]},"reviewed_by_id":{"type":["integer","null"]},"status":{"enum":["new","converted","dismissed"],"type":"string"},"submitted_at":{"format":"date-time","type":"string"},"version":{"type":"integer"}},"required":["id","company_id","form_id","request_key","status","version","submitted_at","first_name","last_name","email","project_summary","description","assigned_to_id","priority","response_due_at","first_responded_at"],"type":"object"},"crm_CrmLeadInquiryList":{"additionalProperties":false,"properties":{"rows":{"items":{"$ref":"#/components/schemas/crm_CrmLeadInquiry"},"type":"array"},"skip":{"type":"integer"},"take":{"type":"integer"},"total":{"type":"integer"}},"required":["rows","total","skip","take"],"type":"object"},"crm_CrmLeadResponseVoidRequest":{"additionalProperties":false,"properties":{"void":{"additionalProperties":false,"properties":{"expected_version":{"minimum":1,"type":"integer"},"reason":{"maxLength":1000,"minLength":3,"type":"string"}},"required":["expected_version","reason"],"type":"object"}},"required":["void"],"type":"object"},"crm_CrmLeadStaffResponseRequest":{"additionalProperties":false,"properties":{"response":{"additionalProperties":false,"properties":{"channel":{"enum":["phone","email","in_person","other"],"type":"string"},"expected_version":{"minimum":1,"type":"integer"},"occurred_at":{"format":"date-time","type":"string"},"summary":{"maxLength":1000,"minLength":3,"type":"string"}},"required":["expected_version","channel","summary"],"type":"object"}},"required":["response"],"type":"object"},"crm_CrmLeadTriageEvent":{"additionalProperties":false,"properties":{"actor_user_id":{"type":"integer"},"after_assigned_to_id":{"type":["integer","null"]},"after_priority":{"enum":["low","normal","high",null],"type":["string","null"]},"after_response_due_at":{"format":"date-time","type":["string","null"]},"before_assigned_to_id":{"type":["integer","null"]},"before_priority":{"enum":["low","normal","high",null],"type":["string","null"]},"before_response_due_at":{"format":"date-time","type":["string","null"]},"channel":{"enum":["phone","email","in_person","other",null],"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"inquiry_id":{"type":"integer"},"kind":{"enum":["triage","response","response_void"],"type":"string"},"occurred_at":{"format":"date-time","type":["string","null"]},"summary":{"type":["string","null"]},"void_reason":{"type":["string","null"]},"voided_by_event_id":{"type":["integer","null"]},"voids_event_id":{"type":["integer","null"]}},"required":["id","inquiry_id","kind","actor_user_id","created_at","before_assigned_to_id","before_priority","before_response_due_at","after_assigned_to_id","after_priority","after_response_due_at","channel","summary","occurred_at","voids_event_id","void_reason","voided_by_event_id"],"type":"object"},"crm_CrmLeadTriageEventList":{"additionalProperties":false,"properties":{"rows":{"items":{"$ref":"#/components/schemas/crm_CrmLeadTriageEvent"},"type":"array"},"skip":{"type":"integer"},"take":{"type":"integer"},"total":{"type":"integer"}},"required":["rows","total","skip","take"],"type":"object"},"crm_CrmLeadTriageReceipt":{"additionalProperties":false,"properties":{"event":{"$ref":"#/components/schemas/crm_CrmLeadTriageEvent"},"inquiry":{"$ref":"#/components/schemas/crm_CrmLeadInquiry"}},"required":["inquiry","event"],"type":"object"},"crm_CrmLeadTriageRequest":{"additionalProperties":false,"properties":{"triage":{"additionalProperties":false,"properties":{"assigned_to_id":{"minimum":1,"type":["integer","null"]},"expected_version":{"minimum":1,"type":"integer"},"priority":{"enum":["low","normal","high"],"type":"string"},"response_due_at":{"format":"date-time","type":["string","null"]}},"required":["expected_version"],"type":"object"}},"required":["triage"],"type":"object"},"crm_CrmOfferAuthorityEvidence":{"additionalProperties":false,"properties":{"artifact_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"assurance":{"enum":["staff_recorded_unverified"],"type":"string"},"claimed_role":{"enum":["authorized_signer","decision_maker","advisor","unknown"],"type":"string"},"company_id":{"minimum":1,"type":"integer"},"contact_id":{"minimum":1,"type":"integer"},"contact_role":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"evidence_note":{"maxLength":2000,"minLength":1,"type":"string"},"evidence_reference":{"maxLength":500,"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"observed_at":{"format":"date-time","type":"string"},"offer_id":{"minimum":1,"type":"integer"},"opportunity_id":{"minimum":1,"type":"integer"},"organization_name":{"type":["string","null"]},"project_id":{"minimum":1,"type":"integer"},"proposal_id":{"minimum":1,"type":"integer"},"recipient_email":{"format":"email","type":"string"},"recipient_name":{"type":"string"},"recorded_by_id":{"minimum":1,"type":"integer"},"source":{"enum":["contact_statement","organization_record","document","other"],"type":"string"},"void_reason":{"maxLength":2000,"type":["string","null"]},"voided_at":{"format":"date-time","type":["string","null"]},"voided_by_id":{"type":["integer","null"]}},"required":["id","company_id","project_id","opportunity_id","proposal_id","offer_id","contact_id","recipient_name","recipient_email","organization_name","contact_role","artifact_sha256","claimed_role","source","evidence_reference","evidence_note","observed_at","recorded_by_id","created_at","voided_at","voided_by_id","void_reason","assurance"],"type":"object"},"crm_CrmOfferAuthorityEvidenceCreate":{"additionalProperties":false,"properties":{"authority_evidence":{"additionalProperties":false,"properties":{"artifact_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"claimed_role":{"enum":["authorized_signer","decision_maker","advisor","unknown"],"type":"string"},"contact_id":{"minimum":1,"type":"integer"},"evidence_note":{"maxLength":2000,"minLength":1,"type":"string"},"evidence_reference":{"maxLength":500,"type":["string","null"]},"observed_at":{"format":"date-time","type":"string"},"recipient_email":{"format":"email","type":"string"},"request_key":{"format":"uuid","type":"string"},"source":{"enum":["contact_statement","organization_record","document","other"],"type":"string"}},"required":["contact_id","recipient_email","artifact_sha256","claimed_role","source","evidence_note","observed_at","request_key"],"type":"object"}},"required":["authority_evidence"],"type":"object"},"crm_CrmOfferAuthorityEvidenceVoid":{"additionalProperties":false,"properties":{"void":{"additionalProperties":false,"properties":{"reason":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["reason"],"type":"object"}},"required":["void"],"type":"object"},"crm_CrmOfferDeliveryAttempt":{"additionalProperties":false,"properties":{"artifact_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"completed_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"delivery_evidence":{"description":"Authenticated generic-webhook delivery evidence. Conflicting means both delivered and bounced events exist for one message and requires operator review; none establish recipient identity.","enum":["delivered","bounced","conflicting",null],"type":["string","null"]},"event_total":{"minimum":0,"type":"integer"},"events":{"description":"Most recent 100 authenticated events; event_total counts all retained events.","items":{"$ref":"#/components/schemas/crm_CrmOfferDeliveryEvent"},"maxItems":100,"type":"array"},"id":{"minimum":1,"type":"integer"},"offer_id":{"minimum":1,"type":"integer"},"provider_kind":{"enum":["unknown","webhook","resend"],"type":"string"},"provider_message_id":{"type":["string","null"]},"recipient_email":{"format":"email","type":"string"},"status":{"enum":["queued","provider_accepted","failed","unknown"],"type":"string"}},"required":["id","offer_id","recipient_email","artifact_sha256","status","provider_kind","provider_message_id","delivery_evidence","event_total","events","created_at","completed_at"],"type":"object"},"crm_CrmOfferDeliveryCreate":{"additionalProperties":false,"properties":{"delivery":{"additionalProperties":false,"properties":{"request_key":{"format":"uuid","type":"string"}},"required":["request_key"],"type":"object"}},"required":["delivery"],"type":"object"},"crm_CrmOfferDeliveryEvent":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"},"kind":{"enum":["delivered","bounced"],"type":"string"},"occurred_at":{"format":"date-time","type":"string"},"provider_event_id":{"maxLength":255,"type":"string"},"provider_kind":{"enum":["webhook","resend"],"type":"string"},"provider_message_id":{"type":"string"},"received_at":{"format":"date-time","type":"string"}},"required":["id","kind","provider_event_id","provider_kind","provider_message_id","occurred_at","received_at"],"type":"object"},"crm_CrmOfferDeliveryResult":{"additionalProperties":false,"properties":{"delivery":{"$ref":"#/components/schemas/crm_CrmOfferDeliveryAttempt"},"replayed":{"type":"boolean"}},"required":["delivery","replayed"],"type":"object"},"crm_CrmOfferIdentityDecisionCreate":{"additionalProperties":false,"properties":{"decision":{"additionalProperties":false,"properties":{"kind":{"enum":["approved","rejected","revoked"],"type":"string"},"reason":{"maxLength":2000,"minLength":1,"type":"string"},"request_key":{"format":"uuid","type":"string"}},"required":["kind","reason","request_key"],"type":"object"}},"required":["decision"],"type":"object"},"crm_CrmOfferIdentityReview":{"additionalProperties":false,"properties":{"artifact_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"assurance":{"enum":["staff_reviewed_current","historical_only"],"type":"string"},"company_id":{"type":"integer"},"contact_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"decision_state":{"enum":["pending","approved","rejected","revoked"],"type":"string"},"events":{"items":{"additionalProperties":false,"properties":{"actor_user_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"kind":{"enum":["approved","rejected","revoked"],"type":"string"},"reason":{"type":"string"}},"required":["id","kind","reason","actor_user_id","created_at"],"type":"object"},"type":"array"},"evidence_note":{"type":"string"},"evidence_reference":{"type":"string"},"expires_at":{"format":"date-time","type":"string"},"grant_id":{"type":"integer"},"id":{"type":"integer"},"method":{"enum":["in_person_review","organization_record","document_reference","other"],"type":"string"},"observed_at":{"format":"date-time","type":"string"},"offer_id":{"type":"integer"},"opportunity_id":{"type":"integer"},"principal_id":{"type":"integer"},"project_id":{"type":"integer"},"proposal_id":{"type":"integer"},"recipient_email":{"format":"email","type":"string"},"submitted_by_id":{"type":"integer"}},"required":["id","company_id","project_id","opportunity_id","proposal_id","offer_id","contact_id","grant_id","principal_id","recipient_email","artifact_sha256","method","evidence_reference","evidence_note","observed_at","expires_at","submitted_by_id","created_at","decision_state","assurance","events"],"type":"object"},"crm_CrmOfferIdentityReviewCreate":{"additionalProperties":false,"properties":{"identity_review":{"additionalProperties":false,"properties":{"artifact_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"contact_id":{"minimum":1,"type":"integer"},"evidence_note":{"maxLength":2000,"minLength":1,"type":"string"},"evidence_reference":{"maxLength":500,"minLength":1,"type":"string"},"expires_at":{"format":"date-time","type":"string"},"grant_id":{"minimum":1,"type":"integer"},"method":{"enum":["in_person_review","organization_record","document_reference","other"],"type":"string"},"observed_at":{"format":"date-time","type":"string"},"recipient_email":{"format":"email","type":"string"},"request_key":{"format":"uuid","type":"string"}},"required":["grant_id","contact_id","recipient_email","artifact_sha256","method","evidence_reference","evidence_note","observed_at","expires_at","request_key"],"type":"object"}},"required":["identity_review"],"type":"object"},"crm_CrmPreferenceEffective":{"additionalProperties":false,"properties":{"channel":{"enum":["email","sms"],"type":"string"},"contact_point":{"type":["string","null"]},"event_id":{"type":["integer","null"]},"identity_id":{"type":["integer","null"]},"purpose":{"enum":["marketing","project_updates","service"],"type":"string"},"recorded_permission":{"description":"Matching recorded evidence; not final lawful send authorization","type":"boolean"},"status":{"enum":["permitted","blocked","unknown"],"type":"string"}},"required":["channel","purpose","status","recorded_permission","event_id","identity_id","contact_point"],"type":"object"},"crm_CrmPreferenceEvent":{"additionalProperties":false,"properties":{"actor_id":{"minimum":1,"type":"integer"},"channel":{"enum":["email","sms"],"type":"string"},"contact_point":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"evidence":{"type":"string"},"id":{"minimum":1,"type":"integer"},"identity_id":{"minimum":1,"type":"integer"},"observed_at":{"format":"date-time","type":"string"},"purpose":{"enum":["marketing","project_updates","service"],"type":"string"},"source":{"enum":["customer_request","web_form","import","staff_recorded"],"type":"string"},"status":{"enum":["permitted","blocked","unknown"],"type":"string"}},"required":["id","identity_id","channel","purpose","status","source","evidence","contact_point","observed_at","actor_id","created_at"],"type":"object"},"crm_CrmPreferenceEventCreate":{"additionalProperties":false,"properties":{"preference_event":{"additionalProperties":false,"properties":{"channel":{"enum":["email","sms"],"type":"string"},"contact_point":{"maxLength":320,"minLength":1,"type":["string","null"]},"evidence":{"maxLength":1000,"minLength":1,"type":"string"},"observed_at":{"format":"date-time","type":"string"},"purpose":{"enum":["marketing","project_updates","service"],"type":"string"},"source":{"enum":["customer_request","web_form","import","staff_recorded"],"type":"string"},"status":{"enum":["permitted","blocked","unknown"],"type":"string"}},"required":["channel","purpose","status","source","evidence"],"type":"object"}},"required":["preference_event"],"type":"object"},"crm_CrmPreferenceSummary":{"additionalProperties":false,"properties":{"current_contact_points":{"additionalProperties":false,"properties":{"email":{"type":["string","null"]},"sms":{"type":["string","null"]}},"required":["email","sms"],"type":"object"},"effective":{"items":{"$ref":"#/components/schemas/crm_CrmPreferenceEffective"},"maxItems":6,"minItems":6,"type":"array"},"primary_person_id":{"minimum":1,"type":"integer"}},"required":["primary_person_id","current_contact_points","effective"],"type":"object"},"crm_CrmProposal":{"additionalProperties":false,"properties":{"amount":{"pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]{2})$","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"currency":{"enum":["USD"],"type":"string"},"estimate_lines":{"items":{"$ref":"#/components/schemas/crm_CrmEstimateLine"},"maxItems":100,"type":"array"},"exclusions":{"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"opportunity_id":{"minimum":1,"type":"integer"},"review_reason":{"type":["string","null"]},"reviewed_at":{"format":"date-time","type":["string","null"]},"reviewed_by_id":{"type":["integer","null"]},"revision":{"minimum":1,"type":"integer"},"scope":{"type":["string","null"]},"status":{"enum":["draft","submitted","approved","rejected","withdrawn"],"type":"string"},"submitted_at":{"format":"date-time","type":["string","null"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"valid_until":{"format":"date","type":["string","null"]}},"required":["id","opportunity_id","revision","status","title","scope","exclusions","valid_until","estimate_lines","amount","currency","created_by_id","created_at","updated_at","submitted_at","reviewed_by_id","reviewed_at","review_reason"],"type":"object"},"crm_CrmProposalReview":{"additionalProperties":false,"properties":{"review":{"additionalProperties":false,"properties":{"decision":{"enum":["approved","rejected"],"type":"string"},"reason":{"maxLength":10000,"type":["string","null"]},"review_token":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["decision","review_token"],"type":"object"}},"required":["review"],"type":"object"},"crm_CrmProposalReviewPreview":{"additionalProperties":false,"properties":{"proposal":{"$ref":"#/components/schemas/crm_CrmProposal"},"review_token":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["proposal","review_token"],"type":"object"},"crm_CrmProposalUpdate":{"additionalProperties":false,"properties":{"proposal":{"additionalProperties":false,"minProperties":1,"properties":{"amount":{"pattern":"^(?:0|[1-9][0-9]{0,15})(?:\\.[0-9]{1,2})?$","type":"string"},"currency":{"enum":["USD"],"type":"string"},"estimate_lines":{"items":{"$ref":"#/components/schemas/crm_CrmEstimateLineInput"},"maxItems":100,"type":"array"},"exclusions":{"maxLength":10000,"type":["string","null"]},"scope":{"maxLength":10000,"type":["string","null"]},"title":{"maxLength":200,"minLength":1,"type":"string"},"valid_until":{"format":"date","type":["string","null"]}},"type":"object"}},"required":["proposal"],"type":"object"},"crm_CrmProposalWithdrawal":{"additionalProperties":false,"properties":{"withdrawal":{"additionalProperties":false,"properties":{"reason":{"maxLength":10000,"minLength":1,"type":"string"}},"required":["reason"],"type":"object"}},"required":["withdrawal"],"type":"object"},"crm_CrmServiceCase":{"properties":{"assigned_to_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"closed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"company_id":{"minimum":1,"type":"integer"},"contact_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"items":{"$ref":"#/components/schemas/crm_CrmServiceCaseEvent"},"type":"array"},"first_response_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"id":{"minimum":1,"type":"integer"},"location_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"priority":{"enum":["low","normal","high","urgent"],"type":"string"},"project_id":{"minimum":1,"type":"integer"},"report_evidence":{"anyOf":[{"type":"string"},{"type":"null"}]},"report_source":{"anyOf":[{"enum":["phone","email","in_person","document","portal","other"],"type":"string"},{"type":"null"}]},"reported_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"reported_at_original":{"anyOf":[{"type":"string"},{"type":"null"}]},"reported_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}]},"resolved_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"response_due_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"status":{"enum":["open","triaged","in_progress","waiting_customer","resolved","closed"],"type":"string"},"title":{"maxLength":200,"minLength":1,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"warranty_coverage_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"warranty_decision":{"enum":["pending","covered","not_covered"],"type":"string"},"warranty_rationale":{"anyOf":[{"type":"string"},{"type":"null"}]},"warranty_review_reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","company_id","project_id","title","description","contact_id","location_id","assigned_to_id","status","priority","response_due_at","first_response_at","resolved_at","closed_at","warranty_coverage_id","warranty_decision","warranty_rationale","version","created_by_id","created_at","updated_at","events","reported_at","reported_on","reported_at_original","report_source","report_evidence","warranty_review_reference"],"type":"object"},"crm_CrmServiceCaseEvent":{"properties":{"actor_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"from_status":{"anyOf":[{"enum":["open","triaged","in_progress","waiting_customer","resolved","closed"],"type":"string"},{"type":"null"}]},"id":{"minimum":1,"type":"integer"},"kind":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"report_evidence":{"anyOf":[{"type":"string"},{"type":"null"}]},"report_source":{"anyOf":[{"enum":["phone","email","in_person","document","portal","other"],"type":"string"},{"type":"null"}]},"reported_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"reported_at_original":{"anyOf":[{"type":"string"},{"type":"null"}]},"reported_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}]},"to_status":{"anyOf":[{"enum":["open","triaged","in_progress","waiting_customer","resolved","closed"],"type":"string"},{"type":"null"}]},"version":{"minimum":1,"type":"integer"},"warranty_coverage_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"warranty_decision":{"anyOf":[{"enum":["pending","covered","not_covered"],"type":"string"},{"type":"null"}]},"warranty_review_reference":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","version","kind","note","from_status","to_status","warranty_decision","warranty_coverage_id","actor_id","created_at","reported_at","reported_on","reported_at_original","report_source","report_evidence","warranty_review_reference"],"type":"object"},"crm_CrmServiceResponseQueue":{"properties":{"as_of":{"format":"date-time","type":"string"},"filter":{"anyOf":[{"enum":["mine","unassigned","response_overdue","response_due_soon"],"type":"string"},{"type":"null"}]},"rows":{"items":{"$ref":"#/components/schemas/crm_CrmServiceResponseRow"},"type":"array"},"summary":{"properties":{"all":{"minimum":0,"type":"integer"},"mine":{"minimum":0,"type":"integer"},"response_due_soon":{"minimum":0,"type":"integer"},"response_overdue":{"minimum":0,"type":"integer"},"unassigned":{"minimum":0,"type":"integer"}},"required":["all","mine","unassigned","response_overdue","response_due_soon"],"type":"object"},"total":{"minimum":0,"type":"integer"}},"required":["as_of","filter","total","summary","rows"],"type":"object"},"crm_CrmServiceResponseRow":{"properties":{"assigned_to_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"assigned_to_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"contact_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"id":{"minimum":1,"type":"integer"},"priority":{"type":"string"},"reported_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"response_due_at":{"format":"date-time","type":"string"},"response_state":{"enum":["overdue","due_soon","upcoming"],"type":"string"},"status":{"type":"string"},"title":{"type":"string"}},"required":["id","title","status","priority","assigned_to_id","assigned_to_name","response_due_at","reported_at","contact_id","response_state"],"type":"object"},"crm_CrmServiceWorkLink":{"properties":{"case_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["punch_item","observation","task_item"],"type":"string"},"target_id":{"minimum":1,"type":"integer"},"target_label":{"type":"string"},"target_url":{"type":"string"}},"required":["id","case_id","kind","target_id","target_label","target_url","created_at","created_by_id"],"type":"object"},"crm_CrmTimelineItem":{"additionalProperties":false,"properties":{"detail":{"type":["string","null"]},"href":{"type":["string","null"]},"identity_id":{"minimum":1,"type":"integer"},"kind":{"enum":["contact","opportunity","activity","proposal","affiliation","project_role","identity_event"],"type":"string"},"occurred_at":{"format":"date-time","type":"string"},"project_id":{"type":["integer","null"]},"project_name":{"type":["string","null"]},"source_id":{"minimum":1,"type":"integer"},"title":{"type":"string"}},"required":["kind","source_id","identity_id","occurred_at","project_id","project_name","title","detail","href"],"type":"object"},"crm_CrmWarrantyCoverage":{"properties":{"company_id":{"minimum":1,"type":"integer"},"component_name":{"maxLength":200,"minLength":1,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"ends_on":{"format":"date","type":"string"},"evidence_note":{"maxLength":10000,"minLength":1,"type":"string"},"id":{"minimum":1,"type":"integer"},"issuer_name":{"maxLength":200,"minLength":1,"type":"string"},"location_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"project_id":{"minimum":1,"type":"integer"},"source_reference":{"maxLength":500,"minLength":1,"type":"string"},"starts_on":{"format":"date","type":"string"}},"required":["id","company_id","project_id","component_name","location_id","starts_on","ends_on","issuer_name","source_reference","evidence_note","created_by_id","created_at"],"type":"object"},"crm_DocumentEvidence":{"oneOf":[{"additionalProperties":false,"properties":{"document_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"file_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"href":{"type":"string"},"name":{"type":"string"},"state":{"const":"available"},"version_number":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["state","document_version_id","file_id","name","version_number","href"],"type":"object"},{"additionalProperties":false,"properties":{"state":{"const":"unavailable"}},"required":["state"],"type":"object"}]},"crm_Evidence":{"additionalProperties":false,"properties":{"asset_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"note":{"type":["string","null"]},"purpose":{"type":["string","null"]},"source":{"$ref":"#/components/schemas/crm_DocumentEvidence"},"superseded_by_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}]},"supersedes_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}]}},"required":["id","asset_version","created_at","created_by_id","supersedes_id","superseded_by_id","purpose","note","source"],"type":"object"},"documents_ApiErrors":{"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"required":["errors"],"type":"object"},"documents_DocumentCheckinInput":{"not":{"anyOf":[{"required":["upload_uuid","upload_id"]},{"required":["upload_uuid","data"]}]},"properties":{"data":{"description":"Legacy simulated source. A data URI is retained in version metadata. Other nonempty strings create a placeholder. Use an authorized staged upload for a stored file.","type":"string"},"notes":{"description":"Version note when adding a new version.","nullable":true,"type":"string"},"upload_id":{"description":"Authorized same-project stored upload. Unbound staging requires uploads:read when checking in.","maximum":2147483647,"minimum":1,"type":"integer"},"upload_uuid":{"description":"Opaque completed direct-upload reference for this actor and project. Requires configured direct uploads and uploads:read.","maxLength":200,"minLength":1,"pattern":"\\S","type":"string"}},"type":"object"},"documents_DocumentCheckoutInput":{"properties":{"checked_out_until":{"description":"Date string accepted by the server. Omit or pass null for the seven-day default.","example":"2026-12-02T15:30:00Z","nullable":true,"type":"string"}},"type":"object"},"documents_DocumentFile":{"properties":{"checked_out_by":{"anyOf":[{"$ref":"#/components/schemas/documents_DocumentUser"},{"enum":[null]}]},"checked_out_until":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"type":"object"},"description":{"nullable":true,"type":"string"},"file_type":{"type":"string"},"file_versions":{"items":{"$ref":"#/components/schemas/documents_DocumentVersion"},"type":"array"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"is_deleted":{"type":"boolean"},"is_tracked":{"type":"boolean"},"legacy_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"private":{"type":"boolean"},"size":{"minimum":0,"type":"integer"},"tracked_folder":{"enum":[null]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","parent_id","size","description","updated_at","created_at","checked_out_until","name_with_path","private","is_tracked","tracked_folder","checked_out_by","file_type","file_versions","legacy_id","is_deleted","custom_fields"],"type":"object"},"documents_DocumentFolder":{"allOf":[{"$ref":"#/components/schemas/documents_DocumentFolderBase"},{"properties":{"files":{"items":{"$ref":"#/components/schemas/documents_DocumentFile"},"type":"array"},"folders":{"items":{"$ref":"#/components/schemas/documents_DocumentFolderSummary"},"type":"array"}},"required":["folders","files"],"type":"object"}]},"documents_DocumentFolderBase":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/documents_DocumentUser"},{"enum":[null]}]},"custom_fields":{"type":"object"},"has_children":{"type":"boolean"},"has_children_files":{"type":"boolean"},"has_children_folders":{"type":"boolean"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"is_deleted":{"type":"boolean"},"is_recycle_bin":{"type":"boolean"},"is_tracked":{"type":"boolean"},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"private":{"type":"boolean"},"private_parent":{"type":"boolean"},"read_only":{"type":"boolean"},"tracked_folder":{"enum":[null]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","custom_fields","name","name_with_path","parent_id","updated_at","is_deleted","is_recycle_bin","is_tracked","tracked_folder","has_children","has_children_files","has_children_folders","private","private_parent","read_only","created_at","created_by"],"type":"object"},"documents_DocumentFolderSummary":{"allOf":[{"$ref":"#/components/schemas/documents_DocumentFolderBase"},{"properties":{"files":{"items":{},"maxItems":0,"type":"array"},"folders":{"items":{},"maxItems":0,"type":"array"}},"required":["folders","files"],"type":"object"}]},"documents_DocumentPermission":{"properties":{"allowed_actions":{"items":{"enum":["view","upload","edit"],"type":"string"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"grantee":{"anyOf":[{"$ref":"#/components/schemas/documents_DocumentUser"},{"enum":[null]}]},"grantee_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"grantee_type":{"enum":["role","user"],"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"item_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"item_type":{"enum":["file","folder"],"type":"string"},"level":{"enum":["view","upload","edit"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","item_type","item_id","grantee_type","grantee_id","grantee","level","allowed_actions","created_at","updated_at"],"type":"object"},"documents_DocumentPermissionInput":{"properties":{"permission":{"properties":{"grantee_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"grantee_type":{"enum":["role","user"],"type":"string"},"level":{"default":"view","enum":["view","upload","edit"],"type":"string"}},"required":["grantee_type","grantee_id"],"type":"object"}},"required":["permission"],"type":"object"},"documents_DocumentUser":{"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login","name"],"type":"object"},"documents_DocumentVersion":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/documents_DocumentUser"},{"enum":[null]}]},"file_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"notes":{"nullable":true,"type":"string"},"number":{"minimum":1,"type":"integer"},"prostore_file":{"properties":{"filename":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"required":["id","name","url","filename"],"type":"object"},"size":{"minimum":0,"type":"integer"},"url":{"type":"string"}},"required":["id","notes","url","size","created_at","number","created_by","prostore_file","file_id"],"type":"object"},"documents_DocumentVersionHistoryEntry":{"allOf":[{"$ref":"#/components/schemas/documents_DocumentVersion"},{"properties":{"current":{"type":"boolean"}},"required":["current"],"type":"object"}]},"documents_ValidationErrors":{"properties":{"errors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"},"equipment_Assignment":{"properties":{"created_at":{"type":"string"},"created_by":{"$ref":"#/components/schemas/equipment_UserStub"},"end_date":{"nullable":true,"type":"string"},"equipment_id":{"type":"integer"},"id":{"type":"integer"},"notes":{"nullable":true,"type":"string"},"project":{"$ref":"#/components/schemas/equipment_ProjectStub"},"project_id":{"type":"integer"},"start_date":{"type":"string"},"status":{"enum":["active","completed"],"type":"string"},"updated_at":{"type":"string"}},"required":["id","equipment_id","project_id","start_date","status"],"type":"object"},"equipment_Equipment":{"properties":{"category":{"nullable":true,"type":"string"},"company_id":{"type":"integer"},"company_visible":{"type":"boolean"},"created_at":{"type":"string"},"created_by":{"$ref":"#/components/schemas/equipment_UserStub"},"current_project":{"$ref":"#/components/schemas/equipment_ProjectStub"},"current_project_id":{"nullable":true,"type":"integer"},"deleted_at":{"nullable":true,"type":"string"},"hourly_rate":{"nullable":true,"type":"number"},"id":{"type":"integer"},"identification_number":{"nullable":true,"type":"string"},"location":{"$ref":"#/components/schemas/equipment_LocationFull"},"location_id":{"nullable":true,"type":"integer"},"make":{"nullable":true,"type":"string"},"model":{"nullable":true,"type":"string"},"name":{"type":"string"},"ownership":{"enum":["owned","rented","sub"],"type":"string"},"serial_number":{"nullable":true,"type":"string"},"standby_rate":{"nullable":true,"type":"number"},"status":{"enum":["available","in_use","under_maintenance"],"type":"string"},"translated_ownership":{"type":"string"},"translated_status":{"type":"string"},"type":{"nullable":true,"type":"string"},"updated_at":{"type":"string"},"vendor":{"$ref":"#/components/schemas/equipment_VendorStub"},"vendor_id":{"nullable":true,"type":"integer"},"year":{"nullable":true,"type":"integer"}},"required":["id","name","company_id","status","translated_status","ownership","translated_ownership","created_at","updated_at"],"type":"object"},"equipment_EquipmentShow":{"allOf":[{"$ref":"#/components/schemas/equipment_Equipment"},{"properties":{"assignments":{"items":{"$ref":"#/components/schemas/equipment_Assignment"},"type":"array"},"inspections":{"items":{"$ref":"#/components/schemas/equipment_Inspection"},"type":"array"},"maintenance_logs":{"items":{"$ref":"#/components/schemas/equipment_MaintenanceLog"},"type":"array"}},"required":["assignments","maintenance_logs","inspections"],"type":"object"}]},"equipment_EquipmentStatusInput":{"enum":["available","in_use","under_maintenance"],"type":"string"},"equipment_FilterOption":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"equipment_Inspection":{"properties":{"created_at":{"type":"string"},"created_by":{"$ref":"#/components/schemas/equipment_UserStub"},"date":{"type":"string"},"deleted_at":{"nullable":true,"type":"string"},"id":{"type":"integer"},"inspector":{"nullable":true,"type":"string"},"managed_equipment_id":{"type":"integer"},"notes":{"nullable":true,"type":"string"},"result":{"enum":["pass","fail","conditional"],"type":"string"},"translated_result":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","managed_equipment_id","date","result"],"type":"object"},"equipment_LocationFull":{"nullable":true,"properties":{"created_at":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"nullable":true,"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"type":"string"}},"type":"object"},"equipment_MaintenanceLog":{"properties":{"cost":{"nullable":true,"type":"number"},"created_at":{"type":"string"},"created_by":{"$ref":"#/components/schemas/equipment_UserStub"},"date":{"type":"string"},"deleted_at":{"nullable":true,"type":"string"},"hours_at_service":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"managed_equipment_id":{"type":"integer"},"next_service_date":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"performed_by":{"nullable":true,"type":"string"},"translated_type":{"type":"string"},"type":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","managed_equipment_id","date","type"],"type":"object"},"equipment_ProjectStub":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"equipment_UserStub":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login","name"],"type":"object"},"equipment_VendorStub":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"expense_reports_ExpenseReport":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"decisions":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"evidence_disposition":{"enum":["none","receipt_reviewed","exception_accepted"],"type":"string"},"reason":{"type":"string"},"revision":{"minimum":1,"type":"integer"},"version":{"minimum":1,"type":"integer"}},"required":["revision","version","action","reason","actor_id","evidence_disposition","created_at"],"type":"object"},"type":"array"},"id":{"minimum":1,"type":"integer"},"number":{"type":"string"},"project_id":{"minimum":1,"type":"integer"},"revision":{"minimum":1,"type":"integer"},"revisions":{"items":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"currency":{"type":"string"},"evidence":{"items":{"additionalProperties":false,"properties":{"document_version_id":{"minimum":1,"type":"integer"},"file_id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"version_number":{"minimum":1,"type":"integer"}},"required":["file_id","document_version_id","version_number","name","url"],"type":"object"},"type":"array"},"exception":{"additionalProperties":false,"nullable":true,"properties":{"kind":{"enum":["lost_receipt","merchant_not_issued"],"type":"string"},"reason":{"maxLength":2000,"minLength":10,"type":"string"}},"required":["kind","reason"],"type":"object"},"lines":{"items":{"additionalProperties":false,"properties":{"amount":{"description":"Positive decimal, maximum 9999999999.99, at most two fractional digits; zero rejected.","pattern":"^(0|[1-9]\\d{0,9})(\\.\\d{1,2})?$","type":"string"},"cost_code_id":{"minimum":1,"type":"integer"},"description":{"maxLength":500,"minLength":1,"type":"string"}},"required":["description","cost_code_id","amount"],"type":"object"},"type":"array"},"merchant":{"type":"string"},"occurred_on":{"format":"date","type":"string"},"purpose":{"type":"string"},"revision":{"minimum":1,"type":"integer"},"total":{"type":"string"},"unavailable_evidence_count":{"minimum":0,"type":"integer"}},"required":["revision","merchant","purpose","occurred_on","currency","created_at","total","exception","lines","unavailable_evidence_count","evidence"],"type":"object"},"type":"array"},"status":{"enum":["draft","submitted","returned","rejected","approved"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["id","number","project_id","status","revision","version","created_by_id","created_at","updated_at","revisions","decisions"],"type":"object"},"expense_reports_ReimbursementInput":{"additionalProperties":false,"properties":{"expected_version":{"minimum":1,"type":"integer"},"lines":{"items":{"additionalProperties":false,"properties":{"account_id":{"minimum":1,"type":"integer"},"claim_line_id":{"minimum":1,"type":"integer"}},"required":["claim_line_id","account_id"],"type":"object"},"maxItems":100,"minItems":1,"type":"array"},"mapping_version":{"minimum":1,"type":"integer"},"reason":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["expected_version","mapping_version","lines","reason"],"type":"object"},"expense_reports_ReimbursementPayeeInput":{"additionalProperties":false,"properties":{"claimant_id":{"minimum":1,"type":"integer"},"expected_version":{"minimum":0,"type":"integer"},"reason":{"maxLength":2000,"minLength":10,"type":"string"},"vendor_id":{"minimum":1,"type":"integer"}},"required":["claimant_id","vendor_id","expected_version","reason"],"type":"object"},"expense_reports_ReimbursementResult":{"properties":{"bill_id":{"minimum":1,"type":"integer"},"currency":{"pattern":"^[A-Z]{3}$","type":"string"},"id":{"minimum":1,"type":"integer"},"replayed":{"type":"boolean"},"report_id":{"minimum":1,"type":"integer"},"total":{"pattern":"^\\d+\\.\\d{2}$","type":"string"}},"required":["id","bill_id","report_id","currency","total","replayed"],"type":"object"},"identity_ApiCall":{"properties":{"action_class":{"enum":["read","propose","approve","admin",null],"nullable":true,"type":"string"},"actor_type":{"enum":["service_account","agent","partner_app"],"type":"string"},"actor_user_id":{"type":"integer"},"client_id":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"credential_ref":{"nullable":true,"type":"string"},"denial_reason":{"nullable":true,"type":"string"},"id":{"type":"string"},"ip":{"nullable":true,"type":"string"},"method":{"type":"string"},"on_behalf_of_user_id":{"nullable":true,"type":"integer"},"outcome":{"enum":["allowed","denied"],"type":"string"},"path":{"type":"string"},"request_id":{"nullable":true,"type":"string"},"route":{"nullable":true,"type":"string"},"service_account_id":{"nullable":true,"type":"integer"}},"type":"object"},"identity_Authorization":{"properties":{"client_id":{"type":"string"},"client_kind":{"enum":["partner","mcp"],"type":"string"},"client_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"expires_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"is_agent":{"type":"boolean"},"resource":{"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"user_id":{"type":"integer"},"user_name":{"nullable":true,"type":"string"},"verified":{"type":"boolean"}},"type":"object"},"identity_IssuedServiceAccountCredential":{"allOf":[{"$ref":"#/components/schemas/identity_ServiceAccountCredential"},{"properties":{"client_id":{"description":"For client secrets: the OAuth client_id (sa_<id>) to use with grant_type=client_credentials.","nullable":true,"type":"string"},"secret":{"description":"Shown once. API keys start with osc_sak_, client secrets with osc_scs_. Only a SHA-256 hash is stored.","type":"string"}},"type":"object"}]},"identity_OAuthApp":{"properties":{"client_id":{"example":"app_Q2x5dGU3YXZ3cnFw","type":"string"},"company_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"description":{"nullable":true,"type":"string"},"homepage_url":{"nullable":true,"type":"string"},"is_agent":{"type":"boolean"},"logo_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"redirect_uris":{"items":{"type":"string"},"type":"array"},"retired_at":{"format":"date-time","nullable":true,"type":"string"},"scopes":{"description":"API scopes from the documented vocabulary (`<area>:read` or `<area>:write`).","items":{"example":"rfis:read","type":"string"},"maxItems":200,"minItems":1,"type":"array"},"status":{"enum":["active","disabled","retired"],"type":"string"},"token_endpoint_auth_method":{"enum":["none"],"type":"string"},"verified":{"type":"boolean"}},"type":"object"},"identity_OAuthAppInput":{"properties":{"description":{"nullable":true,"type":"string"},"homepage_url":{"nullable":true,"type":"string"},"is_agent":{"default":false,"type":"boolean"},"logo_url":{"nullable":true,"type":"string"},"name":{"maxLength":200,"type":"string"},"redirect_uris":{"items":{"description":"Exact https callback URL.","type":"string"},"maxItems":10,"minItems":1,"type":"array"},"scopes":{"description":"API scopes from the documented vocabulary (`<area>:read` or `<area>:write`).","items":{"example":"rfis:read","type":"string"},"maxItems":200,"minItems":1,"type":"array"}},"required":["name","redirect_uris","scopes"],"type":"object"},"identity_ServiceAccount":{"properties":{"client_id":{"example":"sa_12","type":"string"},"company_admin":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"credentials":{"items":{"$ref":"#/components/schemas/identity_ServiceAccountCredential"},"type":"array"},"description":{"nullable":true,"type":"string"},"disabled_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"ip_allowlist":{"items":{"type":"string"},"type":"array"},"is_agent":{"description":"Agent accounts can only create and propose.","type":"boolean"},"last_used_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"owner_user_id":{"type":"integer"},"status":{"enum":["active","disabled"],"type":"string"},"user_id":{"description":"The non-human user row the account acts as (appears as the actor in audit trails).","type":"integer"}},"type":"object"},"identity_ServiceAccountCredential":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"kind":{"enum":["api_key","client_secret"],"type":"string"},"label":{"type":"string"},"last_used_at":{"format":"date-time","nullable":true,"type":"string"},"last_used_ip":{"nullable":true,"type":"string"},"prefix":{"description":"Non-secret display hint (first 12 characters).","type":"string"},"revoked_at":{"format":"date-time","nullable":true,"type":"string"},"rotated_from_id":{"nullable":true,"type":"integer"},"scopes":{"description":"API scopes from the documented vocabulary (`<area>:read` or `<area>:write`).","items":{"example":"rfis:read","type":"string"},"maxItems":200,"minItems":1,"type":"array"},"status":{"enum":["active","revoked","expired"],"type":"string"}},"type":"object"},"identity_ServiceAccountInput":{"properties":{"company_admin":{"default":false,"type":"boolean"},"description":{"maxLength":1000,"nullable":true,"type":"string"},"ip_allowlist":{"items":{"example":"203.0.113.0/24","type":"string"},"maxItems":50,"type":"array"},"is_agent":{"default":false,"type":"boolean"},"name":{"maxLength":120,"type":"string"},"owner_user_id":{"description":"An active person in your company accountable for the account.","type":"integer"}},"required":["name","owner_user_id"],"type":"object"},"identity_ServiceAccountUpdate":{"properties":{"company_admin":{"type":"boolean"},"description":{"nullable":true,"type":"string"},"disabled":{"description":"true revokes every credential and token at once.","type":"boolean"},"ip_allowlist":{"items":{"type":"string"},"type":"array"},"is_agent":{"type":"boolean"},"name":{"type":"string"},"owner_user_id":{"type":"integer"}},"type":"object"},"materials_Attachment":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"required":["id","name","url"],"type":"object"},"materials_CommitmentStub":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"},"status":{"type":"string"},"title":{"nullable":true,"type":"string"},"type":{"enum":["PurchaseOrderContract","WorkOrderContract"],"type":"string"},"type_label":{"type":"string"},"url_segment":{"type":"string"}},"required":["type","id","number","status","type_label","url_segment"],"type":"object"},"materials_CostCodeStub":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name","full_code"],"type":"object"},"materials_DeliveryItem":{"properties":{"cost_code":{"$ref":"#/components/schemas/materials_CostCodeStub"},"id":{"type":"integer"},"material_id":{"type":"integer"},"material_name":{"type":"string"},"quantity":{"type":"string"},"unit_cost":{"nullable":true,"type":"string"},"uom":{"type":"string"}},"required":["id","material_id","material_name","uom","quantity"],"type":"object"},"materials_DeliveryListItem":{"properties":{"attachments_count":{"type":"integer"},"commitment":{"$ref":"#/components/schemas/materials_CommitmentStub"},"contract_id":{"nullable":true,"type":"integer"},"contract_type":{"enum":["PurchaseOrderContract","WorkOrderContract"],"nullable":true,"type":"string"},"created_at":{"type":"string"},"delivery_date":{"nullable":true,"type":"string"},"id":{"type":"integer"},"line_items_count":{"type":"integer"},"notes":{"nullable":true,"type":"string"},"number":{"type":"string"},"project_id":{"type":"integer"},"received_by":{"$ref":"#/components/schemas/materials_UserStub"},"status":{"enum":["pending","received"],"type":"string"},"tracking_number":{"nullable":true,"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"vendor":{"$ref":"#/components/schemas/materials_VendorStub"},"vendor_id":{"nullable":true,"type":"integer"}},"required":["id","number","status","translated_status","project_id","line_items_count","created_at","updated_at"],"type":"object"},"materials_DeliveryShow":{"allOf":[{"$ref":"#/components/schemas/materials_DeliveryListItem"},{"properties":{"attachments":{"items":{"$ref":"#/components/schemas/materials_Attachment"},"type":"array"},"line_items":{"items":{"$ref":"#/components/schemas/materials_DeliveryItem"},"type":"array"}},"required":["line_items","attachments"],"type":"object"}]},"materials_FilterOption":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"materials_Material":{"properties":{"category":{"nullable":true,"type":"string"},"cost_code":{"$ref":"#/components/schemas/materials_CostCodeStub"},"cost_code_id":{"nullable":true,"type":"integer"},"created_at":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"project_id":{"type":"integer"},"quantity_on_hand":{"type":"string"},"status":{"enum":["active","inactive"],"type":"string"},"translated_status":{"type":"string"},"unit_cost":{"nullable":true,"type":"string"},"uom":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","uom","quantity_on_hand","status","translated_status","project_id","created_at","updated_at"],"type":"object"},"materials_ReceiptReview":{"properties":{"created_at":{"format":"date-time","type":"string"},"decisions":{"items":{"properties":{"action":{"enum":["submitted","accept","return"],"type":"string"},"actor_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"reason":{"type":"string"}},"required":["action","reason","actor_id","created_at"],"type":"object"},"type":"array"},"delivery_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"lines":{"items":{"$ref":"#/components/schemas/materials_ReceiptReviewLineInput"},"type":"array"},"receipt_id":{"minimum":1,"nullable":true,"type":"integer"},"source":{"description":"Immutable delivery, PO line and attachment reference metadata. Attachment URLs are omitted; remote file bytes are not archived.","type":"object"},"source_digest":{"type":"string"},"status":{"enum":["submitted","returned","accepted"],"type":"string"},"submitted_by_id":{"minimum":1,"type":"integer"},"version":{"minimum":1,"type":"integer"}},"required":["id","delivery_id","status","version","source_digest","receipt_id","submitted_by_id","created_at","source","lines","decisions"],"type":"object"},"materials_ReceiptReviewDecision":{"additionalProperties":false,"properties":{"action":{"enum":["accept","return"],"type":"string"},"expected_version":{"minimum":1,"type":"integer"},"reason":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["expected_version","action","reason"],"type":"object"},"materials_ReceiptReviewLineInput":{"additionalProperties":false,"properties":{"accepted_quantity":{"description":"Nonnegative decimal, at most delivered quantity. Positive quantities require an identically named UOM on a unit-priced PO line; zero requires a null PO line. At least one positive quantity is required.","pattern":"^\\d{1,10}(\\.\\d{1,3})?$","type":"string"},"delivery_item_id":{"minimum":1,"type":"integer"},"po_line_id":{"minimum":1,"nullable":true,"type":"integer"},"reason":{"description":"At least three trimmed characters when any delivered quantity is unaccepted.","maxLength":1000,"type":"string"}},"required":["delivery_item_id","po_line_id","accepted_quantity"],"type":"object"},"materials_ReceiptReviewSubmission":{"additionalProperties":false,"properties":{"lines":{"items":{"$ref":"#/components/schemas/materials_ReceiptReviewLineInput"},"maxItems":100,"minItems":1,"type":"array"},"source_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"submission_key":{"description":"Caller-generated retry key, scoped to the delivery and submitter; a changed request with this key conflicts.","format":"uuid","type":"string"}},"required":["submission_key","source_digest","lines"],"type":"object"},"materials_ReceiptReviewWorkspace":{"properties":{"can_review":{"type":"boolean"},"can_submit":{"type":"boolean"},"reviews":{"items":{"$ref":"#/components/schemas/materials_ReceiptReview"},"maxItems":100,"type":"array"},"source":{"nullable":true,"type":"object"},"source_digest":{"nullable":true,"type":"string"},"source_error":{"nullable":true,"type":"string"}},"required":["source","source_digest","source_error","reviews","can_submit","can_review"],"type":"object"},"materials_UserStub":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login","name"],"type":"object"},"materials_VendorStub":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"meetings_Meeting":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attendees":{"items":{"properties":{"id":{"type":"integer"},"login_information":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"status":{"enum":["Present","Absent","For Distribution Only","Conference",null],"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"conclusion":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"download_all_url":{"type":"string"},"ends_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_draft":{"type":"boolean"},"is_private":{"type":"boolean"},"location":{"nullable":true,"type":"string"},"meeting_categories":{"items":{"properties":{"id":{"type":"integer"},"meeting_topic":{"items":{"properties":{"assignments":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_on":{"format":"date","type":"string"},"download_all_url":{"type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"meeting_category":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"minutes":{"type":"string"},"number":{"type":"string"},"position":{"type":"integer"},"priority":{"enum":["","High","Medium","Low"],"type":"string"},"status":{"enum":["Open","On Hold","Closed"],"type":"string"},"title":{"type":"string"}},"type":"object"},"type":"array"},"position":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"type":"array"},"meeting_template_id":{"nullable":true,"type":"integer"},"mode":{"enum":["minutes","agenda"],"type":"string"},"occurred":{"type":"boolean"},"position":{"type":"integer"},"remote_meeting_url":{"nullable":true,"type":"string"},"starts_at":{"format":"date-time","type":"string"},"time_zone":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"meetings_MeetingBody":{"properties":{"attendees":{"items":{"type":"integer"},"type":"array"},"conclusion":{"type":"string"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"ends_at":{"type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"is_draft":{"type":"boolean"},"is_private":{"type":"boolean"},"location":{"type":"string"},"minutes":{"type":"string"},"occurred":{"default":false,"type":"boolean"},"overview":{"type":"string"},"position":{"default":1,"type":"integer"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"starts_at":{"type":"string"},"time_zone":{"type":"string"},"title":{"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"required":["position","starts_at","ends_at"],"title":"Meeting","type":"object"},"meetings_MeetingListGroup":{"properties":{"group_title":{"type":"string"},"meetings":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"distributed_at":{"format":"date-time","type":"string"},"distributed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"ends_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_private":{"type":"boolean"},"last_distributed_event":{"enum":["minutes","agenda",null],"nullable":true,"type":"string"},"location":{"nullable":true,"type":"string"},"meeting_template_id":{"nullable":true,"type":"integer"},"meeting_topics_count":{"type":"integer"},"mode":{"enum":["minutes","agenda"],"type":"string"},"occurred":{"type":"boolean"},"parent_id":{"nullable":true,"type":"integer"},"position":{"type":"integer"},"starts_at":{"format":"date-time","type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"meetings_MeetingTopic":{"properties":{"assignments":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_on":{"format":"date","type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"id":{"type":"integer"},"meeting_category":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"minutes":{"nullable":true,"type":"string"},"number":{"type":"string"},"position":{"type":"integer"},"priority":{"enum":["","High","Medium","Low",null],"nullable":true,"type":"string"},"status":{"enum":["Open","On Hold","Closed"],"type":"string"},"title":{"type":"string"}},"type":"object"},"notifications_CreateSettingInput":{"additionalProperties":false,"properties":{"notification_setting":{"additionalProperties":false,"properties":{"enabled":{"default":true,"type":"boolean"},"event":{"description":"Event key emitted by the tool.","minLength":1,"type":"string"},"recipient_ref":{"anyOf":[{"minLength":1,"type":"string"},{"minimum":1,"type":"integer"}],"description":"Id of the selected permission template or user. The rule stores this as a string."},"recipient_type":{"default":"user","description":"Select a permission template with role or a user with user.","enum":["role","user"],"type":"string"},"tool_slug":{"description":"Tool slug used by the matching event.","minLength":1,"type":"string"}},"required":["tool_slug","event","recipient_ref"],"type":"object"}},"required":["notification_setting"],"type":"object"},"notifications_DigestFrequency":{"enum":["off","daily","weekly"],"type":"string"},"notifications_Error":{"additionalProperties":false,"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"required":["errors"],"type":"object"},"notifications_MarkReadInput":{"additionalProperties":false,"anyOf":[{"properties":{"all":{"enum":[true],"type":"boolean"}},"required":["all"]},{"required":["ids"]}],"properties":{"all":{"description":"When true, marks all currently visible unread items in the caller's inbox read.","type":"boolean"},"ids":{"description":"Notification ids to mark read. Rows must be unread and visible to the caller.","items":{"minimum":1,"type":"integer"},"type":"array"}},"type":"object"},"notifications_MarkReadResult":{"additionalProperties":false,"properties":{"unread":{"minimum":0,"type":"integer"},"updated":{"minimum":0,"type":"integer"}},"required":["updated","unread"],"type":"object"},"notifications_Notification":{"additionalProperties":false,"properties":{"actor":{"$ref":"#/components/schemas/notifications_NotificationActor"},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"event":{"type":"string"},"event_label":{"type":"string"},"id":{"minimum":1,"type":"integer"},"item_id":{"type":"integer"},"item_type":{"type":"string"},"item_type_label":{"type":"string"},"project_id":{"description":"Project id, or zero for a company-wide activity.","minimum":0,"type":"integer"},"read":{"type":"boolean"},"read_at":{"format":"date-time","nullable":true,"type":"string"},"recipient_id":{"minimum":1,"type":"integer"},"summary":{"type":"string"},"url":{"description":"The in-app path to the activity.","type":"string"}},"required":["id","project_id","company_id","recipient_id","item_type","item_type_label","item_id","event","event_label","summary","url","read","read_at","actor","created_at"],"type":"object"},"notifications_NotificationActor":{"additionalProperties":false,"nullable":true,"properties":{"id":{"minimum":1,"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login","name","locale"],"type":"object"},"notifications_Preference":{"additionalProperties":false,"properties":{"email":{"type":"boolean"},"event":{"enum":["assigned","status_changed","commented","replied","mentioned","overdue","published","insight_opened","automation"],"type":"string"},"event_label":{"type":"string"},"in_app":{"type":"boolean"}},"required":["event","event_label","in_app","email"],"type":"object"},"notifications_PreferenceInput":{"additionalProperties":false,"properties":{"email":{"default":true,"type":"boolean"},"event":{"description":"The event key. Use an event from the preferences grid for a row reflected in the response.","minLength":1,"type":"string"},"in_app":{"default":true,"type":"boolean"}},"required":["event"],"type":"object"},"notifications_Preferences":{"additionalProperties":false,"properties":{"digest_frequency":{"$ref":"#/components/schemas/notifications_DigestFrequency"},"preferences":{"items":{"$ref":"#/components/schemas/notifications_Preference"},"type":"array"}},"required":["preferences","digest_frequency"],"type":"object"},"notifications_PreferencesInput":{"additionalProperties":false,"properties":{"notification_preferences":{"additionalProperties":false,"properties":{"digest_frequency":{"description":"Use off, daily, or weekly. Other non-null values are interpreted as off.","nullable":true,"type":"string"},"preferences":{"items":{"$ref":"#/components/schemas/notifications_PreferenceInput"},"type":"array"}},"type":"object"}},"type":"object"},"notifications_Setting":{"additionalProperties":false,"properties":{"company_id":{"minimum":1,"type":"integer"},"enabled":{"type":"boolean"},"event":{"type":"string"},"event_label":{"type":"string"},"id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"recipient_ref":{"type":"string"},"recipient_type":{"enum":["role","user"],"type":"string"},"tool_slug":{"type":"string"}},"required":["id","project_id","company_id","tool_slug","event","event_label","recipient_type","recipient_ref","enabled"],"type":"object"},"notifications_SettingUpdated":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"id":{"minimum":1,"type":"integer"}},"required":["id","enabled"],"type":"object"},"notifications_UpdateSettingInput":{"additionalProperties":false,"properties":{"notification_setting":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"type":"object"}},"required":["notification_setting"],"type":"object"},"owner_reports_LinkView":{"properties":{"id":{"type":"integer"},"kind":{"enum":["page","pdf"],"type":"string"},"user_agent":{"type":["string","null"]},"viewed_at":{"format":"date-time","type":"string"},"visitor":{"description":"IP hash salted per link.","type":"string"}},"type":"object"},"owner_reports_Owner":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"projects":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"owner_reports_OwnerReport":{"properties":{"active_share_links":{"type":["integer","null"]},"content":{"$ref":"#/components/schemas/owner_reports_ReportContent"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"latest_version":{"properties":{"id":{"type":"integer"},"published_at":{"format":"date-time","type":"string"},"version":{"type":"integer"}},"type":["object","null"]},"owner_vendor_id":{"type":["integer","null"]},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"photo_ids":{"items":{"type":"integer"},"type":"array"},"project_id":{"type":["integer","null"]},"project_ids":{"description":"Portfolio reports: the projects included.","items":{"type":"integer"},"type":"array"},"scope":{"enum":["project","portfolio"],"type":"string"},"sections":{"items":{"enum":["executive_summary","budget_gmp","contingency_allowances","billing","change_orders","schedule","lookahead","rfis_submittals","safety","quality","photos","risks","compliance"],"type":"string"},"type":"array"},"template":{"enum":["monthly_aia","gmp_cost","executive","portfolio"],"type":"string"},"template_name":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","scope","template","title","period_start","period_end","sections","content","photo_ids","created_at","updated_at"],"type":"object"},"owner_reports_OwnerReportVersion":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"kind":{"enum":["published","scheduled"],"type":"string"},"pdf_bytes":{"type":"integer"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"photo_count":{"type":"integer"},"published_by":{"properties":{"id":{"type":"integer"},"name":{"type":["string","null"]}},"type":"object"},"rendered_for":{"type":["object","null"]},"report_id":{"type":"integer"},"sha256":{"description":"SHA-256 of the frozen PDF.","type":"string"},"sources":{"description":"Tool slugs whose data the frozen version contains.","items":{"type":"string"},"type":"array"},"title":{"type":"string"},"version":{"type":"integer"}},"required":["id","report_id","version","kind","title","period_start","period_end","sources","sha256","pdf_bytes","created_at"],"type":"object"},"owner_reports_ReportContent":{"properties":{"executive_summary":{"maxLength":8000,"type":"string"},"lookahead_weeks":{"enum":[2,3,6],"type":"integer"},"risks":{"items":{"$ref":"#/components/schemas/owner_reports_RiskItem"},"maxItems":50,"type":"array"},"section_notes":{"additionalProperties":{"maxLength":4000,"type":"string"},"description":"Commentary per section key.","type":"object"}},"type":"object"},"owner_reports_ReportDocument":{"description":"The fully formatted report: every value is a display string. A denied source makes its section status unavailable (never zero).","properties":{"company":{"properties":{"name":{"type":"string"}},"type":"object"},"generatedAt":{"format":"date-time","type":"string"},"owner":{"type":["string","null"]},"period":{"properties":{"end":{"format":"date","type":"string"},"label":{"type":"string"},"start":{"format":"date","type":"string"}},"type":"object"},"preparedBy":{"type":"string"},"project":{"type":["object","null"]},"projects":{"items":{"type":"object"},"type":"array"},"sections":{"items":{"properties":{"key":{"type":"string"},"kpis":{"items":{"properties":{"hint":{"type":"string"},"label":{"type":"string"},"tone":{"enum":["ok","warn","risk","info"],"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"message":{"type":"string"},"narrative":{"type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"photos":{"items":{"type":"object"},"type":"array"},"status":{"enum":["ok","unavailable","empty"],"type":"string"},"tables":{"items":{"type":"object"},"type":"array"},"title":{"type":"string"}},"required":["key","title","status","kpis","tables","notes"],"type":"object"},"type":"array"},"template":{"type":"string"},"title":{"type":"string"},"v":{"enum":[1],"type":"integer"}},"required":["v","template","title","company","period","sections"],"type":"object"},"owner_reports_RiskItem":{"properties":{"impact":{"enum":["low","medium","high"],"type":"string"},"mitigation":{"type":"string"},"owner":{"type":"string"},"status":{"enum":["open","monitoring","closed"],"type":"string"},"title":{"maxLength":200,"type":"string"}},"required":["title","impact","status","owner","mitigation"],"type":"object"},"owner_reports_ShareLink":{"properties":{"allow_pdf":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"emailed":{"type":"boolean"},"emailed_at":{"type":["string","null"]},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_viewed_at":{"type":["string","null"]},"recipient_email":{"type":["string","null"]},"recipient_name":{"type":["string","null"]},"report_id":{"type":"integer"},"revoke_reason":{"type":["string","null"]},"revoked_at":{"type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"token":{"description":"Only in the create response. The server keeps a hash; it cannot be shown again.","type":"string"},"url":{"description":"Only in the create response: the owner-facing link (/owner-report/{token}).","type":"string"},"version":{"type":["integer","null"]},"version_id":{"type":"integer"},"view_count":{"type":"integer"}},"required":["id","report_id","version_id","status","expires_at","view_count","created_at"],"type":"object"},"payment_applications_BillingPeriod":{"properties":{"end_date":{"nullable":true,"type":"string"},"start_date":{"nullable":true,"type":"string"}},"type":"object"},"payment_applications_ContractStub":{"properties":{"id":{"type":"integer"},"title":{"nullable":true,"type":"string"},"type":{"type":"string"}},"required":["id","type"],"type":"object"},"payment_applications_CostCodeStub":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"payment_applications_FilterOption":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"payment_applications_PaymentApplicationCreateBody":{"properties":{"payment_application":{"properties":{"billing_date":{"type":"string"},"contract_id":{"type":"integer"},"contract_type":{"enum":["PrimeContract","WorkOrderContract","PurchaseOrderContract"],"type":"string"},"invoice_number":{"type":"string"},"materials_retainage_percent":{"type":["string","number"]},"number":{"type":"string"},"period_end":{"type":"string"},"period_start":{"type":"string"},"released_retainage":{"type":["string","number"]},"retainage_percent":{"type":["string","number"]},"status":{"enum":["draft","submitted","approved","rejected","paid","void"],"type":"string"},"work_retainage_percent":{"type":["string","number"]}},"required":["contract_id"],"type":"object"}},"required":["payment_application"],"type":"object"},"payment_applications_PaymentApplicationLine":{"properties":{"balance_to_finish":{"type":"string"},"cost_code":{"$ref":"#/components/schemas/payment_applications_CostCodeStub"},"description_of_work":{"type":"string"},"id":{"type":"integer"},"item_number":{"type":"string"},"materials_presently_stored":{"type":"string"},"materials_retainage":{"type":"string"},"materials_retainage_percent":{"type":"number"},"previous_materials_stored":{"description":"Materials presently stored (column F) on the prior certified application, carried separately from previous work.","type":"string"},"retainage":{"type":"string"},"scheduled_value":{"type":"string"},"stored_installed_this_period":{"description":"Part of work completed this period drawn from previously stored material; null derives max(0, previous stored - presently stored).","nullable":true,"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_completed_and_stored_to_date_percent":{"type":"number"},"work_completed_from_previous_application":{"type":"string"},"work_completed_this_period":{"type":"string"},"work_retainage":{"type":"string"},"work_retainage_percent":{"type":"number"}},"required":["id","item_number","description_of_work","scheduled_value","work_completed_from_previous_application","work_completed_this_period","materials_presently_stored","previous_materials_stored","stored_installed_this_period","total_completed_and_stored_to_date","total_completed_and_stored_to_date_percent","balance_to_finish","retainage"],"type":"object"},"payment_applications_PaymentApplicationListItem":{"properties":{"amount_paid":{"type":"string"},"billing_date":{"nullable":true,"type":"string"},"billing_period":{"$ref":"#/components/schemas/payment_applications_BillingPeriod"},"contract":{"$ref":"#/components/schemas/payment_applications_ContractStub"},"contract_sum_to_date":{"type":"string"},"created_at":{"type":"string"},"current_payment_due":{"type":"string"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoice_number":{"nullable":true,"type":"string"},"materials_retainage":{"type":"string"},"net_change_by_change_orders":{"type":"string"},"number":{"type":"string"},"percent_complete":{"type":"number"},"period_end":{"nullable":true,"type":"string"},"period_start":{"nullable":true,"type":"string"},"released_retainage":{"type":"string"},"retainage_percent":{"type":"number"},"status":{"enum":["draft","submitted","approved","rejected","paid","void"],"type":"string"},"total_amount_accrued_this_period":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_retainage":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"work_retainage":{"type":"string"}},"required":["id","number","status","translated_status","contract","retainage_percent","percent_complete","grand_total","total_completed_and_stored_to_date","current_payment_due","created_at","updated_at"],"type":"object"},"payment_applications_PaymentApplicationShow":{"allOf":[{"$ref":"#/components/schemas/payment_applications_PaymentApplicationListItem"},{"properties":{"approved_at":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"type":"object"},"details_available":{"type":"boolean"},"line_items":{"items":{"$ref":"#/components/schemas/payment_applications_PaymentApplicationLine"},"nullable":true,"type":"array"},"paid_at":{"nullable":true,"type":"string"},"submitted_at":{"nullable":true,"type":"string"},"summary":{"$ref":"#/components/schemas/payment_applications_PaymentApplicationSummary"}},"required":["summary","line_items","details_available"],"type":"object"}]},"payment_applications_PaymentApplicationSummary":{"properties":{"amount_paid":{"type":"string"},"balance_to_finish_plus_retainage":{"type":"string"},"contract_sum_to_date":{"type":"string"},"current_payment_due":{"type":"string"},"less_previous_certificates":{"type":"string"},"materials_retainage":{"type":"string"},"net_change_by_change_orders":{"type":"string"},"original_contract_sum":{"type":"string"},"released_retainage":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_earned_less_retainage":{"type":"string"},"total_retainage":{"type":"string"},"work_retainage":{"type":"string"}},"required":["original_contract_sum","net_change_by_change_orders","contract_sum_to_date","total_completed_and_stored_to_date","work_retainage","materials_retainage","total_retainage","total_earned_less_retainage","less_previous_certificates","released_retainage","current_payment_due","balance_to_finish_plus_retainage"],"type":"object"},"permits_Permit":{"additionalProperties":false,"properties":{"authority_name":{"type":"string"},"authority_reference":{"type":["string","null"]},"closed_on":{"format":"date","type":["string","null"]},"company_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"display_status":{"type":"string"},"expires_on":{"format":"date","type":["string","null"]},"id":{"type":"integer"},"issued_on":{"format":"date","type":["string","null"]},"jurisdiction_code":{"type":"string"},"number":{"type":"string"},"permit_type":{"type":"string"},"project_id":{"type":"integer"},"responsible_user_id":{"type":["integer","null"]},"scope_text":{"type":"string"},"status":{"enum":["draft","submitted","corrections_required","approved","issued","suspended","closed","withdrawn"]},"submitted_on":{"format":"date","type":["string","null"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"type":"integer"}},"required":["id","company_id","project_id","number","title","authority_name","jurisdiction_code","permit_type","scope_text","authority_reference","responsible_user_id","status","display_status","version","submitted_on","issued_on","expires_on","closed_on","created_at","updated_at"],"type":"object"},"permits_PermitCompanyQueue":{"additionalProperties":false,"properties":{"company":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"filters":{"additionalProperties":false,"properties":{"due":{"enum":["all","overdue","upcoming","undated"]},"owner":{"enum":["all","mine","unassigned"]},"project_id":{"minimum":1,"type":"integer"},"search":{"type":"string"},"take":{"type":"integer"}},"required":["owner","due","search","take"],"type":"object"},"items":{"items":{"additionalProperties":false,"properties":{"description":{"type":"string"},"due_on":{"format":"date","type":["string","null"]},"id":{"type":"integer"},"kind":{"enum":["condition","expiration"]},"owner_id":{"type":["integer","null"]},"owner_name":{"type":"string"},"owner_source":{"enum":["condition","permit"]},"permit_id":{"type":"integer"},"permit_number":{"type":"string"},"permit_title":{"type":"string"},"project":{"$ref":"#/components/schemas/permits_PermitQueueProject"}},"required":["id","kind","project","permit_id","permit_number","permit_title","description","due_on","owner_id","owner_name","owner_source"],"type":"object"},"maxItems":100,"type":"array"},"projects":{"items":{"$ref":"#/components/schemas/permits_PermitQueueProject"},"type":"array"},"take":{"maximum":100,"minimum":1,"type":"integer"},"today":{"format":"date","type":"string"},"total":{"minimum":0,"type":"integer"},"truncated":{"type":"boolean"}},"required":["company","projects","items","total","take","truncated","today","filters"],"type":"object"},"permits_PermitCondition":{"additionalProperties":false,"properties":{"assignee_user_id":{"type":["integer","null"]},"completed_at":{"format":"date-time","type":["string","null"]},"completed_by_id":{"type":["integer","null"]},"description":{"type":"string"},"document_evidence":{"$ref":"#/components/schemas/permits_PermitDocumentEvidence"},"due_on":{"format":"date","type":["string","null"]},"evidence_url":{"type":["string","null"]},"id":{"type":"integer"},"missing_evidence_reason":{"type":["string","null"]},"required_before":{"enum":["issue","close"]},"state":{"enum":["open","completed"]},"version":{"type":"integer"}},"required":["id","description","required_before","due_on","assignee_user_id","state","version","completed_at","completed_by_id","evidence_url","missing_evidence_reason","document_evidence"],"type":"object"},"permits_PermitDetail":{"additionalProperties":false,"properties":{"authority_name":{"type":"string"},"authority_reference":{"type":["string","null"]},"closed_on":{"format":"date","type":["string","null"]},"company_id":{"type":"integer"},"conditions":{"items":{"additionalProperties":false,"properties":{"assignee_user_id":{"type":["integer","null"]},"completed_at":{"format":"date-time","type":["string","null"]},"completed_by_id":{"type":["integer","null"]},"description":{"type":"string"},"document_evidence":{"$ref":"#/components/schemas/permits_PermitDocumentEvidence"},"due_on":{"format":"date","type":["string","null"]},"evidence_url":{"type":["string","null"]},"id":{"type":"integer"},"missing_evidence_reason":{"type":["string","null"]},"required_before":{"enum":["issue","close"]},"state":{"enum":["open","completed"]},"version":{"type":"integer"}},"required":["id","description","required_before","due_on","assignee_user_id","state","version","completed_at","completed_by_id","evidence_url","missing_evidence_reason","document_evidence"],"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"display_status":{"type":"string"},"events":{"items":{"additionalProperties":false,"properties":{"actor_user_id":{"type":"integer"},"authority_reference":{"type":["string","null"]},"document_evidence":{"$ref":"#/components/schemas/permits_PermitDocumentEvidence"},"evidence_url":{"type":["string","null"]},"expires_on":{"format":"date","type":["string","null"]},"from_status":{"type":["string","null"]},"id":{"type":"integer"},"kind":{"type":"string"},"missing_evidence_reason":{"type":["string","null"]},"note":{"type":"string"},"occurred_on":{"format":"date","type":["string","null"]},"recorded_at":{"format":"date-time","type":"string"},"request_key":{"type":"string"},"to_status":{"type":["string","null"]}},"required":["id","kind","actor_user_id","from_status","to_status","occurred_on","recorded_at","note","authority_reference","evidence_url","missing_evidence_reason","expires_on","request_key","document_evidence"],"type":"object"},"type":"array"},"expires_on":{"format":"date","type":["string","null"]},"id":{"type":"integer"},"issued_on":{"format":"date","type":["string","null"]},"jurisdiction_code":{"type":"string"},"number":{"type":"string"},"permit_type":{"type":"string"},"project_id":{"type":"integer"},"responsible_user_id":{"type":["integer","null"]},"scope_text":{"type":"string"},"status":{"enum":["draft","submitted","corrections_required","approved","issued","suspended","closed","withdrawn"]},"submitted_on":{"format":"date","type":["string","null"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"type":"integer"}},"required":["id","company_id","project_id","number","title","authority_name","jurisdiction_code","permit_type","scope_text","authority_reference","responsible_user_id","status","display_status","version","submitted_on","issued_on","expires_on","closed_on","created_at","updated_at","conditions","events"],"type":"object"},"permits_PermitDocumentEvidence":{"description":"A pinned real uploaded Documents version. Requires independent current Documents access and token documents:read scope. Denied, recycled or missing sources return only unavailable, without private source identifiers or names. A stored receipt is not a verification of authenticity.","oneOf":[{"type":"null"},{"additionalProperties":false,"properties":{"state":{"const":"unavailable"}},"required":["state"],"type":"object"},{"additionalProperties":false,"properties":{"content_type":{"type":"string"},"document_version_id":{"minimum":1,"type":"integer"},"file_id":{"minimum":1,"type":"integer"},"href":{"type":"string"},"name":{"type":"string"},"size":{"minimum":1,"type":"integer"},"state":{"const":"available"},"version_number":{"minimum":1,"type":"integer"}},"required":["state","document_version_id","file_id","name","version_number","content_type","size","href"],"type":"object"}]},"permits_PermitQueueProject":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"number":{"type":["string","null"]}},"required":["id","name","number"],"type":"object"},"photos_PhotoMetadataComment":{"additionalProperties":false,"properties":{"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"$ref":"#/components/schemas/photos_PhotoMetadataCommentAuthor"},"id":{"minimum":1,"type":"integer"},"image_id":{"minimum":1,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","image_id","body","created_at","updated_at","created_by"],"type":"object"},"photos_PhotoMetadataCommentAuthor":{"additionalProperties":false,"nullable":true,"properties":{"id":{"minimum":1,"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login","name"],"type":"object"},"photos_PhotoMetadataCommentCreate":{"properties":{"comment":{"properties":{"body":{"description":"Comment text. Leading and trailing whitespace is trimmed.","minLength":1,"pattern":"\\S","type":"string"}},"required":["body"],"type":"object"}},"required":["comment"],"type":"object"},"photos_PhotoMetadataDeleteResult":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"}},"required":["id"],"type":"object"},"photos_PhotoMetadataError":{"additionalProperties":false,"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"required":["errors"],"type":"object"},"photos_PhotoMetadataFieldErrors":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}},"required":["errors"],"type":"object"},"photos_PhotoMetadataTag":{"additionalProperties":false,"properties":{"color":{"nullable":true,"type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name","color"],"type":"object"},"photos_PhotoMetadataTagAssign":{"anyOf":[{"properties":{"tag_id":{"minimum":1,"type":"integer"}},"required":["tag_id"]},{"properties":{"name":{"minLength":1,"pattern":"\\S","type":"string"}},"required":["name"]}],"properties":{"name":{"nullable":true,"type":"string"},"tag_id":{"minimum":1,"nullable":true,"type":"integer"}},"type":"object"},"photos_PhotoMetadataTagCreate":{"properties":{"image_tag":{"properties":{"color":{"nullable":true,"type":"string"},"name":{"description":"Catalog name, matched without regard to case.","minLength":1,"pattern":"\\S","type":"string"}},"required":["name"],"type":"object"}},"required":["image_tag"],"type":"object"},"photos_PhotoMetadataTagWithCount":{"additionalProperties":false,"properties":{"color":{"nullable":true,"type":"string"},"count":{"description":"Number of current assignments to photos visible to the caller.","minimum":0,"type":"integer"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name","color","count"],"type":"object"},"prime_contracts_PrimeContract":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","type":"string"},"allow_comments":{"type":"boolean"},"allow_markups":{"type":"boolean"},"allow_payment_applications":{"type":"boolean"},"allow_payments":{"type":"boolean"},"allow_redistributions":{"type":"boolean"},"approval_letter_date":{"format":"date","type":"string"},"approved_change_orders":{"type":"string"},"architect":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assigned_to":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bill_to":{"type":"string"},"budget_line_item_id":{"type":"integer"},"change_order_packages":{"items":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"change_order_requests":{"items":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"type":"array"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"format":"date","type":"string"},"contract_start_date":{"format":"date","type":"string"},"contract_termination_date":{"format":"date","type":"string"},"contractor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"delivery_date":{"format":"date","type":"string"},"display_materials_retainage":{"type":"boolean"},"display_stored_materials":{"type":"boolean"},"display_work_retainage":{"type":"boolean"},"draft_change_orders_amount":{"type":"string"},"exclusions":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"has_change_order_packages":{"type":"boolean"},"has_potential_change_orders":{"type":"boolean"},"id":{"type":"integer"},"inclusions":{"type":"string"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"line_items_extended_total":{"type":"string"},"line_items_total":{"type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"original_substantial_completion_date":{"format":"date","type":"string"},"outstanding_balance":{"type":"string"},"owner_invoices_amount":{"type":"string"},"payment_terms":{"type":"string"},"payments_received":{"items":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"check_number":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"date":{"format":"date","type":"string"},"draw_request_number":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_number":{"type":"integer"}},"type":"object"},"type":"array"},"pending_change_orders_amount":{"type":"string"},"pending_revised_contract_amount":{"type":"string"},"percentage_paid":{"type":"string"},"position":{"type":"integer"},"potential_change_orders":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"private":{"type":"boolean"},"received_from":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"requisition_number":{"type":"string"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract_amount":{"type":"string"},"ship_to":{"type":"string"},"ship_via":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated"],"type":"string"},"substantial_completion_date":{"format":"date","type":"string"},"title":{"type":"string"},"total_payments":{"type":"string"},"type":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]}},"type":"object"},"prime_contracts_PrimeContractLineItem":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"},"prime_contracts_PrimeContractLineItemV2Body":{"description":"Unwrapped schedule of values line (the v1 `line_item` body).","properties":{"amount":{"description":"Decimal; strings keep exact cents.","nullable":true,"oneOf":[{"type":"string"},{"type":"number"}]},"cost_code_id":{"nullable":true,"oneOf":[{"type":"integer"},{"pattern":"^\\d+$","type":"string"}]},"description":{"nullable":true,"type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"position":{"type":"integer"},"quantity":{"description":"Decimal; strings keep exact cents.","nullable":true,"oneOf":[{"type":"string"},{"type":"number"}]},"unit_cost":{"description":"Decimal; strings keep exact cents.","nullable":true,"oneOf":[{"type":"string"},{"type":"number"}]},"uom":{"nullable":true,"type":"string"}},"type":"object"},"prime_contracts_PrimeContractListItem":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","type":"string"},"approval_letter_date":{"format":"date","type":"string"},"approved_change_orders":{"type":"string"},"architect":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"format":"date","type":"string"},"contract_start_date":{"format":"date","type":"string"},"contract_termination_date":{"format":"date","type":"string"},"contractor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"draft_change_orders_amount":{"type":"string"},"exclusions":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"has_change_order_packages":{"type":"boolean"},"has_potential_change_orders":{"type":"boolean"},"id":{"type":"integer"},"inclusions":{"type":"string"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"original_substantial_completion_date":{"format":"date","type":"string"},"outstanding_balance":{"type":"string"},"owner_invoices_amount":{"type":"string"},"pending_change_orders_amount":{"type":"string"},"pending_revised_contract_amount":{"type":"string"},"percentage_paid":{"type":"string"},"private":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract_amount":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated"],"type":"string"},"substantial_completion_date":{"format":"date","type":"string"},"title":{"type":"string"},"total_payments":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]}},"type":"object"},"prime_contracts_PrimeContractV2Body":{"description":"Unwrapped prime contract fields (the v1 `prime_contract` body). Ids may be integers or digit strings.","properties":{"accessor_ids":{"items":{"type":"integer"},"maxItems":500,"type":"array"},"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","nullable":true,"type":"string"},"approval_letter_date":{"format":"date","nullable":true,"type":"string"},"architect_id":{"description":"Architect / engineer (user).","nullable":true,"oneOf":[{"type":"integer"},{"pattern":"^\\d+$","type":"string"}]},"contract_date":{"format":"date","nullable":true,"type":"string"},"contract_estimated_completion_date":{"format":"date","nullable":true,"type":"string"},"contract_start_date":{"format":"date","nullable":true,"type":"string"},"contract_termination_date":{"format":"date","nullable":true,"type":"string"},"contractor_id":{"nullable":true,"oneOf":[{"type":"integer"},{"pattern":"^\\d+$","type":"string"}]},"description":{"nullable":true,"type":"string"},"exclusions":{"nullable":true,"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","nullable":true,"type":"string"},"inclusions":{"nullable":true,"type":"string"},"issued_on_date":{"format":"date","nullable":true,"type":"string"},"letter_of_intent_date":{"format":"date","nullable":true,"type":"string"},"number":{"nullable":true,"type":"string"},"private":{"type":"boolean"},"retainage_percent":{"description":"Decimal; strings keep exact cents.","nullable":true,"oneOf":[{"type":"string"},{"type":"number"}]},"returned_date":{"format":"date","nullable":true,"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","nullable":true,"type":"string"},"status":{"description":"draft, out_for_bid, out_for_signature, approved, complete, terminated (labels accepted)","type":"string"},"substantial_completion_date":{"format":"date","nullable":true,"type":"string"},"title":{"minLength":1,"type":"string"},"vendor_id":{"description":"Owner / client (company vendor).","nullable":true,"oneOf":[{"type":"integer"},{"pattern":"^\\d+$","type":"string"}]}},"type":"object"},"punch_list_PunchItem":{"properties":{"assignments":{"items":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"formatted_status":{"type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"notified_at":{"format":"date","type":"string"},"ready_for_review_at":{"format":"date","type":"string"},"updated_at":{"format":"date","type":"string"},"work_not_accepted_at":{"format":"date","type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"attached_to_item_id":{"nullable":true,"type":"integer"},"attached_to_item_type":{"nullable":true,"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"can_email":{"type":"boolean"},"category":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Category","type":"object"},"closed_at":{"format":"date-time","type":"string"},"closed_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Closed By","type":"object"},"comments":{"items":{"properties":{"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Comment","type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"cost_impact_amount":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"enum":["DRAFT","OPEN","CLOSED"],"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"legacy_workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"nullable":true,"type":"string"},"name":{"type":"string"}},"title":"Punch Item Custom Status","type":"object"},"date_initiated":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"distribution_members":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"download_all_attachments_uuid":{"type":"string"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"final_approver":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Final Approver","type":"object"},"id":{"type":"integer"},"images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Manager","type":"object"},"punch_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Type","type":"object"},"reference":{"type":"string"},"rich_text_description":{"type":"string"},"schedule_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"type":"string"},"schedule_risk_reason":{"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"web_images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"title":"Punch Item","type":"object"},"punch_list_PunchItemAssignment":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"attached_to_item_id":{"nullable":true,"type":"integer"},"attached_to_item_type":{"nullable":true,"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"login_information_id":{"type":"integer"},"login_information_name":{"type":"string"},"manager_accepted_at":{"type":"string"},"name":{"type":"string"},"notified_at":{"type":"string"},"responded_at":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"purchase_requests_Decision":{"properties":{"action":{"enum":["created","revised","submit","return","reject","approve","convert"],"type":"string"},"actor_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"reason":{"type":"string"},"revision":{"minimum":1,"type":"integer"},"version":{"minimum":1,"type":"integer"}},"required":["revision","version","action","reason","actor_id","created_at"],"type":"object"},"purchase_requests_EditInput":{"additionalProperties":false,"properties":{"expected_version":{"minimum":1,"type":"integer"},"request":{"$ref":"#/components/schemas/purchase_requests_RequestInput"}},"required":["expected_version","request"],"type":"object"},"purchase_requests_LineInput":{"additionalProperties":false,"properties":{"cost_code_id":{"minimum":1,"type":"integer"},"description":{"maxLength":500,"minLength":1,"type":"string"},"quantity":{"description":"Positive decimal string, at most eight integer digits and four decimal places; zero is not allowed.","pattern":"^(?=.*[1-9])\\d{1,8}(\\.\\d{1,4})?$","type":"string"},"unit_cost":{"description":"Positive decimal string, at most eight integer digits and four decimal places; zero is not allowed.","pattern":"^(?=.*[1-9])\\d{1,8}(\\.\\d{1,4})?$","type":"string"},"uom":{"maxLength":30,"minLength":1,"type":"string"}},"required":["description","cost_code_id","quantity","unit_cost","uom"],"type":"object"},"purchase_requests_PurchaseRequest":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"decisions":{"items":{"$ref":"#/components/schemas/purchase_requests_Decision"},"type":"array"},"id":{"minimum":1,"type":"integer"},"number":{"type":"string"},"project_id":{"minimum":1,"type":"integer"},"purchase_order_id":{"nullable":true,"type":"integer"},"revision":{"minimum":1,"type":"integer"},"revisions":{"items":{"$ref":"#/components/schemas/purchase_requests_Revision"},"minItems":1,"type":"array"},"status":{"enum":["draft","submitted","returned","rejected","approved","converted"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["id","number","project_id","status","revision","version","created_by_id","purchase_order_id","created_at","updated_at","revisions","decisions"],"type":"object"},"purchase_requests_RequestInput":{"additionalProperties":false,"description":"The sum of quantity ? unit_cost rounded half-up to cents per line must not exceed 999999999999.99. Each value must be positive. Company, status and reviewer fields are derived server-side and cannot be supplied.","properties":{"delivery_location":{"maxLength":500,"minLength":1,"type":"string"},"justification":{"maxLength":4000,"minLength":3,"type":"string"},"lines":{"items":{"$ref":"#/components/schemas/purchase_requests_LineInput"},"maxItems":100,"minItems":1,"type":"array"},"needed_by":{"format":"date","type":"string"},"title":{"maxLength":200,"minLength":1,"type":"string"},"vendor_id":{"minimum":1,"type":"integer"}},"required":["title","justification","vendor_id","needed_by","delivery_location","lines"],"type":"object"},"purchase_requests_Revision":{"properties":{"created_at":{"format":"date-time","type":"string"},"delivery_location":{"maxLength":500,"minLength":1,"type":"string"},"justification":{"maxLength":4000,"minLength":3,"type":"string"},"lines":{"items":{"additionalProperties":false,"properties":{"amount":{"type":"string"},"cost_code_id":{"minimum":1,"type":"integer"},"description":{"maxLength":500,"minLength":1,"type":"string"},"quantity":{"description":"Positive decimal string, at most eight integer digits and four decimal places; zero is not allowed.","pattern":"^(?=.*[1-9])\\d{1,8}(\\.\\d{1,4})?$","type":"string"},"unit_cost":{"description":"Positive decimal string, at most eight integer digits and four decimal places; zero is not allowed.","pattern":"^(?=.*[1-9])\\d{1,8}(\\.\\d{1,4})?$","type":"string"},"uom":{"maxLength":30,"minLength":1,"type":"string"}},"required":["description","cost_code_id","quantity","unit_cost","uom","amount"],"type":"object"},"type":"array"},"needed_by":{"format":"date","type":"string"},"revision":{"minimum":1,"type":"integer"},"title":{"maxLength":200,"minLength":1,"type":"string"},"total":{"type":"string"},"vendor_id":{"minimum":1,"type":"integer"}},"required":["title","justification","vendor_id","needed_by","delivery_location","revision","created_at","total","lines"],"type":"object"},"purchase_requests_TransitionInput":{"additionalProperties":false,"properties":{"action":{"enum":["submit","return","reject","approve","convert"],"type":"string"},"expected_version":{"minimum":1,"type":"integer"},"reason":{"description":"At least three characters required for return and reject.","maxLength":2000,"type":"string"}},"required":["expected_version","action"],"type":"object"},"reporting_ComputedDashboard":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"widgets":{"items":{"$ref":"#/components/schemas/reporting_ComputedWidget"},"type":"array"}},"required":["id","name","description","widgets"],"type":"object"},"reporting_ComputedReport":{"properties":{"chart":{"properties":{"data":{"items":{"properties":{"label":{"type":"string"},"value":{"type":"number"}},"required":["label","value"],"type":"object"},"type":"array"},"title":{"type":"string"}},"type":["object","null"]},"columns":{"items":{"properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}},"required":["key","label","type"],"type":"object"},"type":"array"},"key":{"type":"string"},"name":{"type":"string"},"rows":{"items":{"type":"object"},"type":"array"},"summary":{"items":{"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"}},"required":["key","name","description","columns","rows","summary"],"type":"object"},"reporting_ComputedWidget":{"properties":{"config":{"type":"object"},"data_source":{"type":"string"},"series":{"items":{"properties":{"label":{"type":"string"},"value":{"type":"number"}},"required":["label","value"],"type":"object"},"type":["array","null"]},"stat":{"properties":{"caption":{"type":"string"},"value":{"type":"string"}},"type":["object","null"]},"table":{"properties":{"columns":{"items":{"properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}},"required":["key","label","type"],"type":"object"},"type":"array"},"rows":{"items":{"type":"object"},"type":"array"}},"required":["columns","rows"],"type":"object"},"title":{"type":"string"},"type":{"type":"string"}},"required":["type","title","data_source","config","table"],"type":"object"},"reporting_Dashboard":{"properties":{"created_at":{"type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"type":"string"},"widgets":{"type":"array"}},"required":["id","name","widgets","created_by_id","created_at","updated_at"],"type":"object"},"reporting_ProjectReport":{"properties":{"columns":{"type":"array"},"created_at":{"type":"string"},"created_by_id":{"type":"integer"},"data_source":{"type":"string"},"filters":{"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"template_key":{"type":["string","null"]},"tool_slug":{"type":["string","null"]},"updated_at":{"type":"string"}},"required":["id","name","data_source","columns","filters","created_by_id","created_at","updated_at"],"type":"object"},"reporting_ReportTemplate":{"properties":{"category":{"type":"string"},"columns":{"type":"array"},"data_source":{"type":"string"},"filters":{"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"template_key":{"type":"string"},"tool_slug":{"type":"string"}},"required":["id","template_key","name","tool_slug","category","data_source","columns","filters"],"type":"object"},"reporting_SavedReport":{"properties":{"columns":{"type":"array"},"created_at":{"type":"string"},"created_by_id":{"type":"integer"},"data_source":{"type":"string"},"filters":{"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","data_source","columns","filters","created_by_id","created_at","updated_at"],"type":"object"},"reporting_ScheduledReport":{"properties":{"created_at":{"type":"string"},"created_by_id":{"type":"integer"},"format":{"description":"Delivered file format. Built-in and saved reports: csv (default) or pdf. Registered module types list their own formats.","enum":["pdf","xlsx","csv"],"type":"string"},"frequency":{"type":"string"},"id":{"type":"integer"},"last_delivered_count":{"description":"Recipients emailed by the last run, after each was re-authorized at send time.","type":["integer","null"]},"last_error":{"type":["string","null"]},"last_row_count":{"type":["integer","null"]},"last_run_at":{"type":["string","null"]},"last_status":{"type":["string","null"]},"last_storage_key":{"type":["string","null"]},"params":{"additionalProperties":true,"description":"Validated parameters of a registered report type (for example weeks or baseline_id for schedule.lookahead). Empty for built-in and saved reports.","type":"object"},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"recipients":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login","name","locale"],"type":"object"},"type":"array"},"report_key":{"type":"string"},"report_name":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","report_key","report_name","frequency","created_by_id","created_at","updated_at"],"type":"object"},"rfis_Rfi":{"allOf":[{"properties":{"accepted":{"type":"boolean"},"ball_in_court_role":{"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["id","login","name"],"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_textfield_1":{"nullable":true,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"custom_textfield_2":{"nullable":true,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"distribution_list":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"draft":{"type":"boolean"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"drawing_number":{"nullable":true,"type":"string"},"questions":{"items":{"properties":{"answers":{"items":{"properties":{"answer_date":{"format":"date-time","type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"official":{"type":"boolean"},"plain_text_body":{"type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"id":{"type":"integer"},"plain_text_body":{"type":"string"},"question_date":{"format":"date-time","type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"ball_in_court":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"ball_in_courts":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"connect_export_origin":{"nullable":true,"properties":{"rfi_number":{"type":"string"},"source_provider_name":{"type":"string"}},"type":"object"},"connect_exported_project_ids":{"items":{"type":"integer"},"type":"array"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"nullable":true,"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"nullable":true,"type":"string"},"value":{"nullable":true,"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"current_revision":{"type":"boolean"},"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"full_number":{"type":"string"},"has_revisions":{"type":"boolean"},"id":{"type":"integer"},"initiated_at":{"format":"date-time","type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"prefix":{"nullable":true,"type":"string"},"private":{"type":"boolean"},"received_from":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}],"nullable":true},"reference":{"nullable":true,"type":"string"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"revision":{"type":"string"},"rfi_manager":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"schedule_impact":{"nullable":true,"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"nullable":true,"type":"string"},"value":{"nullable":true,"type":"integer"}},"type":"object"},"source_rfi_header_id":{"type":"integer"},"status":{"enum":["open","closed","draft","closed_with_revision","closed_draft"],"type":"string"},"subject":{"type":"string"},"time_resolved":{"format":"date-time","nullable":true,"type":"string"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}]},"schedule_ScheduleActivityComment":{"additionalProperties":false,"description":"A comment on one canonical schedule activity (definition activity id, stable across versions). A deleted comment keeps its place with an empty body.","properties":{"activity_id":{"type":"string"},"author":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"body":{"type":"string"},"can_delete":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_resolve":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"deleted":{"type":"boolean"},"edited_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"mentions":{"items":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"parent_id":{"nullable":true,"type":"integer"},"private":{"type":"boolean"},"resolved":{"type":"boolean"},"resolved_at":{"format":"date-time","nullable":true,"type":"string"},"resolved_by":{"additionalProperties":false,"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"updated_at":{"format":"date-time","type":"string"},"version_id":{"nullable":true,"type":"integer"}},"required":["id","activity_id","parent_id","body","private","mentions","version_id","author","created_at","updated_at","edited_at","resolved","resolved_at","resolved_by","deleted","can_edit","can_delete","can_resolve"],"type":"object"},"schedule_ScheduleActivityLink":{"additionalProperties":false,"properties":{"activity":{"anyOf":[{"$ref":"#/components/schemas/schedule_ScheduleLinkActivity"},{"type":"null"}]},"activity_id":{"type":"string"},"activity_state":{"enum":["visible","restricted","missing","unscheduled"],"type":"string"},"assessment":{"anyOf":[{"$ref":"#/components/schemas/schedule_ScheduleLinkAssessment"},{"type":"null"}]},"at_risk":{"type":"boolean"},"constraint":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"forecast_date":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"lead_time_days":{"maximum":3650,"minimum":0,"nullable":true,"type":"integer"},"note":{"type":"string"},"progress_event":{"enum":["started","progressed","finished",null],"nullable":true,"type":"string"},"progress_percent":{"maximum":100,"minimum":0,"nullable":true,"type":"integer"},"scenario_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"source":{"additionalProperties":false,"nullable":true,"properties":{"forecast":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"href":{"type":"string"},"log_date":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"reference":{"type":"string"},"resolved":{"type":"boolean"},"status":{"type":"string"},"title":{"type":"string"}},"required":["reference","title","status","href","resolved","forecast","log_date"],"type":"object"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["submittal","purchase_order","material_delivery","rfi","inspection","punch_item","change_event","manpower_log","notes_log","quantity_log","document","drawing"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"workflow":{"enum":["gates","blocks","impacts","progress","reference"],"type":"string"}},"required":["id","source_type","source_id","workflow","activity_id","lead_time_days","forecast_date","progress_event","progress_percent","scenario_id","note","created_by_id","created_at","updated_at","source","activity_state","activity","assessment","constraint","at_risk"],"type":"object"},"schedule_ScheduleActivityLinkCreate":{"additionalProperties":false,"properties":{"activity_id":{"maxLength":200,"minLength":1,"type":"string"},"forecast_date":{"description":"Gating or blocking sources; overrides the record's own forecast.","nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"lead_time_days":{"description":"Gating sources; defaults to the record's own lead time.","maximum":3650,"minimum":0,"nullable":true,"type":"integer"},"note":{"maxLength":1000,"type":"string"},"progress_event":{"description":"Required for daily-log sources.","enum":["started","progressed","finished",null],"nullable":true,"type":"string"},"progress_percent":{"maximum":100,"minimum":0,"nullable":true,"type":"integer"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["submittal","purchase_order","material_delivery","rfi","inspection","punch_item","manpower_log","notes_log","quantity_log","document","drawing"],"type":"string"}},"required":["source_type","source_id","activity_id"],"type":"object"},"schedule_ScheduleActivityLinkDeleted":{"additionalProperties":false,"properties":{"deleted":{"enum":[true],"type":"boolean"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["deleted","id"],"type":"object"},"schedule_ScheduleActivityLinkEnvelope":{"additionalProperties":false,"properties":{"link":{"$ref":"#/components/schemas/schedule_ScheduleActivityLink"}},"required":["link"],"type":"object"},"schedule_ScheduleActivityLinkList":{"additionalProperties":false,"properties":{"links":{"items":{"$ref":"#/components/schemas/schedule_ScheduleActivityLink"},"type":"array"},"schedule":{"$ref":"#/components/schemas/schedule_ScheduleLinkScheduleSummary"}},"required":["schedule","links"],"type":"object"},"schedule_ScheduleActivityLinkUpdate":{"additionalProperties":false,"minProperties":1,"properties":{"expected_updated_at":{"description":"Optimistic concurrency: the link's updated_at as last read. When it no longer matches, the update is refused with 409.","format":"date-time","type":"string"},"forecast_date":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"lead_time_days":{"maximum":3650,"minimum":0,"nullable":true,"type":"integer"},"note":{"maxLength":1000,"type":"string"},"progress_event":{"enum":["started","progressed","finished"],"type":"string"},"progress_percent":{"maximum":100,"minimum":0,"nullable":true,"type":"integer"}},"type":"object"},"schedule_ScheduleAnalysisJob":{"additionalProperties":false,"description":"A durable background schedule analysis. The job runs the same service as the inline request with the requester's live Schedule admin authority, re-checks the versions and revisions pinned at enqueue, and retains its result through that service (same digests and evidence). Only transient engine failures before persistence are retried; invalid input, conflicts, timeouts, refusals and cancellation fail at once. Program calculations (`kind` = `program`) are company-scoped: their `url` is under /rest/v1.0/companies/{company_id}/schedules/analysis-jobs and `expected` pins `project_ids` and each member's version (`pins`).","properties":{"attempts":{"minimum":0,"type":"integer"},"cancel_url":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"digest":{"description":"Digest of kind, scenario, input and pins. An identical active request by the same user returns the existing job.","nullable":true,"type":"string"},"error":{"nullable":true,"type":"string"},"estimate":{"additionalProperties":false,"nullable":true,"properties":{"activities":{"description":"Total activities sized (for a program, across every member project).","minimum":0,"type":"integer"},"estimated_ms":{"minimum":0,"type":"number"},"timeout_ms":{"description":"Engine child wall-clock budget for this job.","minimum":1,"type":"integer"},"units":{"description":"Activity-iterations for risk; activity-runs otherwise.","minimum":0,"type":"number"}},"required":["activities","units","estimated_ms","timeout_ms"],"type":"object"},"expected":{"additionalProperties":true,"description":"Versions, digests and scenario revision captured at enqueue; the job fails with a conflict if they changed.","nullable":true,"type":"object"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"kind":{"enum":["calculation","forensic","scenario_calculate","scenario_compression","resource_report","program","program_leveling",null],"nullable":true,"type":"string"},"max_attempts":{"minimum":1,"type":"integer"},"progress":{"description":"Coarse percent. Monte Carlo reports per-iteration progress; other kinds step at start, engine result and persistence.","maximum":100,"minimum":0,"type":"integer"},"requested_by_id":{"type":"integer"},"resource":{"additionalProperties":false,"nullable":true,"properties":{"id":{"type":"integer"},"type":{"enum":["schedule_calculation","schedule_forensic_report","schedule_scenario_run","schedule_resource_report","schedule_program_run"],"type":"string"}},"required":["type","id"],"type":"object"},"scenario_id":{"nullable":true,"type":"integer"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"enum":["queued","running","completed","failed","cancelled"],"type":"string"},"url":{"type":"string"}},"required":["id","kind","status","progress","attempts","max_attempts","error","scenario_id","expected","digest","estimate","resource","requested_by_id","created_at","started_at","finished_at","url","cancel_url"],"type":"object"},"schedule_ScheduleAssistantAnswer":{"additionalProperties":false,"properties":{"answer":{"type":"string"},"citations":{"items":{"$ref":"#/components/schemas/schedule_ScheduleAssistantFact"},"type":"array"},"context":{"additionalProperties":false,"properties":{"data_date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":["string","null"]},"engine_runs":{"description":"Bounded read-only engine runs (date trace, compare) made for this answer because no retained result covered the question. Not persisted; never edits the schedule.","items":{"additionalProperties":false,"properties":{"activity_id":{"type":["string","null"]},"baseline_version_id":{"type":["integer","null"]},"engine_revision":{"type":["string","null"]},"id":{"pattern":"^R\\d+$","type":"string"},"operation":{"enum":["date_trace","compare"],"type":"string"},"reason":{"type":["string","null"]},"status":{"enum":["computed","failed","skipped"],"type":"string"},"version_id":{"type":"integer"}},"required":["id","operation","status","version_id","activity_id","baseline_version_id","engine_revision","reason"],"type":"object"},"maxItems":3,"type":"array"},"fact_count":{"minimum":0,"type":"integer"},"intents":{"items":{"type":"string"},"type":"array"},"version":{"type":["integer","null"]},"version_id":{"type":["integer","null"]},"withheld":{"items":{"type":"string"},"type":"array"}},"required":["version_id","version","data_date","fact_count","intents","withheld"],"type":"object"},"dropped_citations":{"items":{"type":"string"},"type":"array"},"engine":{"enum":["ai"],"type":"string"},"grounded":{"description":"False when the answer cites no fact (shown as unverified).","type":"boolean"},"insufficient_data":{"type":"boolean"},"mode":{"enum":["answer","narrative"],"type":"string"},"model":{"type":"string"},"proposal":{"additionalProperties":false,"description":"A suggested what-if, validated against the base version. Not applied: save it as a scenario and adopt it explicitly.","properties":{"base_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"edits":{"items":{"type":"object"},"type":"array"},"name":{"type":"string"},"rationale":{"type":"string"},"summaries":{"items":{"type":"string"},"type":"array"}},"required":["name","rationale","base_version_id","edits","summaries"],"type":["object","null"]},"proposal_error":{"type":["string","null"]}},"required":["answer","citations","insufficient_data","grounded","dropped_citations","proposal","proposal_error","engine","model","mode","context"],"type":"object"},"schedule_ScheduleAssistantFact":{"additionalProperties":false,"properties":{"activity_ids":{"items":{"type":"string"},"type":"array"},"calculation_ids":{"items":{"type":"integer"},"type":"array"},"id":{"pattern":"^F\\d+$","type":"string"},"run_ids":{"description":"Read-only engine runs computed for this answer (see context.engine_runs); not retained.","items":{"pattern":"^R\\d+$","type":"string"},"type":"array"},"scenario_ids":{"items":{"type":"integer"},"type":"array"},"text":{"type":"string"},"topic":{"enum":["summary","finish_move","version_diff","compare","driver","trace","critical","risk","health","monte_carlo","cost","progress","scenario"],"type":"string"},"trace_ids":{"items":{"type":"integer"},"type":"array"},"version_ids":{"items":{"type":"integer"},"type":"array"}},"required":["id","topic","text","activity_ids","version_ids","calculation_ids","trace_ids","scenario_ids"],"type":"object"},"schedule_ScheduleAssistantQuestion":{"additionalProperties":false,"properties":{"mode":{"default":"answer","enum":["answer","narrative"],"type":"string"},"question":{"maxLength":1000,"minLength":3,"type":"string"}},"required":["question"],"type":"object"},"schedule_ScheduleAssistantStatus":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"hourly_limit":{"minimum":1,"type":"integer"},"model":{"type":["string","null"]},"reason":{"enum":["not_configured","company_opt_out",null],"type":["string","null"]}},"required":["enabled","reason","model","hourly_limit"],"type":"object"},"schedule_ScheduleBaselineAssignmentUpdate":{"additionalProperties":false,"minProperties":1,"properties":{"primary_baseline_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"project_baseline_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"secondary_baseline_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"tertiary_baseline_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"type":"object"},"schedule_ScheduleBaselineAssignments":{"additionalProperties":false,"properties":{"effective":{"additionalProperties":false,"description":"Slots in effect: primary falls back to the project baseline.","properties":{"primary":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"secondary":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"tertiary":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["primary","secondary","tertiary"],"type":"object"},"primary_baseline_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"project_baseline_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"project_updated_at":{"format":"date-time","nullable":true,"type":"string"},"project_updated_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"secondary_baseline_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"tertiary_baseline_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["project_baseline_id","primary_baseline_id","secondary_baseline_id","tertiary_baseline_id","effective","project_updated_by_id","project_updated_at"],"type":"object"},"schedule_ScheduleCalculationActivityDates":{"additionalProperties":true,"description":"One calculated activity row. Dates are calendar dates (YYYY-MM-DD); durations and float are working days on the activity's calendar.","properties":{"activity_id":{"description":"Activity id from the definition.","type":"string"},"actual_duration_days":{"description":"P6 ActualDuration: working days from the actual start to the actual finish, or to the data date while in progress.","nullable":true,"type":"number"},"at_completion_duration_days":{"description":"P6 AtCompletionDuration: actual + remaining duration.","nullable":true,"type":"number"},"constraint_satisfied":{"type":"boolean"},"duration_days":{"nullable":true,"type":"number"},"duration_percent_complete":{"description":"P6 DurationPercentComplete: (original - remaining) / original x 100, clamped to 0-100; 100 on completed work.","nullable":true,"type":"number"},"early_finish":{"format":"date","type":"string"},"early_start":{"format":"date","type":"string"},"explainability":{"additionalProperties":true,"description":"Why the activity sits on its dates: data date, calendar, governing predecessors, primary and secondary constraints, actual dates, and a date_basis_detail object with a plain-language explanation.","type":"object"},"finish":{"description":"Displayed finish: actual finish when recorded, otherwise early finish.","format":"date","type":"string"},"finish_float_days":{"description":"Late finish - early finish in working days (P6 Finish Float, FT_FF); null on completed work.","nullable":true,"type":"number"},"free_float_days":{"description":"Free float in working days: movement available before delaying any successor's early start.","type":"number"},"is_critical":{"description":"Critical under the definition's criticality setting.","type":"boolean"},"is_longest_path":{"description":"On the driving chain to the project finish.","type":"boolean"},"late_finish":{"format":"date","type":"string"},"late_start":{"format":"date","type":"string"},"remaining_days":{"nullable":true,"type":"number"},"remaining_early_finish":{"description":"P6 RemainingEarlyFinishDate (XER reend_date); null on completed work.","nullable":true,"type":"string"},"remaining_early_start":{"description":"P6 RemainingEarlyStartDate (XER restart_date); null on completed work.","nullable":true,"type":"string"},"remaining_float_days":{"description":"P6 RemainingFloat: remaining late finish - remaining early finish, working days; null on completed work.","nullable":true,"type":"number"},"remaining_late_finish":{"description":"P6 RemainingLateFinishDate (XER rem_late_end_date); null on completed work.","nullable":true,"type":"string"},"remaining_late_start":{"description":"P6 RemainingLateStartDate (XER rem_late_start_date); null on completed work.","nullable":true,"type":"string"},"scheduled_planned_finish":{"description":"P6 PlannedFinishDate after scheduling (XER target_end_date): the early finish of not-started work; null once started.","nullable":true,"type":"string"},"scheduled_planned_start":{"description":"P6 PlannedStartDate after scheduling (XER target_start_date): the early start of not-started work; null once started.","nullable":true,"type":"string"},"start":{"description":"Displayed start: actual start when recorded, otherwise early start.","format":"date","type":"string"},"start_float_days":{"description":"Late start - early start in working days (P6 Start Float, the FT_SS reading of total float); null on completed work.","nullable":true,"type":"number"},"status":{"description":"Activity progress status.","type":"string"},"total_float_days":{"description":"Total float in working days. Negative values mean the network cannot meet a constraint or the required finish.","type":"number"}},"type":"object"},"schedule_ScheduleCalculationLog":{"additionalProperties":false,"properties":{"calculation_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"log":{"additionalProperties":false,"properties":{"counts":{"additionalProperties":{"type":"integer"},"type":"object"},"critical_path":{"additionalProperties":false,"properties":{"critical_count":{"type":"integer"},"definition":{"type":"string"},"longest_path_count":{"type":"integer"}},"required":["definition","critical_count","longest_path_count"],"type":"object"},"data_date":{"nullable":true,"type":"string"},"dcma":{"additionalProperties":false,"description":"Offender activity ids for DCMA checks 1 (logic), 5 (hard constraints) and 9 (invalid dates), computed with the Health panel's rules","properties":{"hard_constraints":{"items":{"type":"string"},"type":"array"},"invalid_dates":{"items":{"type":"string"},"type":"array"},"logic":{"items":{"type":"string"},"type":"array"},"logic_exempt":{"items":{"type":"string"},"type":"array"}},"required":["logic","logic_exempt","hard_constraints","invalid_dates"],"type":"object"},"format":{"enum":[1],"type":"integer"},"options":{"description":"Scheduling options the calculation used (time precision, progress mode, float method, critical path definition, lag calendar, data date convention, ...)","items":{"additionalProperties":false,"properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"oneOf":[{"nullable":true,"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["key","label","value"],"type":"object"},"type":"array"},"project_finish":{"nullable":true,"type":"string"},"project_name":{"nullable":true,"type":"string"},"project_start":{"nullable":true,"type":"string"},"sections":{"items":{"additionalProperties":false,"properties":{"count":{"type":"integer"},"entries":{"items":{"additionalProperties":true,"properties":{"activity_id":{"type":"string"},"dcma_check":{"description":"DCMA 14-point check (Health panel) that names this activity as an offender","enum":[1,5,9,null],"nullable":true,"type":"integer"},"detail":{"type":"string"},"name":{"type":"string"}},"required":["activity_id","name","detail","dcma_check"],"type":"object"},"maxItems":2000,"type":"array"},"key":{"enum":["open_ends","constraints","out_of_sequence","missing_actual_start","actuals_after_data_date"],"type":"string"},"title":{"type":"string"},"truncated":{"type":"boolean"}},"required":["key","title","count","entries","truncated"],"type":"object"},"type":"array"}},"required":["format","project_name","data_date","project_start","project_finish","options","critical_path","counts","sections","dcma"],"type":"object"},"stored":{"description":"False when the calculation predates stored schedule logs; the log is then derived from the same stored definition and result","type":"boolean"},"version":{"type":"integer"},"version_id":{"type":"integer"}},"required":["calculation_id","version_id","version","created_at","stored","log"],"type":"object"},"schedule_ScheduleCalculationScheduleResult":{"additionalProperties":true,"description":"Result of operation `schedule`: forward and backward passes over the stored definition at its data date.","properties":{"activities":{"items":{"$ref":"#/components/schemas/schedule_ScheduleCalculationActivityDates"},"type":"array"},"driving_predecessors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"Map of activity id to the predecessor ids that govern its early dates.","type":"object"},"driving_set":{"description":"Every activity that drives the finish. Ties can put valid drivers outside the single longest_path chain.","items":{"type":"string"},"type":"array"},"driving_terminal":{"description":"The activity that sets the project finish.","nullable":true,"type":"string"},"excluded_relationships":{"description":"Relationships the calculation suppressed under the selected progress mode.","items":{"additionalProperties":true,"properties":{"lag_days":{"type":"number"},"predecessor_id":{"type":"string"},"successor_id":{"type":"string"},"type":{"enum":["FS","SS","FF","SF"],"type":"string"}},"type":"object"},"type":"array"},"issues":{"items":{"additionalProperties":true,"properties":{"code":{"type":"string"},"message":{"type":"string"},"remedy":{"type":"string"},"severity":{"type":"string"}},"type":"object"},"type":"array"},"longest_path":{"description":"One driving chain to the project finish, in order.","items":{"type":"string"},"type":"array"},"summary":{"additionalProperties":true,"properties":{"activity_count":{"type":"integer"},"critical_count":{"type":"integer"},"data_date":{"format":"date","type":"string"},"duration_working_days":{"type":"number"},"issue_count":{"type":"integer"},"longest_path":{"description":"Activity ids on the longest path, in order.","items":{"type":"string"},"type":"array"},"options":{"additionalProperties":true,"description":"Calculation settings that were applied.","type":"object"},"project_finish":{"format":"date","type":"string"},"project_start":{"format":"date","type":"string"},"violation_count":{"type":"integer"},"wbs_rollups":{"description":"One row per WBS node with activities in or below it (p6_fields.wbs_rollups): P6 WBS Summary* values. Start = earliest start, finish = latest finish, early/late dates the extremes of the descendants, total float the smallest descendant total float, activity counts by status.","items":{"additionalProperties":false,"properties":{"activity_count":{"description":"P6 SummaryActivityCount.","type":"integer"},"completed_count":{"description":"P6 SummaryCompletedActivityCount.","type":"integer"},"critical_count":{"type":"integer"},"early_finish":{"format":"date","nullable":true,"type":"string"},"early_start":{"format":"date","nullable":true,"type":"string"},"finish":{"format":"date","nullable":true,"type":"string"},"in_progress_count":{"description":"P6 SummaryInProgressActivityCount.","type":"integer"},"late_finish":{"format":"date","nullable":true,"type":"string"},"late_start":{"format":"date","nullable":true,"type":"string"},"not_started_count":{"description":"P6 SummaryNotStartedActivityCount.","type":"integer"},"start":{"format":"date","nullable":true,"type":"string"},"total_float_days":{"description":"Smallest total float beneath the node (P6 SummaryTotalFloat, rule unverified).","nullable":true,"type":"number"},"wbs_id":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"violations":{"items":{"additionalProperties":true,"properties":{"activity_id":{"nullable":true,"type":"string"},"detail":{"type":"string"}},"type":"object"},"type":"array"}},"title":"schedule: CPM dates, float and longest path","type":"object"},"schedule_ScheduleChangeImpactCreate":{"additionalProperties":false,"properties":{"change_event_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"duration_days":{"maximum":3650,"minimum":1,"type":"integer"},"name":{"maxLength":255,"minLength":1,"type":"string"},"note":{"maxLength":500,"type":"string"},"predecessor_id":{"maxLength":200,"minLength":1,"type":"string"},"request_id":{"format":"uuid","type":"string"},"responsibility":{"default":"owner","enum":["owner","contractor","third_party","neither","undetermined"],"type":"string"},"successor_id":{"maxLength":200,"minLength":1,"type":"string"}},"required":["change_event_id","request_id","predecessor_id","duration_days"],"type":"object"},"schedule_ScheduleChangeImpactCreated":{"additionalProperties":false,"properties":{"calculation_error":{"nullable":true,"type":"string"},"change_event_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"impacts":{"items":{"additionalProperties":false,"properties":{"activity_id":{"type":"string"},"calculated":{"nullable":true,"properties":{"activity_finish_delta_days":{"nullable":true,"type":"number"},"activity_start_delta_days":{"nullable":true,"type":"number"},"became_critical":{"items":{"type":"string"},"type":"array"},"calculated_at":{"format":"date-time","type":"string"},"current":{"type":"boolean"},"direction":{"nullable":true,"type":"string"},"path_changed":{"type":"boolean"},"project_delay_calendar_days":{"nullable":true,"type":"number"},"project_delay_working_days":{"nullable":true,"type":"number"},"project_finish_base":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"project_finish_scenario":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"result_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"run_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"scenario_revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"link_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"note":{"type":"string"},"scenario":{"additionalProperties":false,"properties":{"adopted_version_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"base_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"status":{"enum":["open","adopted","discarded"],"type":"string"}},"required":["id","name","status","revision","base_version","adopted_version_id"],"type":"object"}},"required":["link_id","activity_id","note","created_at","scenario","calculated"],"type":"object"},"type":"array"},"replayed":{"type":"boolean"},"results_visible":{"type":"boolean"},"scenario_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["change_event_id","results_visible","impacts","scenario_id","replayed","calculation_error"],"type":"object"},"schedule_ScheduleChangeImpacts":{"additionalProperties":false,"properties":{"change_event_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"impacts":{"items":{"additionalProperties":false,"properties":{"activity_id":{"type":"string"},"calculated":{"nullable":true,"properties":{"activity_finish_delta_days":{"nullable":true,"type":"number"},"activity_start_delta_days":{"nullable":true,"type":"number"},"became_critical":{"items":{"type":"string"},"type":"array"},"calculated_at":{"format":"date-time","type":"string"},"current":{"type":"boolean"},"direction":{"nullable":true,"type":"string"},"path_changed":{"type":"boolean"},"project_delay_calendar_days":{"nullable":true,"type":"number"},"project_delay_working_days":{"nullable":true,"type":"number"},"project_finish_base":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"project_finish_scenario":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"result_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"run_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"scenario_revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"link_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"note":{"type":"string"},"scenario":{"additionalProperties":false,"properties":{"adopted_version_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"base_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"status":{"enum":["open","adopted","discarded"],"type":"string"}},"required":["id","name","status","revision","base_version","adopted_version_id"],"type":"object"}},"required":["link_id","activity_id","note","created_at","scenario","calculated"],"type":"object"},"type":"array"},"results_visible":{"type":"boolean"}},"required":["change_event_id","results_visible","impacts"],"type":"object"},"schedule_ScheduleChangesSince":{"additionalProperties":false,"properties":{"changed":{"type":"boolean"},"changes":{"additionalProperties":false,"description":"version-diff.ts summarized: counts cover every change; `sample` names the first 25 activities","nullable":true,"properties":{"activities":{"additionalProperties":false,"properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"removed":{"type":"integer"}},"required":["added","removed","changed"],"type":"object"},"relationships":{"additionalProperties":false,"properties":{"added":{"type":"integer"},"removed":{"type":"integer"}},"required":["added","removed"],"type":"object"},"sample":{"items":{"additionalProperties":false,"properties":{"change":{"enum":["added","removed","changed"],"type":"string"},"fields":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name","change","fields"],"type":"object"},"type":"array"},"sections":{"items":{"type":"string"},"type":"array"},"total_changes":{"type":"integer"},"truncated":{"type":"boolean"}},"required":["activities","relationships","sections","total_changes","sample","truncated"],"type":"object"},"comments_since":{"type":"integer"},"first_visit":{"type":"boolean"},"head":{"additionalProperties":false,"nullable":true,"properties":{"saved_at":{"format":"date-time","type":"string"},"saved_by":{"additionalProperties":false,"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"version":{"type":"integer"},"version_id":{"type":"integer"}},"required":["version_id","version","saved_at","saved_by"],"type":"object"},"last_seen":{"additionalProperties":false,"nullable":true,"properties":{"seen_at":{"format":"date-time","type":"string"},"version":{"type":"integer"},"version_id":{"type":"integer"}},"required":["version_id","version","seen_at"],"type":"object"},"versions":{"items":{"additionalProperties":false,"properties":{"saved_at":{"format":"date-time","type":"string"},"saved_by":{"additionalProperties":false,"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"title":{"type":"string"},"version":{"type":"integer"},"version_id":{"type":"integer"}},"required":["version_id","version","saved_at","saved_by","title"],"type":"object"},"type":"array"}},"required":["head","last_seen","first_visit","changed","versions","changes","comments_since"],"type":"object"},"schedule_ScheduleCommentCreate":{"additionalProperties":false,"description":"A new thread names `activity_id` (an activity of the saved head); a reply names `parent_id` (a thread root) and inherits its activity and privacy.","properties":{"activity_id":{"maxLength":200,"minLength":1,"type":"string"},"body":{"description":"Plain text; @Full Name or @email mentions notify people with Schedule access to the activity","maxLength":5000,"minLength":1,"type":"string"},"parent_id":{"minimum":1,"type":"integer"},"private":{"default":false,"description":"Visible to you only; never mentions or notifies anyone","type":"boolean"}},"required":["body"],"type":"object"},"schedule_ScheduleCommentList":{"additionalProperties":false,"properties":{"activity_id":{"nullable":true,"type":"string"},"activity_in_plan":{"description":"Whether the activity is in the saved head (null without activity_id)","nullable":true,"type":"boolean"},"can_comment":{"type":"boolean"},"counts":{"additionalProperties":false,"properties":{"open":{"type":"integer"},"resolved":{"type":"integer"},"total":{"type":"integer"}},"required":["open","resolved","total"],"type":"object"},"status":{"enum":["open","resolved","all"],"type":"string"},"threads":{"items":{"$ref":"#/components/schemas/schedule_ScheduleCommentThread"},"type":"array"}},"required":["activity_id","activity_in_plan","status","threads","counts","can_comment"],"type":"object"},"schedule_ScheduleCommentThread":{"additionalProperties":false,"properties":{"activity_id":{"type":"string"},"author":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"body":{"type":"string"},"can_delete":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_resolve":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"deleted":{"type":"boolean"},"edited_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"mentions":{"items":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"parent_id":{"nullable":true,"type":"integer"},"private":{"type":"boolean"},"replies":{"items":{"$ref":"#/components/schemas/schedule_ScheduleActivityComment"},"type":"array"},"resolved":{"type":"boolean"},"resolved_at":{"format":"date-time","nullable":true,"type":"string"},"resolved_by":{"additionalProperties":false,"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"updated_at":{"format":"date-time","type":"string"},"version_id":{"nullable":true,"type":"integer"}},"required":["id","activity_id","parent_id","body","private","mentions","version_id","author","created_at","updated_at","edited_at","resolved","resolved_at","resolved_by","deleted","can_edit","can_delete","can_resolve","replies"],"type":"object"},"schedule_ScheduleCommentUpdate":{"additionalProperties":false,"minProperties":1,"properties":{"body":{"description":"Your own comments only","maxLength":5000,"minLength":1,"type":"string"},"resolved":{"description":"Thread roots only","type":"boolean"}},"type":"object"},"schedule_ScheduleCommitmentInput":{"additionalProperties":false,"properties":{"activity_id":{"description":"An activity of the project's current saved schedule that you can see. A week that has ended may also name an activity of the schedule as it stood that week.","maxLength":512,"minLength":1,"type":"string"},"description":{"maxLength":500,"minLength":1,"type":"string"},"notes":{"maxLength":2000,"type":"string"},"planned_quantity":{"minimum":0,"nullable":true,"type":"number"},"trade":{"description":"The trade or crew making the promise. Omitted: prefilled from the activity's trade field, else its trade-like activity code (Trade, Crew, Subcontractor, Responsibility, Discipline); 422 when it has neither.","maxLength":120,"minLength":1,"type":"string"},"unit":{"maxLength":40,"type":"string"}},"required":["activity_id","description"],"type":"object"},"schedule_ScheduleCompareActivity":{"additionalProperties":true,"properties":{"baseline_finish":{"format":"date","nullable":true,"type":"string"},"baseline_start":{"format":"date","nullable":true,"type":"string"},"code":{"nullable":true,"type":"string"},"current_finish":{"format":"date","nullable":true,"type":"string"},"current_start":{"format":"date","nullable":true,"type":"string"},"finish_delta_days":{"nullable":true,"type":"number"},"float_delta_days":{"description":"Current total float minus baseline total float.","nullable":true,"type":"number"},"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"start_delta_days":{"nullable":true,"type":"number"},"status":{"description":"added, removed, unchanged, or a comma-separated list of change kinds: renamed, duration_changed, date_shifted, relogicked, constraint_changed, calendar_changed, progress_added, criticality_changed.","type":"string"}},"type":"object"},"schedule_ScheduleCompareResult":{"additionalProperties":true,"description":"Result of operation `compare`: activity-by-activity differences between the baseline version and the current version, each calculated on its own stored data date. Relationship changes come from POST /versions/diff, not from this result.","properties":{"activities":{"items":{"$ref":"#/components/schemas/schedule_ScheduleCompareActivity"},"type":"array"},"ambiguous_matches":{"description":"Activities that could not be matched one-to-one.","items":{},"type":"array"},"baseline_finish":{"format":"date","nullable":true,"type":"string"},"criticality_gained":{"description":"Activities critical now but not in the baseline.","items":{"type":"string"},"type":"array"},"criticality_lost":{"description":"Activities critical in the baseline but not now.","items":{"type":"string"},"type":"array"},"current_finish":{"format":"date","nullable":true,"type":"string"},"finish_delta_days":{"description":"Calendar days the project finish moved; positive is later.","nullable":true,"type":"integer"},"finish_move_explanation":{"description":"Plain-language explanation of why the finish moved.","type":"string"},"match_key":{"description":"How activities were matched.","enum":["id","code","name_and_wbs"],"type":"string"}},"title":"compare: version against a baseline","type":"object"},"schedule_ScheduleConstraintLookahead":{"additionalProperties":false,"properties":{"activities":{"items":{"additionalProperties":false,"properties":{"activity":{"$ref":"#/components/schemas/schedule_ScheduleLinkActivity"},"at_risk":{"type":"integer"},"links":{"items":{"$ref":"#/components/schemas/schedule_ScheduleActivityLink"},"type":"array"},"open_constraints":{"type":"integer"},"ready":{"type":"boolean"},"restricted_constraints":{"description":"Linked items the caller cannot open (Schedule admins only; otherwise 0).","type":"integer"}},"required":["activity","links","open_constraints","at_risk","restricted_constraints","ready"],"type":"object"},"type":"array"},"schedule":{"$ref":"#/components/schemas/schedule_ScheduleLinkScheduleSummary"},"totals":{"additionalProperties":false,"properties":{"activities":{"type":"integer"},"at_risk":{"type":"integer"},"constrained":{"type":"integer"},"ready":{"type":"integer"}},"required":["activities","constrained","ready","at_risk"],"type":"object"},"window":{"additionalProperties":false,"properties":{"from":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"to":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"weeks":{"type":"integer"}},"required":["from","to","weeks"],"type":"object"}},"required":["schedule","window","totals","activities"],"type":"object"},"schedule_ScheduleConversionCandidate":{"additionalProperties":false,"properties":{"activity_id":{"type":"string"},"existing_binding_id":{"minimum":1,"nullable":true,"type":"integer"},"preserve":{"additionalProperties":false,"properties":{"assigned_id":{"minimum":1,"nullable":true,"type":"integer"},"private":{"type":"boolean"},"references":{"items":{"$ref":"#/components/schemas/schedule_ScheduleConversionReference"},"type":"array"}},"required":["private","assigned_id","references"],"type":"object"},"source_uid":{"type":"string"},"task_id":{"minimum":1,"type":"integer"}},"required":["task_id","source_uid","activity_id","existing_binding_id","preserve"],"type":"object"},"schedule_ScheduleConversionInventory":{"additionalProperties":false,"properties":{"blockers":{"items":{"type":"string"},"type":"array"},"candidates":{"items":{"$ref":"#/components/schemas/schedule_ScheduleConversionCandidate"},"type":"array"},"canonical_issues":{"items":{"additionalProperties":false,"properties":{"activity_id":{"nullable":true,"type":"string"},"index":{"minimum":0,"type":"integer"},"reason":{"type":"string"}},"required":["index","activity_id","reason"],"type":"object"},"type":"array"},"company_id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"read_only":{"enum":[true],"type":"boolean"},"rows":{"items":{"$ref":"#/components/schemas/schedule_ScheduleConversionRow"},"type":"array"},"selected_import_id":{"minimum":1,"type":"integer"},"selected_import_is_current":{"type":"boolean"},"unmapped_activity_ids":{"items":{"type":"string"},"type":"array"},"unresolved_bindings":{"items":{"additionalProperties":false,"properties":{"company_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"source_uid":{"type":"string"},"task_id":{"minimum":1,"type":"integer"}},"required":["id","company_id","project_id","source_uid","task_id"],"type":"object"},"type":"array"},"unresolved_references":{"items":{"$ref":"#/components/schemas/schedule_ScheduleConversionReference"},"type":"array"}},"required":["read_only","company_id","project_id","selected_import_id","selected_import_is_current","blockers","canonical_issues","rows","candidates","unmapped_activity_ids","unresolved_references","unresolved_bindings"],"type":"object"},"schedule_ScheduleConversionReference":{"additionalProperties":false,"properties":{"company_id":{"minimum":1,"type":"integer"},"current":{"type":"boolean"},"private":{"type":"boolean"},"project_id":{"minimum":1,"type":"integer"},"record_id":{"minimum":1,"type":"integer"},"record_type":{"type":"string"},"task_id":{"minimum":1,"type":"integer"}},"required":["company_id","project_id","record_type","record_id","task_id","private","current"],"type":"object"},"schedule_ScheduleConversionRow":{"additionalProperties":false,"properties":{"assigned_id":{"minimum":1,"nullable":true,"type":"integer"},"binding_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"candidate":{"additionalProperties":false,"nullable":true,"properties":{"activity_id":{"type":"string"},"existing_binding_id":{"minimum":1,"nullable":true,"type":"integer"},"preserve":{"additionalProperties":false,"properties":{"assigned_id":{"minimum":1,"nullable":true,"type":"integer"},"private":{"type":"boolean"},"references":{"items":{"$ref":"#/components/schemas/schedule_ScheduleConversionReference"},"type":"array"}},"required":["private","assigned_id","references"],"type":"object"},"source_uid":{"type":"string"},"task_id":{"minimum":1,"type":"integer"}},"required":["task_id","source_uid","activity_id","existing_binding_id","preserve"],"type":"object"},"current":{"type":"boolean"},"import_id":{"minimum":1,"nullable":true,"type":"integer"},"private":{"type":"boolean"},"reasons":{"items":{"type":"string"},"type":"array"},"references":{"items":{"$ref":"#/components/schemas/schedule_ScheduleConversionReference"},"type":"array"},"source_uid":{"nullable":true,"type":"string"},"task_id":{"minimum":1,"type":"integer"}},"required":["task_id","import_id","source_uid","current","private","assigned_id","binding_ids","references","reasons","candidate"],"type":"object"},"schedule_ScheduleCostAccountMappingInput":{"additionalProperties":false,"properties":{"expected_revision":{"description":"0 when no mapping set exists yet","maximum":2147483647,"minimum":0,"type":"integer"},"mappings":{"description":"The complete set; one cost code per account (by account id, else name)","items":{"additionalProperties":false,"properties":{"account_id":{"maxLength":512,"nullable":true,"type":"string"},"account_name":{"maxLength":512,"type":"string"},"cost_code_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["account_id","account_name","cost_code_id"],"type":"object"},"maxItems":5000,"type":"array"},"reason":{"maxLength":500,"type":"string"}},"required":["expected_revision","mappings"],"type":"object"},"schedule_ScheduleCostAccountMappingSet":{"additionalProperties":false,"properties":{"accounts":{"description":"Cost accounts used by the head version's expenses and assignments, with schedule amounts","items":{"additionalProperties":true,"properties":{"account_id":{"nullable":true,"type":"string"},"assignment":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"},"assignment_count":{"type":"integer"},"expense":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"},"expense_items":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"parent_key":{"nullable":true,"type":"string"}},"required":["key","account_id","name","parent_key","expense_items","assignment_count","expense","assignment"],"type":"object"},"type":"array"},"cost_codes":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","code","name"],"type":"object"},"type":"array"},"diff":{"additionalProperties":false,"properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"removed":{"type":"integer"}},"required":["added","removed","changed"],"type":"object"},"head_revision":{"type":"integer"},"ledger_writes":{"enum":[false],"type":"boolean"},"mapping_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"account_id":{"maxLength":512,"nullable":true,"type":"string"},"account_name":{"maxLength":512,"type":"string"},"cost_code_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["account_id","account_name","cost_code_id"],"type":"object"},"type":"array"},"revision":{"type":"integer"},"revisions":{"items":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","nullable":true,"type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"mapping_count":{"type":"integer"},"revision":{"type":"integer"}},"required":["revision","mapping_count","created_at","created_by_id"],"type":"object"},"type":"array"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"updated_by_id":{"nullable":true,"type":"integer"},"version_id":{"nullable":true,"type":"integer"}},"required":["revision","head_revision","updated_by_id","updated_at","mapping_digest","mappings","ledger_writes"],"type":"object"},"schedule_ScheduleCostDashboard":{"properties":{"ac_basis":{"description":"earned_value_proxy: AC equals EV and is not an actual cost.","enum":["ledger_job_cost","earned_value_proxy"],"type":"string"},"activities":{"items":{"properties":{"ac":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bac":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"code":{"nullable":true,"type":"string"},"cpi":{"nullable":true,"type":"number"},"cv":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ev":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"finish":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"fraction":{"type":"number"},"id":{"type":"string"},"milestone":{"type":"boolean"},"name":{"type":"string"},"performance_percent_complete":{"description":"Percent (0-100) earned under the earned value technique","type":"number"},"pv":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"sources":{"items":{"type":"string"},"type":"array"},"start":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"type":"object"},"type":"array"},"actuals_unavailable_reason":{"enum":["token_lacks_accounting_read","accounting_access_denied","not_readable",null],"nullable":true,"type":"string"},"analysis_revision":{"type":"string"},"baseline":{"nullable":true,"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"type":"object"},"baselines":{"items":{"type":"object"},"type":"array"},"bucket":{"enum":["month","week"],"type":"string"},"budget_lines":{"items":{"type":"object"},"type":"array"},"commitments":{"description":"null when Commitments are not visible.","items":{"type":"object"},"nullable":true,"type":"array"},"cost_account_mappings":{"additionalProperties":false,"properties":{"count":{"type":"integer"},"mapping_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"revision":{"type":"integer"}},"required":["revision","mapping_digest","count"],"type":"object"},"data_date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"earned_value_options":{"additionalProperties":false,"description":"The project's P6 earned value technique (performance % complete) and ETC technique (Settings › Earned value). WBS elements may override them per activity.","nullable":true,"properties":{"etc_technique":{"enum":["remaining_cost","pf_1","pf_cpi","pf_cpi_spi","pf_custom"],"type":"string"},"performance_factor":{"exclusiveMinimum":0,"type":"number"},"technique":{"enum":["activity_percent_complete","zero_one_hundred","fifty_fifty","custom_percent","wbs_milestones","resource_curves"],"type":"string"},"user_percent":{"maximum":100,"minimum":0,"type":"number"}},"required":["technique","user_percent","etc_technique","performance_factor"],"type":"object"},"exceptions":{"properties":{"stale_mappings":{"items":{"type":"object"},"type":"array"},"unmapped_activities":{"items":{"type":"object"},"type":"array"},"unmapped_actuals":{"items":{"type":"object"},"nullable":true,"type":"array"},"unmapped_budget":{"items":{"type":"object"},"type":"array"},"unmapped_commitments":{"items":{"type":"object"},"nullable":true,"type":"array"}},"type":"object"},"expense_reconciliation":{"additionalProperties":false,"description":"P6 expenses and assignment costs by cost code (through cost account mappings) beside the Budget view. Each item is counted once; nothing is added to Budget totals, BAC or ledger actuals.","properties":{"accounts":{"items":{"additionalProperties":true,"properties":{"account_id":{"nullable":true,"type":"string"},"assignment":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"},"assignment_count":{"type":"integer"},"cost_code_id":{"type":"integer"},"expense":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"},"expense_items":{"type":"integer"},"inherited":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"parent_key":{"nullable":true,"type":"string"},"via":{"type":"string"}},"required":["key","account_id","name","parent_key","expense_items","assignment_count","expense","assignment"],"type":"object"},"type":"array"},"policy":{"additionalProperties":false,"properties":{"added_to_budget":{"enum":[false],"type":"boolean"},"basis":{"type":"string"},"counted_once":{"enum":[true],"type":"boolean"},"in_bac":{"enum":[false],"type":"boolean"},"ledger_writes":{"enum":[false],"type":"boolean"}},"required":["counted_once","in_bac","added_to_budget","ledger_writes","basis"],"type":"object"},"rows":{"items":{"additionalProperties":false,"properties":{"accounts":{"items":{"type":"string"},"type":"array"},"assignment":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"},"budget_direct_costs":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget_revised":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cost_code":{"nullable":true,"type":"string"},"cost_code_id":{"type":"integer"},"cost_code_name":{"nullable":true,"type":"string"},"expense":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"},"schedule_at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"variance_to_budget":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["cost_code_id","cost_code","cost_code_name","budget_revised","budget_direct_costs","expense","assignment","schedule_at_completion","variance_to_budget","accounts"],"type":"object"},"type":"array"},"totals":{"additionalProperties":false,"properties":{"mapped":{"additionalProperties":false,"properties":{"assignment":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"},"expense":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"}},"required":["expense","assignment"],"type":"object"},"schedule":{"additionalProperties":false,"properties":{"assignment":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"},"expense":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"}},"required":["expense","assignment"],"type":"object"},"unmapped":{"additionalProperties":false,"properties":{"assignment":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"},"expense":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"}},"required":["expense","assignment"],"type":"object"}},"required":["schedule","mapped","unmapped"],"type":"object"},"unmapped_accounts":{"items":{"additionalProperties":true,"properties":{"account_id":{"nullable":true,"type":"string"},"assignment":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"},"assignment_count":{"type":"integer"},"expense":{"additionalProperties":false,"properties":{"actual":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["budgeted","actual","remaining","at_completion"],"type":"object"},"expense_items":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"parent_key":{"nullable":true,"type":"string"},"reason":{"enum":["not_mapped","cost_code_missing"],"type":"string"}},"required":["key","account_id","name","parent_key","expense_items","assignment_count","expense","assignment"],"type":"object"},"type":"array"}},"required":["accounts","unmapped_accounts","rows","totals","policy"],"type":"object"},"expenses":{"description":"Schedule-side activity expenses (P6 expense items, XER PROJCOST): totals, per cost account, per activity and time-phased by accrual type. Reported beside the ledger budget and never added to BAC.","properties":{"activities":{"items":{"properties":{"actual":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"code":{"nullable":true,"type":"string"},"id":{"type":"string"},"items":{"type":"integer"},"name":{"type":"string"},"remaining":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"type":"object"},"type":"array"},"basis":{"enum":["schedule_expenses_not_in_bac"],"type":"string"},"by_cost_account":{"items":{"properties":{"actual":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cost_account":{"nullable":true,"type":"string"},"items":{"type":"integer"},"remaining":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"type":"object"},"type":"array"},"items":{"minimum":0,"type":"integer"},"periods":{"items":{"properties":{"forecast":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"period":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"planned":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"planned_cumulative":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"type":"object"},"type":"array"},"totals":{"properties":{"actual":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"at_completion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budgeted":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"remaining":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"variance":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"type":"object"},"undated_activity_ids":{"items":{"type":"string"},"type":"array"}},"required":["items","basis","totals","by_cost_account","activities","periods","undated_activity_ids"],"type":"object"},"flags":{"type":"object"},"latest_budget_report":{"nullable":true,"type":"object"},"mappings":{"$ref":"#/components/schemas/schedule_ScheduleCostMappingSet"},"metrics":{"properties":{"ac":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bac":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cpi":{"nullable":true,"type":"number"},"cv":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"eac":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"eac_method":{"description":"budget_proxy without readable actuals; otherwise the project's ETC technique (EAC = AC + ETC)","enum":["bac_over_cpi","budget_proxy","remaining_cost","pf_1","pf_cpi","pf_cpi_spi","pf_custom",null],"nullable":true,"type":"string"},"etc":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ev":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"percent_complete":{"nullable":true,"type":"number"},"percent_spent":{"nullable":true,"type":"number"},"performance_factor":{"description":"PF applied to (BAC - EV); null for remaining cost","nullable":true,"type":"number"},"pv":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"spi":{"nullable":true,"type":"number"},"sv":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"tcpi":{"nullable":true,"type":"number"},"vac":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"withheld":{"additionalProperties":{"type":"string"},"description":"Metric name to the reason it is null or a proxy.","type":"object"}},"type":"object"},"periods":{"items":{"properties":{"ac":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ac_all":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ac_cumulative":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ac_proxy_cumulative":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"after_data_date":{"type":"boolean"},"cash_cumulative":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ev":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ev_cumulative":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_committed":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"period":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"pv":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pv_cumulative":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"type":"object"},"type":"array"},"pv_basis":{"enum":["baseline","current_schedule"],"type":"string"},"sources":{"description":"Read interval, owners, digests, currency and the mapping/phasing qualification. ledger_writes is always false.","type":"object"},"stored_periods":{"description":"Stored period performance (effective run per financial period, in date order): the recorded period series of actual this period, EV and PV","items":{"$ref":"#/components/schemas/schedule_SchedulePeriodPerformanceRun"},"type":"array"},"totals":{"properties":{"ac":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ac_all_to_date":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ac_proxy":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ac_unmapped_to_date":{"description":"Exact decimal amount (two fractional digits).","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"actual_coverage":{"nullable":true,"type":"number"},"actual_entries_after_data_date":{"type":"integer"},"bac":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget_coverage":{"nullable":true,"type":"number"},"budget_revised_total":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget_unmapped":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"ev":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_committed_remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_remaining":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pv":{"description":"Exact decimal amount (two fractional digits).","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"type":"object"},"version":{"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version","digest","calculation_id","engine_revision"],"type":"object"}},"required":["analysis_revision","version","data_date","bucket","pv_basis","ac_basis","totals","metrics","periods","activities","exceptions","mappings","sources"],"type":"object"},"schedule_ScheduleCostMapping":{"discriminator":{"propertyName":"source_type"},"oneOf":[{"additionalProperties":false,"properties":{"activity_id":{"maxLength":512,"minLength":1,"type":"string"},"allocation_basis_points":{"maximum":10000,"minimum":1,"type":"integer"},"budget_line_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["budget_line"],"type":"string"}},"required":["source_type","activity_id","budget_line_id","allocation_basis_points"],"type":"object"},{"additionalProperties":false,"properties":{"activity_id":{"maxLength":512,"minLength":1,"type":"string"},"allocation_basis_points":{"maximum":10000,"minimum":1,"type":"integer"},"commitment_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"commitment_type":{"enum":["WorkOrderContract","PurchaseOrderContract"],"type":"string"},"source_type":{"enum":["commitment"],"type":"string"}},"required":["source_type","activity_id","commitment_type","commitment_id","allocation_basis_points"],"type":"object"}]},"schedule_ScheduleCostMappingSave":{"additionalProperties":false,"properties":{"expected_revision":{"maximum":2147483647,"minimum":0,"type":"integer"},"mappings":{"items":{"$ref":"#/components/schemas/schedule_ScheduleCostMapping"},"maxItems":5000,"type":"array"},"reason":{"description":"Recorded on the audit event.","maxLength":500,"type":"string"}},"required":["expected_revision","mappings"],"type":"object"},"schedule_ScheduleCostMappingSet":{"properties":{"diff":{"description":"Present on save responses.","properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"removed":{"type":"integer"}},"type":"object"},"mapping_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mappings":{"items":{"$ref":"#/components/schemas/schedule_ScheduleCostMapping"},"type":"array"},"revision":{"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"updated_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["revision","updated_by_id","updated_at","mapping_digest","mappings"],"type":"object"},"schedule_ScheduleDateTrace":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"parameters":{"$ref":"#/components/schemas/schedule_ScheduleDateTraceSelection"},"report":{"$ref":"#/components/schemas/schedule_ScheduleDateTraceEvidence"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","created_by_id","created_at","input_digest","parameters","report"],"type":"object"},"schedule_ScheduleDateTraceBound":{"additionalProperties":false,"properties":{"completed_remaining_bound":{"type":"boolean"},"driving":{"type":"boolean"},"fixed_history":{"type":"boolean"},"future_actual_ignored":{"type":"boolean"},"lag_calendar_id":{"nullable":true,"type":"string"},"lag_calendar_role":{"type":"string"},"lag_charged":{"type":"number"},"lag_days":{"type":"number"},"permits":{"nullable":true,"type":"string"},"predecessor":{"type":"string"},"predecessor_finish":{"nullable":true,"type":"string"},"predecessor_label":{"type":"string"},"predecessor_start":{"nullable":true,"type":"string"},"relation":{"type":"string"},"successor":{"type":"string"},"successor_label":{"type":"string"}},"required":["predecessor","successor","predecessor_label","successor_label","relation","lag_calendar_role","lag_days","lag_charged","lag_calendar_id","predecessor_start","predecessor_finish","permits","driving","fixed_history","future_actual_ignored","completed_remaining_bound"],"type":"object"},"schedule_ScheduleDateTraceEvidence":{"additionalProperties":false,"properties":{"activity":{"type":"string"},"calculation":{"additionalProperties":false,"properties":{"basis":{"enum":["recomputed_from_supplied_definition"],"type":"string"},"data_date":{"type":"string"},"dates_applied":{"enum":[false],"type":"boolean"},"engine":{"enum":["cpmcore"],"type":"string"},"excluded_relationships":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"issues":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"options":{"additionalProperties":true,"type":"object"},"precision":{"enum":["days","working_minutes"],"type":"string"},"requested_data_date":{"nullable":true,"type":"string"},"violations":{"items":{"additionalProperties":false,"properties":{"activity_id":{"nullable":true,"type":"string"},"detail":{"type":"string"}},"required":["activity_id","detail"],"type":"object"},"type":"array"}},"required":["engine","requested_data_date","data_date","basis","options","precision","issues","violations","excluded_relationships","dates_applied"],"type":"object"},"calendar_id":{"type":"string"},"chain_size":{"nullable":true,"type":"number"},"deadline":{"nullable":true,"type":"string"},"deadline_gap_days":{"nullable":true,"type":"number"},"deadline_is_stated":{"type":"boolean"},"driver_labels":{"items":{"type":"string"},"type":"array"},"drives_label":{"nullable":true,"type":"string"},"driving_set_size":{"nullable":true,"type":"number"},"in_driving_set":{"type":"boolean"},"label":{"type":"string"},"late_start":{"nullable":true,"type":"string"},"on_longest_path":{"type":"boolean"},"onward":{"items":{"$ref":"#/components/schemas/schedule_ScheduleDateTraceStep"},"type":"array"},"project_finish":{"type":"string"},"reaches_completion":{"type":"boolean"},"status":{"enum":["computed"],"type":"string"},"terminal_activity":{"nullable":true,"type":"string"},"terminal_label":{"nullable":true,"type":"string"},"to_activity":{"items":{"$ref":"#/components/schemas/schedule_ScheduleDateTraceStep"},"type":"array"},"total_float_days":{"nullable":true,"type":"number"},"total_float_finish_days":{"nullable":true,"type":"number"},"why_critical":{"type":"string"},"zero_float_size":{"nullable":true,"type":"number"},"zero_total_float":{"nullable":true,"type":"boolean"}},"required":["activity","label","project_finish","calendar_id","why_critical","terminal_activity","terminal_label","late_start","deadline","drives_label","on_longest_path","in_driving_set","reaches_completion","deadline_is_stated","zero_total_float","total_float_days","total_float_finish_days","deadline_gap_days","chain_size","driving_set_size","zero_float_size","driver_labels","to_activity","onward","status","calculation"],"type":"object"},"schedule_ScheduleDateTraceHistory":{"additionalProperties":false,"properties":{"next_before_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"traces":{"items":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","created_by_id","created_at"],"type":"object"},"type":"array"}},"required":["traces","next_before_id"],"type":"object"},"schedule_ScheduleDateTraceSelection":{"additionalProperties":false,"properties":{"activity_id":{"maxLength":512,"minLength":1,"type":"string"},"data_date":{"format":"date","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","activity_id"],"type":"object"},"schedule_ScheduleDateTraceStep":{"additionalProperties":false,"properties":{"activity":{"type":"string"},"calendar_id":{"type":"string"},"date_basis":{"type":"string"},"date_status":{"type":"string"},"drivers":{"items":{"$ref":"#/components/schemas/schedule_ScheduleDateTraceBound"},"type":"array"},"early_finish":{"nullable":true,"type":"string"},"early_finish_at":{"nullable":true,"type":"string"},"early_start":{"nullable":true,"type":"string"},"early_start_at":{"nullable":true,"type":"string"},"label":{"type":"string"},"note":{"type":"string"},"origin":{"type":"string"},"others":{"items":{"$ref":"#/components/schemas/schedule_ScheduleDateTraceBound"},"type":"array"},"total_float_days":{"nullable":true,"type":"number"}},"required":["activity","label","calendar_id","origin","date_basis","date_status","note","early_start","early_finish","early_start_at","early_finish_at","total_float_days","drivers","others"],"type":"object"},"schedule_ScheduleEarnedResult":{"additionalProperties":true,"description":"Result of operation `earned`: Earned Schedule of the current version, measured against the baseline version's calculated dates, in working days.","properties":{"actual_time_days":{"description":"AT: working days from baseline start to the data date.","type":"number"},"baseline_duration_days":{"type":"number"},"data_date":{"format":"date","nullable":true,"type":"string"},"earned_days":{"description":"ES: the point in the baseline at which the work performed to date was planned to be done.","type":"number"},"earned_duration_days":{"type":"number"},"earned_duration_per_actual_day":{"description":"Earned duration-days summed over activities divided by actual_time_days: a throughput figure, not a schedule index (formerly published as spi_t).","nullable":true,"type":"number"},"ieac_t_days":{"description":"IEAC(t) = planned_duration_days / SPI(t): Lipke's independent estimate of the duration at completion, in working days from the baseline start.","nullable":true,"type":"number"},"planned_duration_days":{"description":"PD: baseline planned duration.","type":"number"},"spi_t":{"description":"SPI(t) = ES / AT (earned_days / actual_time_days); below 1 is behind; null before any elapsed time. Results stored before spi_t_basis existed carried earned_duration_days / actual_time_days here instead; derive ES / AT for those.","nullable":true,"type":"number"},"spi_t_basis":{"description":"The definition used for spi_t: \"ES / AT (earned_days / actual_time_days)\". Absent on results stored before the fix.","type":"string"},"sv_t_days":{"description":"SV(t) = ES - AT in working days; negative is behind.","nullable":true,"type":"number"}},"title":"earned: Earned Schedule against a baseline","type":"object"},"schedule_ScheduleEarnedValue":{"additionalProperties":false,"properties":{"earned_value":{"additionalProperties":false,"properties":{"activities":{"additionalProperties":{"additionalProperties":false,"properties":{"accounting_variance":{"description":"P6 AccountingVariance: BCWS - ACWP; negative when actual cost exceeds the scheduled cost.","nullable":true,"type":"number"},"acwp":{"nullable":true,"type":"number"},"bac":{"nullable":true,"type":"number"},"bcwp":{"nullable":true,"type":"number"},"bcws":{"nullable":true,"type":"number"},"cost_percent_of_planned":{"description":"P6 CostPercentOfPlanned: actual total cost / BL planned total cost x 100; can exceed 100.","nullable":true,"type":"number"},"cpi":{"nullable":true,"type":"number"},"cv":{"nullable":true,"type":"number"},"cvi":{"description":"P6 CostVarianceIndex: CV / BCWP.","nullable":true,"type":"number"},"duration_percent_of_planned":{"description":"P6 DurationPercentOfPlanned: actual duration / BL at completion duration x 100; can exceed 100.","nullable":true,"type":"number"},"eac":{"nullable":true,"type":"number"},"etc":{"description":"Estimate to complete under the activity's ETC technique","nullable":true,"type":"number"},"labor_units":{"additionalProperties":false,"description":"The labor-units earned value family (P6 *LaborUnits fields). Null when the activity is not in the project baseline.","nullable":true,"properties":{"accounting_variance_labor_units":{"description":"P6 AccountingVarianceLaborUnits: PV labor units - actual units.","nullable":true,"type":"number"},"actual_labor_units":{"description":"Actual labor units.","type":"number"},"bac_labor_units":{"description":"BL labor units: the project baseline's planned labor units (the activity's own without a baseline).","type":"number"},"cpi_labor_units":{"description":"P6 CostPerformanceIndexLaborUnits: EV labor units / actual labor units.","nullable":true,"type":"number"},"cv_labor_units":{"description":"P6 CostVarianceLaborUnits: EV labor units - actual units.","type":"number"},"cvi_labor_units":{"description":"P6 CostVarianceIndexLaborUnits: CV / EV labor units.","nullable":true,"type":"number"},"eac_labor_units":{"description":"P6 EstimateAtCompletionLaborUnits: actual + ETC labor units.","type":"number"},"etc_labor_units":{"description":"P6 EstimateToCompleteLaborUnits: remaining labor units, or PF x (BL labor units - EV) under the ETC technique.","type":"number"},"ev_labor_units":{"description":"P6 EarnedValueLaborUnits: BL labor units x performance % complete.","type":"number"},"performance_percent_complete_by_labor_units":{"description":"P6 PerformancePercentCompleteByLaborUnits: EV / BL labor units x 100 (0-100).","type":"number"},"pv_labor_units":{"description":"P6 PlannedValueLaborUnits: BL labor units x schedule share at the data date, phased like BCWS.","nullable":true,"type":"number"},"spi_labor_units":{"description":"P6 SchedulePerformanceIndexLaborUnits: EV / PV labor units.","nullable":true,"type":"number"},"sv_labor_units":{"description":"P6 ScheduleVarianceLaborUnits: EV - PV labor units.","nullable":true,"type":"number"},"svi_labor_units":{"description":"P6 ScheduleVarianceIndexLaborUnits: SV / PV labor units.","nullable":true,"type":"number"},"vac_labor_units":{"description":"P6 AtCompletionLaborUnitsVariance: BL labor units - EAC labor units.","type":"number"}},"type":"object"},"note":{"nullable":true,"type":"string"},"percents":{"additionalProperties":false,"description":"Cost and units percents complete (0-100); 0 for an empty bucket, as P6 stores.","nullable":true,"properties":{"cost_percent_complete":{"description":"P6 CostPercentComplete: actual total cost / at completion total cost x 100 (0-100).","type":"number"},"expense_cost_percent_complete":{"description":"Actual / at completion expense cost x 100.","type":"number"},"labor_cost_percent_complete":{"description":"Actual / at completion labor cost x 100.","type":"number"},"labor_units_percent_complete":{"description":"P6 LaborUnitsPercentComplete: actual / at completion labor units x 100.","type":"number"},"material_cost_percent_complete":{"description":"Actual / at completion material cost x 100.","type":"number"},"nonlabor_cost_percent_complete":{"description":"Actual / at completion nonlabor cost x 100.","type":"number"},"nonlabor_units_percent_complete":{"description":"P6 NonLaborUnitsPercentComplete: actual / at completion nonlabor units x 100.","type":"number"}},"type":"object"},"performance_percent_complete":{"description":"Percent (0-100) earned under the activity's earned value technique","nullable":true,"type":"number"},"spi":{"nullable":true,"type":"number"},"sv":{"nullable":true,"type":"number"},"svi":{"description":"P6 ScheduleVarianceIndex: SV / BCWS.","nullable":true,"type":"number"},"tcpi":{"description":"P6 ToCompletePerformanceIndex: (BAC - BCWP) / (EAC - ACWP).","nullable":true,"type":"number"},"vac":{"nullable":true,"type":"number"},"variances":{"additionalProperties":false,"description":"BL planned value - at completion value against the project baseline (the activity itself when none is assigned); positive is under budget. Null when the activity is not in the project baseline.","nullable":true,"properties":{"expense_cost_variance":{"description":"P6 ExpenseCostVariance.","nullable":true,"type":"number"},"labor_cost_variance":{"description":"P6 LaborCostVariance.","nullable":true,"type":"number"},"labor_units_variance":{"description":"P6 LaborUnitsVariance: BL labor units - at completion labor units.","nullable":true,"type":"number"},"material_cost_variance":{"description":"P6 MaterialCostVariance.","nullable":true,"type":"number"},"nonlabor_cost_variance":{"description":"P6 NonLaborCostVariance.","nullable":true,"type":"number"},"nonlabor_units_variance":{"description":"P6 NonLaborUnitsVariance.","nullable":true,"type":"number"},"total_cost_variance":{"description":"P6 TotalCostVariance: BL planned total cost - at completion total cost.","nullable":true,"type":"number"}},"type":"object"}},"required":["bac","bcws","bcwp","acwp","cv","sv","cpi","spi","eac","note"],"type":"object"},"type":"object"},"baseline_id":{"nullable":true,"type":"integer"},"baseline_name":{"nullable":true,"type":"string"},"basis":{"enum":["project_baseline","current_schedule"],"type":"string"},"data_date":{"nullable":true,"type":"string"},"options":{"additionalProperties":false,"description":"The project's P6 earned value technique (performance % complete) and ETC technique (Settings › Earned value). WBS elements may override them per activity.","properties":{"etc_technique":{"enum":["remaining_cost","pf_1","pf_cpi","pf_cpi_spi","pf_custom"],"type":"string"},"performance_factor":{"exclusiveMinimum":0,"type":"number"},"technique":{"enum":["activity_percent_complete","zero_one_hundred","fifty_fifty","custom_percent","wbs_milestones","resource_curves"],"type":"string"},"user_percent":{"maximum":100,"minimum":0,"type":"number"}},"required":["technique","user_percent","etc_technique","performance_factor"],"type":"object"}},"required":["basis","baseline_id","baseline_name","data_date","activities"],"type":"object"},"period":{"additionalProperties":false,"nullable":true,"properties":{"activities":{"additionalProperties":{"properties":{"cost":{"nullable":true,"type":"string"},"units":{"nullable":true,"type":"number"}},"type":"object"},"type":"object"},"data_date":{"format":"date","type":"string"},"financial_period_id":{"type":"integer"},"name":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"run_id":{"type":"integer"}},"required":["run_id","financial_period_id","name","period_start","period_end","data_date","activities"],"type":"object"},"version":{"type":"integer"},"version_id":{"type":"integer"}},"required":["version_id","version","earned_value","period"],"type":"object"},"schedule_ScheduleFeed":{"additionalProperties":false,"properties":{"entries":{"items":{"additionalProperties":false,"properties":{"activity_id":{"nullable":true,"type":"string"},"actor":{"additionalProperties":false,"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"at":{"format":"date-time","type":"string"},"details":{"additionalProperties":true,"description":"Kind-specific ids; version entries carry `changes` (ScheduleVersionChangeSummary or null while pending)","nullable":true,"type":"object"},"href":{"description":"In-app link to the entry's context","type":"string"},"id":{"type":"string"},"kind":{"enum":["version","calculation","baseline","update","scenario","import","comment"],"type":"string"},"summary":{"nullable":true,"type":"string"},"title":{"type":"string"},"version":{"nullable":true,"type":"integer"}},"required":["id","kind","at","actor","title","summary","href","version","activity_id","details"],"type":"object"},"type":"array"},"full_network":{"description":"False for non-admins: only discussion entries","type":"boolean"},"next_cursor":{"nullable":true,"type":"string"}},"required":["entries","next_cursor","full_network"],"type":"object"},"schedule_ScheduleFieldHierarchyReview":{"additionalProperties":false,"description":"Optional admin-only reconciliation evidence for a canonical WBS plan. Exact immutable bindings and reviewed activity choices identify current tasks. New parents retain symbolic WBS IDs. Parent moves, unmapped live descendants, retired ownership, and summary privacy require explicit reconciliation. This report does not authorize hierarchy publication or establish public field-reader coverage.","properties":{"blockers":{"items":{"type":"string"},"type":"array"},"policy":{"enum":["exact_parent_reconciliation_v1"],"type":"string"},"rows":{"items":{"additionalProperties":false,"properties":{"action":{"enum":["create_summary_required","activity_decision_required","create_activity","existing","restore_required"],"type":"string"},"before_parent_task_id":{"maximum":2147483647,"minimum":1,"type":["integer","null"]},"blockers":{"items":{"type":"string"},"type":"array"},"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":["string","null"]},"id":{"minLength":1,"type":"string"},"live_descendant_count":{"maximum":50000,"minimum":0,"type":"integer"},"namespace":{"enum":["activity","wbs"],"type":"string"},"parent_changed":{"type":"boolean"},"proposed_parent_task_id":{"maximum":2147483647,"minimum":1,"type":["integer","null"]},"proposed_parent_wbs_id":{"type":["string","null"]},"proposed_private":{"type":["boolean","null"]},"task_id":{"maximum":2147483647,"minimum":1,"type":["integer","null"]},"unmapped_descendant_count":{"maximum":50000,"minimum":0,"type":"integer"}},"required":["namespace","id","task_id","expected_row_digest","action","before_parent_task_id","proposed_parent_task_id","proposed_parent_wbs_id","parent_changed","proposed_private","live_descendant_count","unmapped_descendant_count","blockers"],"type":"object"},"maxItems":20000,"type":"array"}},"required":["policy","blockers","rows"],"type":"object"},"schedule_ScheduleFieldProgressApplied":{"additionalProperties":false,"properties":{"alerts":{"anyOf":[{"$ref":"#/components/schemas/schedule_ScheduleLinkAlerts"},{"type":"null"}]},"applied":{"items":{"additionalProperties":false,"properties":{"activity_id":{"type":"string"},"changes":{"items":{"type":"string"},"type":"array"},"proposed":{"$ref":"#/components/schemas/schedule_ScheduleFieldProgressFields"}},"required":["activity_id","changes","proposed"],"type":"object"},"type":"array"},"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"data_date":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"next_step":{"type":"string"},"version":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"digest":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version","digest","created_at"],"type":"object"}},"required":["version","calculation_id","applied","data_date","alerts","next_step"],"type":"object"},"schedule_ScheduleFieldProgressApplyRequest":{"additionalProperties":false,"properties":{"activity_ids":{"items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":10000,"minItems":1,"type":"array"},"advance_data_date":{"default":false,"type":"boolean"},"expected_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"status_date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["expected_version_id","status_date","preview_digest","activity_ids"],"type":"object"},"schedule_ScheduleFieldProgressFields":{"additionalProperties":false,"properties":{"actual_finish":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"actual_start":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"physical_percent_complete":{"maximum":1,"minimum":0,"nullable":true,"type":"number"}},"required":["actual_start","actual_finish","physical_percent_complete"],"type":"object"},"schedule_ScheduleFieldProgressPreview":{"additionalProperties":false,"properties":{"data_date":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"data_date_after":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"evidence_cutoff":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"next_step":{"type":"string"},"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"status_date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"suggestions":{"items":{"additionalProperties":false,"properties":{"activity_id":{"type":"string"},"changes":{"items":{"enum":["actual_start","actual_finish","physical_percent_complete"],"type":"string"},"type":"array"},"current":{"$ref":"#/components/schemas/schedule_ScheduleFieldProgressFields"},"evidence":{"items":{"additionalProperties":false,"properties":{"approved":{"type":"boolean"},"date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"event":{"enum":["started","progressed","finished"],"type":"string"},"link_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"percent":{"nullable":true,"type":"integer"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["manpower_log","notes_log","quantity_log"],"type":"string"}},"required":["link_id","source_type","source_id","date","event","percent","approved"],"type":"object"},"type":"array"},"name":{"type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"proposed":{"$ref":"#/components/schemas/schedule_ScheduleFieldProgressFields"}},"required":["activity_id","name","current","proposed","changes","evidence","notes"],"type":"object"},"type":"array"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","version","status_date","data_date","data_date_after","evidence_cutoff","preview_digest","suggestions","next_step"],"type":"object"},"schedule_ScheduleFieldProgressPreviewRequest":{"additionalProperties":false,"properties":{"advance_data_date":{"default":false,"type":"boolean"},"status_date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["status_date"],"type":"object"},"schedule_ScheduleFinancialPeriod":{"additionalProperties":false,"properties":{"accounting_period_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"end_date":{"format":"date","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"scope":{"enum":["company","project"],"type":"string"},"source":{"description":"accounting: a read-only copy of one Accounting fiscal period (never posted to)","enum":["manual","accounting"],"type":"string"},"start_date":{"format":"date","type":"string"},"stored":{"additionalProperties":false,"description":"This project's effective stored run in the period","nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"data_date":{"format":"date","type":"string"},"run_id":{"type":"integer"},"sequence":{"type":"integer"},"version_id":{"type":"integer"}},"required":["run_id","sequence","data_date","version_id","created_at"],"type":"object"}},"required":["id","scope","name","start_date","end_date","source","accounting_period_id","created_by_id","created_at","stored"],"type":"object"},"schedule_ScheduleFinancialPeriodInput":{"oneOf":[{"additionalProperties":false,"properties":{"end_date":{"format":"date","type":"string"},"name":{"maxLength":80,"minLength":1,"type":"string"},"scope":{"default":"project","enum":["project","company"],"type":"string"},"start_date":{"format":"date","type":"string"}},"required":["name","start_date","end_date"],"type":"object"},{"additionalProperties":false,"properties":{"periods":{"items":{"type":"object"},"maxItems":120,"minItems":1,"type":"array"}},"required":["periods"],"type":"object"},{"additionalProperties":false,"properties":{"fiscal_year":{"type":"integer"},"source":{"enum":["accounting"],"type":"string"}},"required":["source","fiscal_year"],"type":"object"}]},"schedule_ScheduleFinancialPeriodList":{"additionalProperties":true,"properties":{"created":{"items":{"type":"integer"},"type":"array"},"periods":{"items":{"$ref":"#/components/schemas/schedule_ScheduleFinancialPeriod"},"type":"array"},"permissions":{"properties":{"company":{"type":"boolean"},"project":{"type":"boolean"},"reason":{"nullable":true,"type":"string"}},"type":"object"}},"required":["periods"],"type":"object"},"schedule_ScheduleForensicEvidence":{"description":"Original engine result plus worker-attached sources, engine disclosures and a SHA-256 evidence manifest.","properties":{"disclosures":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"evidence_manifest":{"additionalProperties":true,"properties":{"input_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"limitations":{"items":{"type":"string"},"type":"array"},"manifest_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"report_version":{"type":"string"},"result_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"sources":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["report_version","input_sha256","result_sha256","sources","limitations","manifest_sha256"],"type":"object"},"method":{"enum":["contemporaneous_as_is","contemporaneous_split","as_planned_vs_as_built","as_planned_vs_as_built_periodic","impacted_as_planned","collapsed_as_built","impacted_multiple_base","collapsed_multiple_base","modified_or_recreated","prospective_tia","concurrency"],"type":"string"},"mip":{"nullable":true,"type":"string"},"result":{"additionalProperties":true,"type":"object"},"sources":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"status":{"enum":["computed"],"type":"string"}},"required":["status","method","result","sources","disclosures","evidence_manifest"],"type":"object"},"schedule_ScheduleForensicHistory":{"additionalProperties":false,"properties":{"next_before_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"reports":{"items":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"inputs":{"items":{"additionalProperties":false,"properties":{"label":{"maxLength":128,"minLength":1,"type":"string"},"position":{"minimum":0,"type":"integer"},"role":{"enum":["update","planned","as_built","context"],"type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["position","role","label","version_id"],"type":"object"},"type":"array"},"method":{"enum":["contemporaneous_as_is","contemporaneous_split","as_planned_vs_as_built","as_planned_vs_as_built_periodic","impacted_as_planned","collapsed_as_built","impacted_multiple_base","collapsed_multiple_base","modified_or_recreated","prospective_tia","concurrency"],"type":"string"},"mip":{"nullable":true,"type":"string"},"result_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["id","method","mip","engine_revision","input_digest","result_digest","inputs","created_by_id","created_at"],"type":"object"},"type":"array"}},"required":["reports","next_before_id"],"type":"object"},"schedule_ScheduleForensicReport":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"inputs":{"items":{"additionalProperties":false,"properties":{"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"digest_current":{"type":"boolean"},"label":{"maxLength":128,"minLength":1,"type":"string"},"position":{"minimum":0,"type":"integer"},"role":{"enum":["update","planned","as_built","context"],"type":"string"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["position","role","label","version_id","version","definition_digest","digest_current"],"type":"object"},"type":"array"},"method":{"enum":["contemporaneous_as_is","contemporaneous_split","as_planned_vs_as_built","as_planned_vs_as_built_periodic","impacted_as_planned","collapsed_as_built","impacted_multiple_base","collapsed_multiple_base","modified_or_recreated","prospective_tia","concurrency"],"type":"string"},"mip":{"nullable":true,"type":"string"},"parameters":{"$ref":"#/components/schemas/schedule_ScheduleForensicSelection"},"report":{"$ref":"#/components/schemas/schedule_ScheduleForensicEvidence"},"result_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["id","method","mip","engine_revision","input_digest","result_digest","parameters","inputs","report","created_by_id","created_at"],"type":"object"},"schedule_ScheduleForensicSelection":{"additionalProperties":false,"description":"Method roles: contemporaneous_as_is, contemporaneous_split, modified_or_recreated and impacted_multiple_base take 2-12 update inputs in data-date order; collapsed_multiple_base 2-12 as_built; as_planned_vs_as_built(_periodic) planned then as_built; impacted_as_planned one planned; collapsed_as_built one as_built; concurrency at most one context version (read for pacing relative total float when pacing_claims are given); prospective_tia (AACE RP 52R-06, not an RP 29R-03 MIP) takes the update in effect of an owner-accepted time impact analysis (tia_id) first, then later approved updates; it is normally run through the time impact analysis's analyze endpoint.","properties":{"inputs":{"default":[],"items":{"additionalProperties":false,"description":"Exactly one of version_id or baseline_id.","properties":{"baseline_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"role":{"enum":["update","planned","as_built","context"],"type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["role"],"type":"object"},"maxItems":12,"type":"array"},"method":{"enum":["contemporaneous_as_is","contemporaneous_split","as_planned_vs_as_built","as_planned_vs_as_built_periodic","impacted_as_planned","collapsed_as_built","impacted_multiple_base","collapsed_multiple_base","modified_or_recreated","prospective_tia","concurrency"],"type":"string"},"options":{"additionalProperties":false,"default":{},"properties":{"analysis_interval_days":{"maximum":366,"minimum":1,"type":"integer"},"check_omitted":{"default":true,"type":"boolean"},"contract_names":{"items":{"enum":["AACE_29R_03","ASCE_67_17","SCL_PROTOCOL_2","UFGS_01_32_01"],"type":"string"},"maxItems":4,"type":"array"},"delays":{"items":{"additionalProperties":false,"properties":{"critical_effect":{"items":{"format":"date","type":"string"},"maxItems":2,"minItems":2,"type":"array"},"description":{"maxLength":2000,"type":"string"},"ended":{"format":"date","type":"string"},"float_consumed_days":{"maximum":3650,"minimum":0,"type":"integer"},"id":{"maxLength":128,"minLength":1,"type":"string"},"independently_critical":{"nullable":true,"type":"boolean"},"party":{"enum":["owner","contractor","neither","undetermined"],"type":"string"},"started":{"format":"date","type":"string"}},"required":["id","party","started","ended"],"type":"object"},"maxItems":200,"minItems":1,"type":"array"},"events":{"items":{"additionalProperties":false,"properties":{"basis":{"maxLength":2000,"type":"string"},"calendar_id":{"maxLength":512,"minLength":1,"type":"string"},"duration_days":{"maximum":3650,"minimum":0,"type":"integer"},"id":{"maxLength":128,"minLength":1,"type":"string"},"impacts":{"maxLength":512,"minLength":1,"type":"string"},"name":{"maxLength":512,"minLength":1,"type":"string"},"onset":{"format":"date","type":"string"},"responsibility":{"maxLength":128,"type":"string"},"source_documents":{"items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":50,"type":"array"}},"required":["id","name","duration_days","impacts"],"type":"object"},"maxItems":200,"minItems":1,"type":"array"},"float_ownership":{"enum":["not_stated","shared_first_come_first_served","contractor","project"],"type":"string"},"jurisdiction":{"enum":["neutral","us_federal","us_state_or_private","uk_scl"],"type":"string"},"match":{"enum":["code","id","name_and_wbs"],"type":"string"},"mode":{"enum":["periodic","cumulative"],"type":"string"},"pacing_claims":{"description":"Concurrency only: AACE RP 29R-03 §4.2.G pacing claims naming two delay periods of the determination.","items":{"additionalProperties":false,"properties":{"could_have_resumed":{"type":"boolean"},"intent_evidence":{"items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":50,"type":"array"},"is_direct":{"type":"boolean"},"paced_activity_id":{"maxLength":512,"minLength":1,"type":"string"},"paced_delay":{"maxLength":128,"minLength":1,"type":"string"},"parent_activity_id":{"maxLength":512,"minLength":1,"type":"string"},"parent_delay":{"maxLength":128,"minLength":1,"type":"string"}},"required":["paced_delay","parent_delay"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"},"period_structure":{"enum":["fixed","variable_or_grouped"],"type":"string"},"periods":{"items":{"items":{"format":"date","type":"string"},"maxItems":2,"minItems":2,"type":"array"},"maxItems":60,"minItems":2,"type":"array"},"tia_id":{"description":"prospective_tia only: the owner-accepted time impact analysis whose fragnet is analysed.","maximum":2147483647,"minimum":1,"type":"integer"},"updates":{"description":"MIP 3.5: one entry per input, in order. At least one update must be modified or recreated, and each such update records its modifications (500 in all).","items":{"additionalProperties":false,"properties":{"modifications":{"default":[],"items":{"additionalProperties":false,"description":"One analyst change: what changed, on whose authority and why. Needs a before or an after state.","properties":{"after":{"maxLength":512,"minLength":1,"nullable":true,"type":"string"},"authority":{"maxLength":1000,"minLength":1,"type":"string"},"before":{"maxLength":512,"minLength":1,"nullable":true,"type":"string"},"change":{"maxLength":512,"minLength":1,"type":"string"},"reason":{"maxLength":2000,"minLength":1,"type":"string"},"subject":{"maxLength":512,"minLength":1,"type":"string"}},"required":["subject","change","authority","reason"],"type":"object"},"maxItems":500,"type":"array"},"provenance":{"enum":["contemporaneous","modified","recreated"],"type":"string"}},"required":["provenance"],"type":"object"},"maxItems":12,"minItems":2,"type":"array"}},"type":"object"}},"required":["method"],"type":"object"},"schedule_ScheduleHealthCheck":{"additionalProperties":true,"properties":{"detail":{"description":"The counts behind the value, in words.","type":"string"},"name":{"description":"Logic, Leads, Lags, Relationship Types, Hard Constraints, High Float, Negative Float, High Duration, Invalid Dates, Resources, Missed Tasks, Critical Path Test, Critical Path Length Index or Baseline Execution Index.","type":"string"},"number":{"description":"DCMA check number, 1 to 14.","maximum":14,"minimum":1,"type":"integer"},"offender_count":{"description":"Total offenders before truncation.","type":"integer"},"offenders":{"description":"First 20 offenders: activity ids, or relationships written \"P->S\" or \"P->S (SS)\".","items":{"type":"string"},"maxItems":20,"type":"array"},"status":{"description":"skipped when the check has nothing to measure, for example no relationships, or no resource assignments for check 10.","enum":["pass","fail","skipped"],"type":"string"},"threshold":{"description":"The threshold applied, as text.","type":"string"},"threshold_source":{"description":"Where the threshold comes from: the DCMA-EA PAM 200.1 section, or a note that no published threshold exists.","type":"string"},"value":{"description":"Percent for checks 1 to 11, working days for check 12, an index for checks 13 and 14.","nullable":true,"type":"number"}},"type":"object"},"schedule_ScheduleHealthResult":{"additionalProperties":true,"description":"Result of operation `health`. The DCMA 14-point metrics are screening indicators, not compliance criteria. The `basis` text says so; keep it with any grade you publish.","properties":{"assessed":{"description":"Checks that could run.","type":"integer"},"basis":{"description":"States that the metrics are screening indicators (GAO-16-89G, DCMA-EA PAM 200.1).","type":"string"},"checks":{"items":{"$ref":"#/components/schemas/schedule_ScheduleHealthCheck"},"type":"array"},"failed":{"type":"integer"},"failures":{"description":"Count of failed checks.","type":"integer"},"grade":{"description":"A at a score of 90 or above, B at 80, C at 70, D at 60, otherwise F.","enum":["A","B","C","D","F"],"type":"string"},"optimisable":{"description":"False when a check that blocks optimisation failed.","type":"boolean"},"passed":{"type":"integer"},"passes":{"description":"Count of passed checks.","type":"integer"},"score":{"description":"Percent of runnable (not skipped) checks that passed; 0 when nothing ran.","maximum":100,"minimum":0,"type":"number"},"skipped":{"type":"integer"},"total_checks":{"type":"integer"}},"title":"health: DCMA 14-point assessment","type":"object"},"schedule_ScheduleHierarchyApplication":{"additionalProperties":false,"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"counts":{"additionalProperties":false,"properties":{"bind":{"minimum":0,"type":"integer"},"create":{"minimum":0,"type":"integer"},"move":{"minimum":0,"type":"integer"},"project":{"minimum":0,"type":"integer"},"restore":{"minimum":0,"type":"integer"},"retain":{"minimum":0,"type":"integer"},"retire":{"minimum":0,"type":"integer"}},"required":["create","bind","move","restore","project","retain","retire"],"type":"object"},"created_at":{"format":"date-time","type":"string"},"publication_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"replayed":{"type":"boolean"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["publication_id","version_id","calculation_id","created_at","replayed","counts"],"type":"object"},"schedule_ScheduleHierarchyApplyRequest":{"additionalProperties":false,"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"decisions":{"items":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyDecision"},"maxItems":20000,"type":"array"},"expected_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["expected_version_id","calculation_id","decisions","preview_digest"],"type":"object"},"schedule_ScheduleHierarchyDecision":{"oneOf":[{"additionalProperties":false,"properties":{"assigned_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"baseline_policy":{"enum":["none","initial_dates"],"type":"string"},"identity":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyIdentity"},"operation":{"enum":["create"],"type":"string"},"parent_wbs_id":{"maxLength":512,"minLength":1,"nullable":true,"pattern":".*\\S.*","type":"string"},"private":{"type":"boolean"},"progress_policy":{"enum":["unstarted"],"type":"string"}},"required":["operation","identity","parent_wbs_id","private","assigned_id","baseline_policy","progress_policy"],"type":"object"},{"additionalProperties":false,"properties":{"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"identity":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyIdentity"},"operation":{"enum":["bind"],"type":"string"},"parent_wbs_id":{"maxLength":512,"minLength":1,"nullable":true,"pattern":".*\\S.*","type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","identity","parent_wbs_id","task_id","expected_row_digest"],"type":"object"},{"additionalProperties":false,"properties":{"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"identity":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyIdentity"},"operation":{"enum":["move"],"type":"string"},"parent_wbs_id":{"maxLength":512,"minLength":1,"nullable":true,"pattern":".*\\S.*","type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","identity","parent_wbs_id","task_id","expected_row_digest"],"type":"object"},{"additionalProperties":false,"properties":{"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"identity":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyIdentity"},"operation":{"enum":["restore"],"type":"string"},"parent_wbs_id":{"maxLength":512,"minLength":1,"nullable":true,"pattern":".*\\S.*","type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","identity","parent_wbs_id","task_id","expected_row_digest"],"type":"object"},{"additionalProperties":false,"properties":{"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"operation":{"enum":["retain"],"type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","task_id","expected_row_digest"],"type":"object"},{"additionalProperties":false,"properties":{"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"operation":{"enum":["retire"],"type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","task_id","expected_row_digest"],"type":"object"}]},"schedule_ScheduleHierarchyIdentity":{"additionalProperties":false,"properties":{"id":{"maxLength":512,"minLength":1,"pattern":".*\\S.*","type":"string"},"namespace":{"enum":["activity","wbs"],"type":"string"}},"required":["namespace","id"],"type":"object"},"schedule_ScheduleHierarchyInventory":{"additionalProperties":false,"properties":{"assignee_page":{"maximum":2147483647,"minimum":1,"type":"integer"},"assignee_total":{"minimum":0,"type":"integer"},"assignees":{"items":{"additionalProperties":false,"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"maxItems":100,"type":"array"},"blockers":{"items":{"type":"string"},"type":"array"},"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"can_apply":{"enum":[false],"type":"boolean"},"inventory_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"node_page":{"maximum":2147483647,"minimum":1,"type":"integer"},"node_total":{"minimum":0,"type":"integer"},"nodes":{"items":{"additionalProperties":false,"properties":{"blockers":{"items":{"type":"string"},"type":"array"},"expected_row_digest":{"nullable":true,"pattern":"^[a-f0-9]{64}$","type":"string"},"identity":{"additionalProperties":false,"properties":{"id":{"maxLength":512,"minLength":1,"pattern":".*\\S.*","type":"string"},"namespace":{"enum":["activity","wbs"],"type":"string"}},"required":["namespace","id"],"type":"object"},"lifecycle":{"enum":["new","live","retired"],"type":"string"},"name":{"type":"string"},"parent_wbs_id":{"maxLength":512,"minLength":1,"nullable":true,"pattern":".*\\S.*","type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["identity","name","parent_wbs_id","task_id","expected_row_digest","lifecycle","blockers"],"type":"object"},"maxItems":100,"type":"array"},"page_size":{"maximum":100,"minimum":1,"type":"integer"},"requires_preview":{"enum":[true],"type":"boolean"},"task_page":{"maximum":2147483647,"minimum":1,"type":"integer"},"task_total":{"minimum":0,"type":"integer"},"tasks":{"items":{"additionalProperties":false,"properties":{"assigned_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"finish_date":{"format":"date","type":"string"},"identity":{"additionalProperties":false,"nullable":true,"properties":{"id":{"maxLength":512,"minLength":1,"pattern":".*\\S.*","type":"string"},"namespace":{"enum":["activity","wbs"],"type":"string"}},"required":["namespace","id"],"type":"object"},"lifecycle":{"enum":["live","retired"],"type":"string"},"milestone":{"type":"boolean"},"name":{"type":"string"},"parent_task_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"percent_complete":{"type":"number"},"private":{"type":"boolean"},"start_date":{"format":"date","type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["task_id","name","expected_row_digest","parent_task_id","identity","lifecycle","private","assigned_id","milestone","percent_complete","start_date","finish_date"],"type":"object"},"maxItems":100,"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","calculation_id","inventory_digest","can_apply","requires_preview","blockers","page_size","node_page","task_page","node_total","task_total","nodes","tasks","assignee_page","assignee_total","assignees"],"type":"object"},"schedule_ScheduleHierarchyPreview":{"additionalProperties":false,"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"can_apply":{"enum":[true],"type":"boolean"},"counts":{"additionalProperties":false,"properties":{"bind":{"minimum":0,"type":"integer"},"create":{"minimum":0,"type":"integer"},"move":{"minimum":0,"type":"integer"},"project":{"minimum":0,"type":"integer"},"restore":{"minimum":0,"type":"integer"},"retain":{"minimum":0,"type":"integer"},"retire":{"minimum":0,"type":"integer"}},"required":["create","bind","move","restore","project","retain","retire"],"type":"object"},"disclosures":{"items":{"type":"string"},"type":"array"},"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"rows":{"items":{"additionalProperties":false,"properties":{"after":{"additionalProperties":false,"properties":{"assigned_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"baseline_finish_date":{"format":"date","nullable":true,"type":"string"},"baseline_start_date":{"format":"date","nullable":true,"type":"string"},"critical":{"type":"boolean"},"finish_date":{"format":"date","nullable":true,"type":"string"},"milestone":{"type":"boolean"},"name":{"type":"string"},"parent":{"oneOf":[{"additionalProperties":false,"nullable":true,"properties":{"id":{"maxLength":512,"minLength":1,"pattern":".*\\S.*","type":"string"},"namespace":{"enum":["wbs"],"type":"string"}},"required":["namespace","id"],"type":"object"},{"additionalProperties":false,"properties":{"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["task_id"],"type":"object"}]},"private":{"type":"boolean"},"start_date":{"format":"date","nullable":true,"type":"string"}},"required":["name","private","assigned_id","milestone","start_date","finish_date","critical","baseline_start_date","baseline_finish_date","parent"],"type":"object"},"before":{"additionalProperties":false,"nullable":true,"properties":{"assigned_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"baseline_finish_date":{"format":"date","nullable":true,"type":"string"},"baseline_start_date":{"format":"date","nullable":true,"type":"string"},"critical":{"type":"boolean"},"finish_date":{"format":"date","nullable":true,"type":"string"},"milestone":{"type":"boolean"},"name":{"type":"string"},"parent_task_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"private":{"type":"boolean"},"start_date":{"format":"date","nullable":true,"type":"string"}},"required":["name","private","assigned_id","milestone","start_date","finish_date","critical","baseline_start_date","baseline_finish_date","parent_task_id"],"type":"object"},"identity":{"additionalProperties":false,"nullable":true,"properties":{"id":{"maxLength":512,"minLength":1,"pattern":".*\\S.*","type":"string"},"namespace":{"enum":["activity","wbs"],"type":"string"}},"required":["namespace","id"],"type":"object"},"operation":{"enum":["create","bind","move","restore","project","retain","retire"],"type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["operation","identity","task_id","before","after"],"type":"object"},"maxItems":50000,"type":"array"},"summary_visibility_policy":{"enum":["admin_only_unassigned_v1"],"type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","calculation_id","preview_digest","can_apply","summary_visibility_policy","counts","rows","disclosures"],"type":"object"},"schedule_ScheduleHierarchyPreviewRequest":{"additionalProperties":false,"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"decisions":{"items":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyDecision"},"maxItems":20000,"type":"array"},"expected_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["expected_version_id","calculation_id","decisions"],"type":"object"},"schedule_ScheduleHierarchyReview":{"additionalProperties":false,"description":"Optional full-network admin review for canonical WBS plans. Summary dates span calculated descendants; invalid or empty coverage has null dates and criticality with blockers. This is not field publication or public/private task-reader authority. Hierarchy publication remains blocked.","properties":{"blockers":{"items":{"type":"string"},"type":"array"},"nodes":{"items":{"additionalProperties":false,"properties":{"activity_count":{"maximum":10000,"minimum":0,"type":"integer"},"blockers":{"items":{"type":"string"},"type":"array"},"critical":{"type":["boolean","null"]},"depth":{"maximum":10000,"minimum":0,"type":"integer"},"finish_date":{"format":"date","type":["string","null"]},"id":{"minLength":1,"type":"string"},"name":{"type":"string"},"namespace":{"enum":["activity","wbs"],"type":"string"},"parent_wbs_id":{"type":["string","null"]},"start_date":{"format":"date","type":["string","null"]}},"required":["namespace","id","name","parent_wbs_id","depth","activity_count","start_date","finish_date","critical","blockers"],"type":"object"},"maxItems":20000,"type":"array"},"policy":{"enum":["canonical_descendants_v1"],"type":"string"}},"required":["policy","blockers","nodes"],"type":"object"},"schedule_ScheduleImportMergeApply":{"allOf":[{"$ref":"#/components/schemas/schedule_ScheduleImportMergeRequest"},{"properties":{"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["preview_digest"],"type":"object"}]},"schedule_ScheduleImportMergePreview":{"additionalProperties":false,"properties":{"activity_count":{"type":"integer"},"counts":{"additionalProperties":false,"properties":{"activities":{"additionalProperties":false,"properties":{"deleted":{"minimum":0,"type":"integer"},"inserted":{"minimum":0,"type":"integer"},"kept":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"skipped":{"minimum":0,"type":"integer"},"unchanged":{"minimum":0,"type":"integer"},"updated":{"minimum":0,"type":"integer"}},"required":["matched","updated","unchanged","inserted","deleted","kept","skipped"],"type":"object"},"assignments":{"additionalProperties":false,"properties":{"deleted":{"minimum":0,"type":"integer"},"inserted":{"minimum":0,"type":"integer"},"kept":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"skipped":{"minimum":0,"type":"integer"},"unchanged":{"minimum":0,"type":"integer"},"updated":{"minimum":0,"type":"integer"}},"required":["matched","updated","unchanged","inserted","deleted","kept","skipped"],"type":"object"},"calendars":{"additionalProperties":false,"properties":{"deleted":{"minimum":0,"type":"integer"},"inserted":{"minimum":0,"type":"integer"},"kept":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"skipped":{"minimum":0,"type":"integer"},"unchanged":{"minimum":0,"type":"integer"},"updated":{"minimum":0,"type":"integer"}},"required":["matched","updated","unchanged","inserted","deleted","kept","skipped"],"type":"object"},"codes":{"additionalProperties":false,"properties":{"deleted":{"minimum":0,"type":"integer"},"inserted":{"minimum":0,"type":"integer"},"kept":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"skipped":{"minimum":0,"type":"integer"},"unchanged":{"minimum":0,"type":"integer"},"updated":{"minimum":0,"type":"integer"}},"required":["matched","updated","unchanged","inserted","deleted","kept","skipped"],"type":"object"},"notebooks":{"additionalProperties":false,"properties":{"deleted":{"minimum":0,"type":"integer"},"inserted":{"minimum":0,"type":"integer"},"kept":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"skipped":{"minimum":0,"type":"integer"},"unchanged":{"minimum":0,"type":"integer"},"updated":{"minimum":0,"type":"integer"}},"required":["matched","updated","unchanged","inserted","deleted","kept","skipped"],"type":"object"},"relationships":{"additionalProperties":false,"properties":{"deleted":{"minimum":0,"type":"integer"},"inserted":{"minimum":0,"type":"integer"},"kept":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"skipped":{"minimum":0,"type":"integer"},"unchanged":{"minimum":0,"type":"integer"},"updated":{"minimum":0,"type":"integer"}},"required":["matched","updated","unchanged","inserted","deleted","kept","skipped"],"type":"object"},"resources":{"additionalProperties":false,"properties":{"deleted":{"minimum":0,"type":"integer"},"inserted":{"minimum":0,"type":"integer"},"kept":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"skipped":{"minimum":0,"type":"integer"},"unchanged":{"minimum":0,"type":"integer"},"updated":{"minimum":0,"type":"integer"}},"required":["matched","updated","unchanged","inserted","deleted","kept","skipped"],"type":"object"},"settings":{"additionalProperties":false,"properties":{"deleted":{"minimum":0,"type":"integer"},"inserted":{"minimum":0,"type":"integer"},"kept":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"skipped":{"minimum":0,"type":"integer"},"unchanged":{"minimum":0,"type":"integer"},"updated":{"minimum":0,"type":"integer"}},"required":["matched","updated","unchanged","inserted","deleted","kept","skipped"],"type":"object"},"udfs":{"additionalProperties":false,"properties":{"deleted":{"minimum":0,"type":"integer"},"inserted":{"minimum":0,"type":"integer"},"kept":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"skipped":{"minimum":0,"type":"integer"},"unchanged":{"minimum":0,"type":"integer"},"updated":{"minimum":0,"type":"integer"}},"required":["matched","updated","unchanged","inserted","deleted","kept","skipped"],"type":"object"},"wbs":{"additionalProperties":false,"properties":{"deleted":{"minimum":0,"type":"integer"},"inserted":{"minimum":0,"type":"integer"},"kept":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"skipped":{"minimum":0,"type":"integer"},"unchanged":{"minimum":0,"type":"integer"},"updated":{"minimum":0,"type":"integer"}},"required":["matched","updated","unchanged","inserted","deleted","kept","skipped"],"type":"object"}},"required":["activities","relationships","wbs","calendars","codes","udfs","resources","assignments","notebooks","settings"],"type":"object"},"file_name":{"type":"string"},"import_id":{"type":"integer"},"mode":{"enum":["update","replace","add_to_wbs"],"type":"string"},"preview_digest":{"type":"string"},"renamed":{"items":{"additionalProperties":false,"properties":{"from":{"type":"string"},"to":{"type":"string"},"type":{"type":"string"}},"required":["type","from","to"],"type":"object"},"type":"array"},"renamed_truncated":{"type":"boolean"},"sample":{"description":"Up to 50 activity changes: field-level before/after for updates, the new row for inserts","items":{"additionalProperties":false,"properties":{"activity_id":{"type":"string"},"change":{"enum":["insert","update","delete"],"type":"string"},"fields":{"items":{"additionalProperties":false,"properties":{"after":{"description":"Any JSON value from the canonical activity row","nullable":true},"before":{"description":"Any JSON value from the canonical activity row","nullable":true},"field":{"type":"string"}},"required":["field"],"type":"object"},"type":"array"},"id":{"type":"string"}},"required":["activity_id","id","change","fields"],"type":"object"},"maxItems":50,"type":"array"},"source_project_id":{"type":"string"},"summary":{"type":"string"},"target_wbs_id":{"nullable":true,"type":"string"},"template":{"additionalProperties":false,"description":"Per object type action (P6 semantics). update_existing: matched objects take the file's values, new ones are inserted. insert_new: only new objects are inserted. keep_existing: nothing of this type changes. delete_existing: like update_existing, and local objects missing from the file are deleted (never ones the result still uses). notebooks and settings take update_existing or keep_existing.","properties":{"activities":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"assignments":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"calendars":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"codes":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"notebooks":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"relationships":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"resources":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"settings":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"udfs":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"wbs":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"}},"type":"object"},"version":{"type":"integer"},"version_id":{"type":"integer"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["import_id","file_name","source_project_id","version_id","version","mode","target_wbs_id","template","counts","summary","sample","renamed","renamed_truncated","warnings","activity_count","preview_digest"],"type":"object"},"schedule_ScheduleImportMergeRequest":{"additionalProperties":false,"properties":{"expected_version_id":{"description":"The current head version; 409 when it moved","minimum":1,"type":"integer"},"mode":{"description":"update: Update existing plan with the action template. replace: every type delete_existing, notebooks and settings from the file. add_to_wbs: every activity, relationship, WBS node and assignment is new, grafted under target_wbs_id.","enum":["update","replace","add_to_wbs"],"type":"string"},"target_wbs_id":{"description":"Required for add_to_wbs: an existing WBS node id","maxLength":200,"minLength":1,"nullable":true,"type":"string"},"template":{"additionalProperties":false,"description":"Per object type action (P6 semantics). update_existing: matched objects take the file's values, new ones are inserted. insert_new: only new objects are inserted. keep_existing: nothing of this type changes. delete_existing: like update_existing, and local objects missing from the file are deleted (never ones the result still uses). notebooks and settings take update_existing or keep_existing.","properties":{"activities":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"assignments":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"calendars":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"codes":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"notebooks":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"relationships":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"resources":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"settings":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"udfs":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"},"wbs":{"enum":["update_existing","insert_new","keep_existing","delete_existing"],"type":"string"}},"type":"object"}},"required":["mode","expected_version_id"],"type":"object"},"schedule_ScheduleImportMergeResult":{"additionalProperties":false,"properties":{"calculation_id":{"type":"integer"},"counts":{"additionalProperties":{"additionalProperties":false,"properties":{"deleted":{"minimum":0,"type":"integer"},"inserted":{"minimum":0,"type":"integer"},"kept":{"minimum":0,"type":"integer"},"matched":{"minimum":0,"type":"integer"},"skipped":{"minimum":0,"type":"integer"},"unchanged":{"minimum":0,"type":"integer"},"updated":{"minimum":0,"type":"integer"}},"required":["matched","updated","unchanged","inserted","deleted","kept","skipped"],"type":"object"},"type":"object"},"summary":{"type":"string"},"version":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"digest":{"type":"string"},"id":{"type":"integer"},"version":{"type":"integer"}},"required":["id","version","digest","created_at"],"type":"object"}},"required":["version","calculation_id","counts","summary"],"type":"object"},"schedule_ScheduleLayout":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"document":{"additionalProperties":true,"description":"Layout document: { version, query, view, collapsed, grid, display?, ...feature sections }. Unknown keys are preserved.","properties":{"version":{"minimum":1,"type":"integer"}},"type":"object"},"editable":{"description":"Whether the caller may save, rename or delete it","type":"boolean"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"maxLength":80,"minLength":1,"type":"string"},"owner_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"project_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"ref":{"pattern":"^(?:builtin:[a-z0-9_-]{1,40}|layout:[1-9]\\d{0,9})$","type":"string"},"revision":{"minimum":1,"type":"integer"},"schema_version":{"minimum":1,"type":"integer"},"scope":{"enum":["user","project","shared"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","ref","scope","name","project_id","owner_id","schema_version","revision","document","created_at","updated_at","editable"],"type":"object"},"schedule_ScheduleLayoutCreate":{"additionalProperties":false,"properties":{"document":{"additionalProperties":true,"description":"Layout document: { version, query, view, collapsed, grid, display?, ...feature sections }. Unknown keys are preserved.","properties":{"version":{"minimum":1,"type":"integer"}},"type":"object"},"name":{"maxLength":80,"minLength":1,"type":"string"},"scope":{"enum":["user","project","shared"],"type":"string"},"set_default":{"type":"boolean"}},"required":["scope","name","document"],"type":"object"},"schedule_ScheduleLayoutDefaultUpdate":{"additionalProperties":false,"properties":{"layout_ref":{"nullable":true,"pattern":"^(?:builtin:[a-z0-9_-]{1,40}|layout:[1-9]\\d{0,9})$","type":"string"},"target":{"enum":["user","project"],"type":"string"}},"required":["target","layout_ref"],"type":"object"},"schedule_ScheduleLayoutDefaultsEnvelope":{"additionalProperties":false,"properties":{"defaults":{"additionalProperties":false,"properties":{"project":{"nullable":true,"pattern":"^(?:builtin:[a-z0-9_-]{1,40}|layout:[1-9]\\d{0,9})$","type":"string"},"user":{"nullable":true,"pattern":"^(?:builtin:[a-z0-9_-]{1,40}|layout:[1-9]\\d{0,9})$","type":"string"}},"required":["user","project"],"type":"object"}},"required":["defaults"],"type":"object"},"schedule_ScheduleLayoutDeleted":{"additionalProperties":false,"properties":{"deleted":{"enum":[true],"type":"boolean"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["deleted","id"],"type":"object"},"schedule_ScheduleLayoutEnvelope":{"additionalProperties":false,"properties":{"layout":{"$ref":"#/components/schemas/schedule_ScheduleLayout"}},"required":["layout"],"type":"object"},"schedule_ScheduleLayoutFile":{"additionalProperties":false,"properties":{"document":{"additionalProperties":true,"description":"A planner layout document (planner/layout-schema.ts), validated on import exactly like a stored layout","type":"object"},"format":{"enum":["os.construction layout"],"type":"string"},"name":{"type":"string"},"version":{"enum":[1],"type":"integer"}},"required":["format","version","name","document"],"type":"object"},"schedule_ScheduleLayoutFileImport":{"additionalProperties":false,"properties":{"file":{"description":"The file text: an os.construction layout envelope or a bare layout document, at most 260 KiB","type":"string"},"file_name":{"description":"The uploaded file's name; a .plf name is refused with an explanation","maxLength":260,"type":"string"},"name":{"description":"Defaults to the file's name; a taken name gets a (n) suffix","maxLength":200,"type":"string"},"scope":{"default":"user","enum":["user","project","shared"],"type":"string"},"set_default":{"type":"boolean"}},"required":["file"],"type":"object"},"schedule_ScheduleLayoutFileImportResult":{"additionalProperties":false,"properties":{"issues":{"description":"Parts of the file that were invalid and reset","items":{"type":"string"},"type":"array"},"layout":{"$ref":"#/components/schemas/schedule_ScheduleLayout"}},"required":["layout","issues"],"type":"object"},"schedule_ScheduleLayoutImport":{"additionalProperties":false,"properties":{"views":{"items":{"additionalProperties":true,"description":"A version-1 browser view: { name, query, view, collapsed, layout? }","type":"object"},"maxItems":20,"type":"array"}},"required":["views"],"type":"object"},"schedule_ScheduleLayoutImportResult":{"additionalProperties":false,"properties":{"created":{"items":{"$ref":"#/components/schemas/schedule_ScheduleLayout"},"type":"array"},"skipped":{"items":{"type":"string"},"type":"array"}},"required":["created","skipped"],"type":"object"},"schedule_ScheduleLayoutList":{"additionalProperties":false,"properties":{"builtins":{"items":{"additionalProperties":false,"properties":{"description":{"type":"string"},"document":{"additionalProperties":true,"description":"Layout document: { version, query, view, collapsed, grid, display?, ...feature sections }. Unknown keys are preserved.","properties":{"version":{"minimum":1,"type":"integer"}},"type":"object"},"name":{"type":"string"},"ref":{"pattern":"^(?:builtin:[a-z0-9_-]{1,40}|layout:[1-9]\\d{0,9})$","type":"string"}},"required":["ref","name","description","document"],"type":"object"},"type":"array"},"defaults":{"additionalProperties":false,"properties":{"project":{"nullable":true,"pattern":"^(?:builtin:[a-z0-9_-]{1,40}|layout:[1-9]\\d{0,9})$","type":"string"},"user":{"nullable":true,"pattern":"^(?:builtin:[a-z0-9_-]{1,40}|layout:[1-9]\\d{0,9})$","type":"string"}},"required":["user","project"],"type":"object"},"layouts":{"items":{"$ref":"#/components/schemas/schedule_ScheduleLayout"},"type":"array"},"permissions":{"additionalProperties":false,"properties":{"project":{"additionalProperties":false,"properties":{"allowed":{"type":"boolean"},"reason":{"nullable":true,"type":"string"}},"required":["allowed","reason"],"type":"object"},"projectDefault":{"additionalProperties":false,"properties":{"allowed":{"type":"boolean"},"reason":{"nullable":true,"type":"string"}},"required":["allowed","reason"],"type":"object"},"shared":{"additionalProperties":false,"properties":{"allowed":{"type":"boolean"},"reason":{"nullable":true,"type":"string"}},"required":["allowed","reason"],"type":"object"},"user":{"additionalProperties":false,"properties":{"allowed":{"type":"boolean"},"reason":{"nullable":true,"type":"string"}},"required":["allowed","reason"],"type":"object"}},"required":["user","project","shared","projectDefault"],"type":"object"}},"required":["layouts","defaults","permissions","builtins"],"type":"object"},"schedule_ScheduleLayoutUpdate":{"additionalProperties":false,"properties":{"document":{"additionalProperties":true,"description":"Layout document: { version, query, view, collapsed, grid, display?, ...feature sections }. Unknown keys are preserved.","properties":{"version":{"minimum":1,"type":"integer"}},"type":"object"},"name":{"maxLength":80,"minLength":1,"type":"string"},"revision":{"minimum":1,"type":"integer"}},"required":["revision"],"type":"object"},"schedule_ScheduleLessonsLearned":{"additionalProperties":false,"properties":{"activitiesCompared":{"type":"integer"},"grouping":{"additionalProperties":false,"properties":{"by":{"enum":["code","trade","name"],"type":"string"},"code_type":{"maxLength":256,"minLength":1,"type":"string"}},"required":["by"],"type":"object"},"groups":{"items":{"additionalProperties":false,"properties":{"actualMedianDays":{"type":"number"},"key":{"type":"string"},"label":{"type":"string"},"plannedMedianDays":{"type":"number"},"projects":{"type":"integer"},"ratioMedian":{"description":"Median actual / planned working days","type":"number"},"ratioP20":{"type":"number"},"ratioP80":{"type":"number"},"samples":{"type":"integer"}},"type":"object"},"maxItems":500,"type":"array"},"minSamples":{"type":"integer"},"projectsIncluded":{"type":"integer"},"projectsRead":{"type":"integer"},"scope":{"enum":["completed_projects","completed_activities"],"type":"string"},"sources":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string"},"project_id":{"type":"integer"}},"type":"object"},"type":"array"}},"required":["grouping","scope","groups","sources"],"type":"object"},"schedule_ScheduleLessonsOptions":{"additionalProperties":false,"properties":{"grouping":{"additionalProperties":false,"properties":{"by":{"enum":["code","trade","name"],"type":"string"},"code_type":{"maxLength":256,"minLength":1,"type":"string"}},"required":["by"],"type":"object"},"min_samples":{"maximum":100,"minimum":1,"type":"integer"},"scope":{"enum":["completed_projects","completed_activities"],"type":"string"}},"required":["grouping"],"type":"object"},"schedule_ScheduleLibraryContent":{"additionalProperties":false,"description":"A self-contained slice of a canonical definition (library-model.ts LibraryContent).","properties":{"activities":{"items":{"additionalProperties":true,"properties":{"activity_codes":{"additionalProperties":{"type":"string"},"type":"object"},"calendar_id":{"nullable":true,"type":"string"},"code":{"type":"string"},"duration_days":{"minimum":0,"type":"number"},"id":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"trade":{"type":"string"},"wbs_id":{"nullable":true,"type":"string"}},"required":["id","duration_days"],"type":"object"},"maxItems":5000,"minItems":1,"type":"array"},"activity_code_types":{"items":{"additionalProperties":true,"type":"object"},"maxItems":100,"type":"array"},"calendars":{"items":{"additionalProperties":true,"type":"object"},"maxItems":50,"type":"array"},"default_calendar_id":{"nullable":true,"type":"string"},"kind":{"enum":["plan","fragment"],"type":"string"},"relationships":{"items":{"additionalProperties":true,"type":"object"},"maxItems":20000,"type":"array"},"wbs":{"items":{"additionalProperties":true,"type":"object"},"maxItems":2000,"type":"array"}},"required":["kind","activities"],"type":"object"},"schedule_ScheduleLibraryInsert":{"additionalProperties":false,"properties":{"expected_version_id":{"minimum":1,"type":"integer"},"lessons":{"$ref":"#/components/schemas/schedule_ScheduleLessonsOptions"},"parent_wbs_id":{"maxLength":256,"nullable":true,"type":"string"},"predecessor_id":{"maxLength":256,"nullable":true,"type":"string"},"prefix":{"maxLength":16,"type":"string"},"successor_id":{"maxLength":256,"nullable":true,"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["expected_version_id"],"type":"object"},"schedule_ScheduleLibraryInsertResult":{"additionalProperties":false,"properties":{"activity_ids":{"additionalProperties":{"type":"string"},"description":"Template activity id to the id it got in the plan","type":"object"},"added":{"additionalProperties":{"type":"integer"},"type":"object"},"lessons_applied":{"type":"integer"},"renamed":{"type":"integer"},"template_id":{"type":"integer"},"template_version":{"type":"integer"},"version":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"version":{"type":"integer"}},"type":"object"}},"required":["version","template_id","template_version","added","renamed","lessons_applied","activity_ids"],"type":"object"},"schedule_ScheduleLibraryStats":{"additionalProperties":true,"properties":{"activities":{"type":"integer"},"codeTypes":{"type":"integer"},"durationDays":{"description":"Approximate longest path in working days, every link read as finish-to-start plus lag","type":"number"},"milestones":{"type":"integer"},"relationships":{"type":"integer"},"wbs":{"type":"integer"}},"type":"object"},"schedule_ScheduleLibraryTemplate":{"additionalProperties":true,"properties":{"archived_at":{"format":"date-time","nullable":true,"type":"string"},"can_manage":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"description":{"type":"string"},"id":{"type":"integer"},"kind":{"enum":["plan","fragment"],"type":"string"},"latest_version":{"minimum":1,"type":"integer"},"name":{"type":"string"},"owner_id":{"type":"integer"},"sector":{"type":"string"},"stats":{"additionalProperties":true,"nullable":true,"properties":{"activities":{"type":"integer"},"codeTypes":{"type":"integer"},"durationDays":{"description":"Approximate longest path in working days, every link read as finish-to-start plus lag","type":"number"},"milestones":{"type":"integer"},"relationships":{"type":"integer"},"wbs":{"type":"integer"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"},"visibility":{"enum":["private","company"],"type":"string"}},"required":["id","name","kind","visibility","owner_id","latest_version","can_manage"],"type":"object"},"schedule_ScheduleLibraryTemplateCreate":{"additionalProperties":false,"properties":{"description":{"maxLength":2000,"type":"string"},"name":{"maxLength":200,"minLength":1,"type":"string"},"note":{"maxLength":2000,"type":"string"},"sector":{"maxLength":100,"type":"string"},"selection":{"additionalProperties":false,"properties":{"activity_ids":{"items":{"maxLength":256,"minLength":1,"type":"string"},"maxItems":5000,"type":"array"},"kind":{"enum":["plan","fragment"],"type":"string"},"wbs_ids":{"items":{"maxLength":256,"minLength":1,"type":"string"},"maxItems":5000,"type":"array"}},"required":["kind"],"type":"object"},"visibility":{"default":"private","enum":["private","company"],"type":"string"}},"required":["name","selection"],"type":"object"},"schedule_ScheduleLibraryTemplateDetail":{"allOf":[{"$ref":"#/components/schemas/schedule_ScheduleLibraryTemplate"},{"properties":{"content":{"$ref":"#/components/schemas/schedule_ScheduleLibraryContent"},"content_version":{"minimum":1,"type":"integer"},"versions":{"items":{"additionalProperties":true,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"note":{"type":"string"},"source_project_id":{"nullable":true,"type":"integer"},"source_version_id":{"nullable":true,"type":"integer"},"stats":{"$ref":"#/components/schemas/schedule_ScheduleLibraryStats"},"version":{"type":"integer"}},"type":"object"},"type":"array"}},"required":["versions","content","content_version"],"type":"object"}]},"schedule_ScheduleLibraryTemplateList":{"additionalProperties":false,"properties":{"data":{"items":{"$ref":"#/components/schemas/schedule_ScheduleLibraryTemplate"},"type":"array"}},"required":["data"],"type":"object"},"schedule_ScheduleLibraryTemplateUpdate":{"additionalProperties":false,"minProperties":1,"properties":{"archived":{"type":"boolean"},"description":{"maxLength":2000,"type":"string"},"name":{"maxLength":200,"minLength":1,"type":"string"},"sector":{"maxLength":100,"type":"string"},"visibility":{"enum":["private","company"],"type":"string"}},"type":"object"},"schedule_ScheduleLibraryVersionCreate":{"additionalProperties":false,"properties":{"note":{"maxLength":2000,"type":"string"},"selection":{"additionalProperties":false,"properties":{"activity_ids":{"items":{"maxLength":256,"minLength":1,"type":"string"},"maxItems":5000,"type":"array"},"kind":{"enum":["plan","fragment"],"type":"string"},"wbs_ids":{"items":{"maxLength":256,"minLength":1,"type":"string"},"maxItems":5000,"type":"array"}},"required":["kind"],"type":"object"}},"required":["selection"],"type":"object"},"schedule_ScheduleLineOfBalance":{"additionalProperties":false,"properties":{"breakdown":{"additionalProperties":false,"nullable":true,"properties":{"assigned":{"type":"integer"},"code_type":{"nullable":true,"type":"string"},"issues":{"items":{"type":"string"},"type":"array"},"nodes":{"items":{"additionalProperties":false,"properties":{"depth":{"type":"integer"},"key":{"type":"string"},"label":{"type":"string"},"leaf":{"type":"boolean"},"parent":{"nullable":true,"type":"string"},"path":{"type":"string"}},"required":["key","label","path","depth","parent","leaf"],"type":"object"},"type":"array"},"source":{"description":"code: an activity code type flagged as the Location code; project: the project's Locations; field: the activity location text (' > ' separated paths)","enum":["code","project","field"],"type":"string"},"source_label":{"type":"string"},"trade_source":{"enum":["trade","code","name"],"type":"string"},"unassigned":{"type":"integer"}},"required":["source","source_label","code_type","trade_source","nodes","assigned","unassigned","issues"],"type":"object"},"calculation_id":{"nullable":true,"type":"integer"},"line_of_balance":{"additionalProperties":false,"description":"Null until the head version has a calculation","nullable":true,"properties":{"buffers":{"description":"Gap between one trade leaving a location and the next entering it","items":{"additionalProperties":false,"properties":{"days":{"type":"number"},"from_trade":{"type":"string"},"location":{"type":"string"},"tight":{"type":"boolean"},"to_trade":{"type":"string"}},"required":["location","from_trade","to_trade","days","tight"],"type":"object"},"type":"array"},"conflicts":{"description":"Two trades in one location at the same time","items":{"additionalProperties":false,"properties":{"days":{"type":"number"},"finish":{"format":"date","type":"string"},"location":{"type":"string"},"location_label":{"type":"string"},"start":{"format":"date","type":"string"},"trades":{"items":{"type":"string"},"maxItems":2,"minItems":2,"type":"array"}},"required":["location","location_label","trades","start","finish","days"],"type":"object"},"type":"array"},"crossings":{"description":"Trades that swap order between adjacent locations","items":{"additionalProperties":false,"properties":{"at":{"format":"date","type":"string"},"between":{"items":{"nullable":true,"type":"string"},"type":"array"},"trades":{"items":{"type":"string"},"type":"array"}},"required":["trades","between","at"],"type":"object"},"type":"array"},"finish":{"format":"date","nullable":true,"type":"string"},"lanes":{"description":"Locations in flow order (y axis)","items":{"additionalProperties":false,"properties":{"key":{"type":"string"},"label":{"type":"string"},"path":{"type":"string"}},"required":["key","label","path"],"type":"object"},"type":"array"},"lines":{"items":{"additionalProperties":false,"properties":{"direction":{"enum":["up","down","flat"],"type":"string"},"finish":{"format":"date","type":"string"},"locations":{"type":"integer"},"rate_per_week":{"description":"Locations per week","nullable":true,"type":"number"},"segments":{"items":{"additionalProperties":false,"properties":{"activity_ids":{"items":{"type":"string"},"type":"array"},"critical":{"type":"boolean"},"finish":{"format":"date","type":"string"},"location":{"type":"string"},"start":{"format":"date","type":"string"},"status":{"enum":["completed","in_progress","not_started","mixed","unknown"],"type":"string"}},"required":["location","start","finish","activity_ids","critical","status"],"type":"object"},"type":"array"},"start":{"format":"date","type":"string"},"trade":{"type":"string"},"waiting_days":{"description":"Crew waiting between successive locations (calendar days)","type":"number"}},"required":["trade","direction","start","finish","locations","rate_per_week","waiting_days","segments"],"type":"object"},"type":"array"},"skipped":{"additionalProperties":false,"properties":{"no_dates":{"type":"integer"},"no_location":{"type":"integer"},"no_trade":{"type":"integer"}},"required":["no_location","no_trade","no_dates"],"type":"object"},"start":{"format":"date","nullable":true,"type":"string"},"truncated":{"type":"boolean"}},"required":["lanes","start","finish","lines","conflicts","buffers","crossings","skipped","truncated"],"type":"object"},"takt":{"items":{"additionalProperties":false,"properties":{"complete_zones":{"type":"integer"},"id":{"type":"string"},"missing_activities":{"type":"integer"},"name":{"type":"string"},"on_takt_zones":{"type":"integer"},"start":{"type":"string"},"takt_days":{"type":"number"},"zones":{"items":{"additionalProperties":false,"properties":{"actual_completion":{"format":"date","nullable":true,"type":"string"},"completed_slots":{"type":"integer"},"forecast_completion":{"format":"date","nullable":true,"type":"string"},"label":{"type":"string"},"on_takt":{"nullable":true,"type":"boolean"},"planned_completion":{"nullable":true,"type":"string"},"slots":{"type":"integer"},"state":{"enum":["complete","in_progress","not_started","unknown"],"type":"string"},"variance_days":{"nullable":true,"type":"number"},"zone_id":{"type":"string"}},"required":["zone_id","label","planned_completion","actual_completion","forecast_completion","variance_days","state","on_takt","slots","completed_slots"],"type":"object"},"type":"array"}},"required":["id","name","takt_days","start","complete_zones","on_takt_zones","missing_activities","zones"],"type":"object"},"type":"array"},"version":{"type":"integer"},"version_id":{"nullable":true,"type":"integer"}},"required":["version_id","calculation_id","breakdown","line_of_balance","takt"],"type":"object"},"schedule_ScheduleLinkActivity":{"additionalProperties":false,"properties":{"code":{"nullable":true,"type":"string"},"early_finish":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"early_start":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"finish":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"id":{"type":"string"},"is_critical":{"type":"boolean"},"late_finish":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"late_start":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"name":{"type":"string"},"start":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"status":{"nullable":true,"type":"string"},"total_float_days":{"nullable":true,"type":"number"}},"required":["id","name","code","start","finish","early_start","early_finish","late_start","late_finish","total_float_days","is_critical","status"],"type":"object"},"schedule_ScheduleLinkAlerts":{"additionalProperties":false,"properties":{"became_critical":{"minimum":0,"type":"integer"},"breached":{"minimum":0,"type":"integer"},"evaluated":{"minimum":0,"type":"integer"},"notified":{"minimum":0,"type":"integer"},"unassessed":{"description":"Links whose source the caller cannot see.","minimum":0,"type":"integer"}},"required":["evaluated","became_critical","breached","unassessed","notified"],"type":"object"},"schedule_ScheduleLinkAssessment":{"description":"gates: required_by, lead_time_days, forecast, forecast_source, slack_days. blocks: needed_by, forecast, forecast_source.","properties":{"forecast":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"forecast_source":{"enum":["link","source",null],"nullable":true,"type":"string"},"lead_time_days":{"minimum":0,"type":"integer"},"needed_by":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"required_by":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"slack_days":{"nullable":true,"type":"integer"},"state":{"enum":["satisfied","activity_started","on_track","at_risk","breached","no_forecast","unscheduled","resolved","open","late","overdue","recorded"],"type":"string"},"workflow":{"enum":["gates","blocks","impacts","progress","reference"],"type":"string"}},"required":["workflow","state"],"type":"object"},"schedule_ScheduleLinkScheduleSummary":{"additionalProperties":false,"properties":{"available":{"type":"boolean"},"calculated_at":{"format":"date-time","nullable":true,"type":"string"},"calculation_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"data_date":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"full_network":{"description":"True for Schedule admins, who see every activity.","type":"boolean"},"version":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["available","version_id","version","data_date","calculation_id","calculated_at","full_network"],"type":"object"},"schedule_ScheduleMaterializationApplication":{"additionalProperties":false,"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"counts":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationCounts"},"created_at":{"format":"date-time","type":"string"},"publication_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"replayed":{"type":"boolean"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["publication_id","version_id","calculation_id","created_at","replayed","counts"],"type":"object"},"schedule_ScheduleMaterializationApplyRequest":{"additionalProperties":false,"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"decisions":{"items":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationDecision"},"maxItems":10000,"type":"array"},"expected_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["expected_version_id","calculation_id","decisions","preview_digest"],"type":"object"},"schedule_ScheduleMaterializationBindDecision":{"additionalProperties":false,"properties":{"activity_id":{"maxLength":512,"minLength":1,"type":"string"},"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"operation":{"enum":["bind"],"type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","activity_id","task_id","expected_row_digest"],"type":"object"},"schedule_ScheduleMaterializationCounts":{"additionalProperties":false,"description":"Operation counts, including automatic projection and retained unchanged tasks; not a count of changed dates alone.","properties":{"bind":{"minimum":0,"type":"integer"},"create":{"minimum":0,"type":"integer"},"project":{"minimum":0,"type":"integer"},"restore":{"minimum":0,"type":"integer"},"retain":{"minimum":0,"type":"integer"},"retire":{"minimum":0,"type":"integer"}},"required":["create","bind","project","retain","retire","restore"],"type":"object"},"schedule_ScheduleMaterializationCreateDecision":{"additionalProperties":false,"properties":{"activity_id":{"maxLength":512,"minLength":1,"type":"string"},"assigned_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"baseline_policy":{"enum":["none","initial_dates"],"type":"string"},"operation":{"enum":["create"],"type":"string"},"private":{"type":"boolean"},"progress_policy":{"enum":["unstarted"],"type":"string"}},"required":["operation","activity_id","private","assigned_id","baseline_policy","progress_policy"],"type":"object"},"schedule_ScheduleMaterializationDecision":{"description":"Explicit decisions only. project is a server-derived operation and cannot be submitted. Exact activity/task identifiers and server-provided row digests are required; names never establish identity.","discriminator":{"mapping":{"bind":"#/components/schemas/ScheduleMaterializationBindDecision","create":"#/components/schemas/ScheduleMaterializationCreateDecision","restore":"#/components/schemas/ScheduleMaterializationRestoreDecision","retain":"#/components/schemas/ScheduleMaterializationRetainDecision","retire":"#/components/schemas/ScheduleMaterializationRetireDecision"},"propertyName":"operation"},"oneOf":[{"$ref":"#/components/schemas/schedule_ScheduleMaterializationCreateDecision"},{"$ref":"#/components/schemas/schedule_ScheduleMaterializationBindDecision"},{"$ref":"#/components/schemas/schedule_ScheduleMaterializationRestoreDecision"},{"$ref":"#/components/schemas/schedule_ScheduleMaterializationRetainDecision"},{"$ref":"#/components/schemas/schedule_ScheduleMaterializationRetireDecision"}]},"schedule_ScheduleMaterializationInventory":{"additionalProperties":false,"description":"Authorized decision candidates, not an engine-verified preview. Candidate actions are conditional on the exact selected pairing. inventory_digest cannot replace preview_digest. Assignees expose only IDs and names for active project members. No pagination or silent truncation: oversized inventories fail with 413.","properties":{"activities":{"items":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationInventoryActivity"},"maxItems":10000,"type":"array"},"assignees":{"items":{"additionalProperties":false,"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"maxItems":50000,"type":"array"},"blockers":{"items":{"type":"string"},"type":"array"},"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"can_apply":{"enum":[false],"type":"boolean"},"create_defaults":{"additionalProperties":false,"properties":{"assigned_id":{"enum":[null],"nullable":true,"type":"integer"},"baseline_policy":{"enum":["none"],"type":"string"},"private":{"enum":[true],"type":"boolean"},"progress_policy":{"enum":["unstarted"],"type":"string"}},"required":["private","assigned_id","baseline_policy","progress_policy"],"type":"object"},"disclosures":{"items":{"type":"string"},"type":"array"},"inventory_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"origin":{"enum":["native","imported","unsupported"],"type":"string"},"requires_preview":{"enum":[true],"type":"boolean"},"tasks":{"items":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationInventoryTask"},"maxItems":50000,"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","calculation_id","inventory_digest","origin","requires_preview","can_apply","blockers","disclosures","create_defaults","assignees","activities","tasks"],"type":"object"},"schedule_ScheduleMaterializationInventoryActivity":{"additionalProperties":false,"properties":{"actions":{"items":{"enum":["create","bind","restore"],"type":"string"},"type":"array"},"activity_id":{"maxLength":512,"minLength":1,"type":"string"},"blockers":{"items":{"type":"string"},"type":"array"},"decision_required":{"type":"boolean"},"kind":{"type":"string"},"name":{"type":"string"},"status":{"enum":["unbound","bound_live","bound_retired","blocked"],"type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["activity_id","name","kind","status","task_id","decision_required","actions","blockers"],"type":"object"},"schedule_ScheduleMaterializationInventoryTask":{"additionalProperties":false,"properties":{"actions":{"items":{"enum":["bind","retain","retire","restore"],"type":"string"},"type":"array"},"activity_id":{"maxLength":512,"minLength":1,"nullable":true,"type":"string"},"actual_finish_date":{"format":"date","nullable":true,"type":"string"},"actual_start_date":{"format":"date","nullable":true,"type":"string"},"assigned_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"blockers":{"items":{"type":"string"},"type":"array"},"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"finish_date":{"format":"date","type":"string"},"lifecycle":{"enum":["live","retired"],"type":"string"},"milestone":{"type":"boolean"},"name":{"type":"string"},"percent_complete":{"maximum":100,"minimum":0,"type":"integer"},"private":{"type":"boolean"},"role":{"enum":["unbound","current_activity","removed_activity","reserved_retired","unsupported"],"type":"string"},"start_date":{"format":"date","type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["task_id","name","expected_row_digest","lifecycle","role","activity_id","private","assigned_id","milestone","start_date","finish_date","percent_complete","actual_start_date","actual_finish_date","actions","blockers"],"type":"object"},"schedule_ScheduleMaterializationPreview":{"additionalProperties":false,"description":"Engine-verified review of the explicit decisions. apply_supported is true only for a native origin; can_apply also requires no global or row blockers. A successful HTTP preview can contain blockers and does not write tasks or authorize a different decision set.","properties":{"apply_supported":{"type":"boolean"},"blockers":{"items":{"type":"string"},"type":"array"},"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"can_apply":{"type":"boolean"},"counts":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationCounts"},"disclosures":{"items":{"type":"string"},"type":"array"},"engine_revision":{"type":"string"},"field_hierarchy_review":{"$ref":"#/components/schemas/schedule_ScheduleFieldHierarchyReview"},"field_mapping":{"enum":["dates_critical_and_explicit_lifecycle"],"type":"string"},"hierarchy_review":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyReview"},"origin":{"enum":["native","imported","unsupported"],"type":"string"},"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"rows":{"items":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationReviewRow"},"maxItems":50000,"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","calculation_id","engine_revision","preview_digest","origin","field_mapping","can_apply","apply_supported","counts","blockers","disclosures","rows"],"type":"object"},"schedule_ScheduleMaterializationPreviewRequest":{"additionalProperties":false,"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"decisions":{"items":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationDecision"},"maxItems":10000,"type":"array"},"expected_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["expected_version_id","decisions"],"type":"object"},"schedule_ScheduleMaterializationRestoreDecision":{"additionalProperties":false,"properties":{"activity_id":{"maxLength":512,"minLength":1,"type":"string"},"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"operation":{"enum":["restore"],"type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","activity_id","task_id","expected_row_digest"],"type":"object"},"schedule_ScheduleMaterializationRetainDecision":{"additionalProperties":false,"properties":{"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"operation":{"enum":["retain"],"type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","task_id","expected_row_digest"],"type":"object"},"schedule_ScheduleMaterializationRetireDecision":{"additionalProperties":false,"properties":{"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"operation":{"enum":["retire"],"type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","task_id","expected_row_digest"],"type":"object"},"schedule_ScheduleMaterializationReviewFields":{"additionalProperties":false,"description":"Allowlisted authored fields and date-only values. Null before means no existing task; null after means no proposed task snapshot. Excludes raw calculation, receipt, source and reference evidence.","nullable":true,"properties":{"actual_finish_date":{"format":"date","nullable":true,"type":"string"},"actual_start_date":{"format":"date","nullable":true,"type":"string"},"assigned_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"baseline_finish_date":{"format":"date","nullable":true,"type":"string"},"baseline_start_date":{"format":"date","nullable":true,"type":"string"},"color":{"nullable":true,"type":"string"},"critical":{"type":"boolean"},"finish_date":{"format":"date","type":"string"},"milestone":{"type":"boolean"},"name":{"type":"string"},"notes":{"nullable":true,"type":"string"},"parent_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"percent_complete":{"maximum":100,"minimum":0,"type":"integer"},"private":{"type":"boolean"},"start_date":{"format":"date","type":"string"},"wbs_code":{"nullable":true,"type":"string"}},"required":["name","notes","private","assigned_id","parent_id","wbs_code","color","milestone","percent_complete","start_date","finish_date","critical","baseline_start_date","baseline_finish_date","actual_start_date","actual_finish_date"],"type":"object"},"schedule_ScheduleMaterializationReviewRow":{"additionalProperties":false,"properties":{"activity_id":{"maxLength":512,"minLength":1,"nullable":true,"type":"string"},"after":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationReviewFields"},"before":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationReviewFields"},"blockers":{"items":{"type":"string"},"type":"array"},"calculated":{"type":"boolean"},"lifecycle":{"enum":["live","retired","unchanged"],"type":"string"},"operation":{"enum":["create","bind","project","retain","retire","restore"],"type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["operation","task_id","activity_id","lifecycle","calculated","blockers","before","after"],"type":"object"},"schedule_SchedulePeriodPerformance":{"additionalProperties":false,"properties":{"ledger_writes":{"enum":[false],"type":"boolean"},"periods":{"items":{"$ref":"#/components/schemas/schedule_SchedulePeriodPerformanceRun"},"type":"array"},"rows":{"items":{"additionalProperties":false,"properties":{"activity_id":{"type":"string"},"actual_cost_this_period":{"nullable":true,"type":"string"},"actual_cost_to_date":{"nullable":true,"type":"string"},"actual_units_this_period":{"nullable":true,"type":"number"},"actual_units_to_date":{"nullable":true,"type":"number"},"assignment_key":{"nullable":true,"type":"string"},"earned_value_cost":{"nullable":true,"type":"string"},"planned_value_cost":{"nullable":true,"type":"string"},"resource_id":{"nullable":true,"type":"string"},"subject":{"enum":["activity","assignment"],"type":"string"}},"required":["subject","activity_id","assignment_key","resource_id","actual_units_to_date","actual_units_this_period","actual_cost_to_date","actual_cost_this_period","earned_value_cost","planned_value_cost"],"type":"object"},"nullable":true,"type":"array"},"run":{"allOf":[{"$ref":"#/components/schemas/schedule_SchedulePeriodPerformanceRun"}],"nullable":true},"source":{"enum":["schedule_resource_actuals"],"type":"string"}},"required":["periods","run","rows","source","ledger_writes"],"type":"object"},"schedule_SchedulePeriodPerformanceRun":{"additionalProperties":true,"properties":{"activity_count":{"type":"integer"},"actual_cost_this_period":{"description":"Exact two-decimal amount","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"actual_cost_to_date":{"description":"Exact two-decimal amount","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"actual_units_this_period":{"nullable":true,"type":"number"},"actual_units_to_date":{"nullable":true,"type":"number"},"assignment_count":{"type":"integer"},"baseline_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"data_date":{"format":"date","type":"string"},"earned_value_cost":{"description":"Exact two-decimal amount","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"earned_value_technique":{"description":"The project's earned value technique when stored; null for runs stored before it was recorded","enum":["activity_percent_complete","zero_one_hundred","fifty_fifty","custom_percent","wbs_milestones","resource_curves",null],"nullable":true,"type":"string"},"financial_period_id":{"type":"integer"},"id":{"type":"integer"},"note":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_name":{"nullable":true,"type":"string"},"period_start":{"format":"date","type":"string"},"planned_value_cost":{"description":"Exact two-decimal amount","nullable":true,"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"previous_run_id":{"nullable":true,"type":"integer"},"sequence":{"type":"integer"},"superseded_runs":{"description":"Earlier runs of the same period, retained","items":{"type":"integer"},"type":"array"},"update_period_id":{"nullable":true,"type":"integer"},"version_id":{"type":"integer"}},"required":["id","financial_period_id","sequence","period_start","period_end","version_id","data_date","activity_count","assignment_count","actual_units_to_date","actual_units_this_period","actual_cost_to_date","actual_cost_this_period","earned_value_cost","planned_value_cost","created_at"],"type":"object"},"schedule_SchedulePortfolio":{"additionalProperties":true,"properties":{"axis":{"additionalProperties":true,"nullable":true,"properties":{"days":{"type":"number"},"from":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"ticks":{"items":{"additionalProperties":true,"properties":{"day":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"label":{"type":"string"},"offset":{"type":"number"}},"required":["day","label","offset"],"type":"object"},"type":"array"},"to":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["from","to","days","ticks"],"type":"object"},"basis":{"type":"string"},"filters":{"additionalProperties":true,"type":"object"},"links":{"items":{"allOf":[{"$ref":"#/components/schemas/schedule_ScheduleProgramLink"},{"additionalProperties":true,"properties":{"predecessor_dates":{"additionalProperties":true,"nullable":true,"properties":{"finish":{"nullable":true,"type":"string"},"start":{"nullable":true,"type":"string"}},"required":["start","finish"],"type":"object"},"successor_dates":{"additionalProperties":true,"nullable":true,"properties":{"finish":{"nullable":true,"type":"string"},"start":{"nullable":true,"type":"string"}},"required":["start","finish"],"type":"object"}},"required":["predecessor_dates","successor_dates"],"type":"object"}]},"type":"array"},"options":{"additionalProperties":true,"properties":{"pms":{"items":{"additionalProperties":true,"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"programs":{"items":{"additionalProperties":true,"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"project_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"}},"required":["id","name","project_ids"],"type":"object"},"type":"array"},"projectTypes":{"items":{"type":"string"},"type":"array"},"regions":{"items":{"type":"string"},"type":"array"},"stages":{"items":{"type":"string"},"type":"array"},"statuses":{"items":{"type":"string"},"type":"array"}},"required":["regions","stages","projectTypes","pms","statuses","programs"],"type":"object"},"rows":{"items":{"additionalProperties":true,"properties":{"access":{"enum":["view","admin"],"type":"string"},"city":{"nullable":true,"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"pm":{"items":{"additionalProperties":true,"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"projectNumber":{"nullable":true,"type":"string"},"projectType":{"nullable":true,"type":"string"},"region":{"nullable":true,"type":"string"},"schedule":{"additionalProperties":true,"description":"Null unless the caller is Schedule admin on the project and it has a saved version","nullable":true,"properties":{"baselineFinish":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"baselineName":{"nullable":true,"type":"string"},"calculatedAt":{"format":"date-time","nullable":true,"type":"string"},"calculationId":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"criticalCount":{"nullable":true,"type":"number"},"dataDate":{"nullable":true,"type":"string"},"dataDateAgeDays":{"nullable":true,"type":"number"},"finishVarianceDays":{"nullable":true,"type":"number"},"healthGrade":{"nullable":true,"type":"string"},"healthScore":{"nullable":true,"type":"number"},"milestones":{"items":{"additionalProperties":true,"properties":{"critical":{"type":"boolean"},"finish":{"nullable":true,"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"start":{"nullable":true,"type":"string"}},"required":["id","name","kind","start","finish","critical"],"type":"object"},"type":"array"},"negativeFloat":{"nullable":true,"type":"number"},"projectFinish":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"projectStart":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"staleDataDate":{"type":"boolean"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"versionCreatedAt":{"format":"date-time","type":"string"},"versionId":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["versionId","version","versionCreatedAt","calculationId","calculatedAt","projectStart","projectFinish","dataDate","criticalCount","negativeFloat","baselineName","baselineFinish","healthGrade","healthScore","finishVarianceDays","dataDateAgeDays","staleDataDate","milestones"],"type":"object"},"stage":{"nullable":true,"type":"string"},"stateCode":{"nullable":true,"type":"string"},"status":{"enum":["on_track","behind","negative_float","not_calculated","no_schedule","restricted"],"type":"string"}},"required":["id","name","projectNumber","region","stage","projectType","city","stateCode","access","pm","status","schedule"],"type":"object"},"type":"array"},"totals":{"additionalProperties":true,"properties":{"administered":{"type":"number"},"behind":{"type":"number"},"calculated":{"type":"number"},"critical":{"type":"number"},"latestFinish":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"negativeFloat":{"type":"number"},"projects":{"type":"number"},"staleDataDates":{"type":"number"}},"required":["projects","administered","calculated","behind","negativeFloat","critical","staleDataDates","latestFinish"],"type":"object"}},"required":["rows","totals","options","filters","axis","links","basis"],"type":"object"},"schedule_SchedulePortfolioResources":{"additionalProperties":true,"properties":{"basis":{"type":"string"},"bucket":{"type":"string"},"candidates":{"items":{"additionalProperties":true,"properties":{"name":{"type":"string"},"project_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"resource_ids":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}},"required":["name","project_ids","resource_ids"],"type":"object"},"type":"array"},"coverage":{"items":{"additionalProperties":true,"properties":{"histogram":{"additionalProperties":true,"nullable":true,"properties":{"bucket":{"type":"string"},"comparable":{"type":"boolean"},"report_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["report_id","bucket","comparable"],"type":"object"},"mapping":{"enum":["retained","none_retained","not_visible"],"type":"string"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"project_name":{"type":"string"},"workforce":{"enum":["retained","none_retained","not_visible"],"type":"string"}},"required":["project_id","project_name","histogram","mapping","workforce"],"type":"object"},"type":"array"},"project_names":{"additionalProperties":{"type":"string"},"type":"object"},"shared":{"items":{"additionalProperties":true,"properties":{"contention_periods":{"type":"number"},"first_contention":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"key":{"type":"string"},"name":{"type":"string"},"peak_combined_units":{"type":"number"},"periods":{"items":{"additionalProperties":true,"properties":{"peak_day_units_upper_bound":{"type":"number"},"period":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"project_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"total_units":{"type":"number"}},"required":["period","project_ids","total_units","peak_day_units_upper_bound"],"type":"object"},"type":"array"},"project_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"resource_ids":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["person","crew","equipment"],"type":"string"},"unit_mismatch":{"type":"boolean"},"units":{"items":{"type":"string"},"type":"array"}},"required":["key","source_type","source_id","name","units","unit_mismatch","project_ids","resource_ids","contention_periods","first_contention","peak_combined_units","periods"],"type":"object"},"type":"array"},"truncated":{"type":"boolean"},"workforce":{"items":{"additionalProperties":true,"properties":{"concurrent_days":{"type":"number"},"cross_project_over_days":{"type":"number"},"first_over_day":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"name":{"nullable":true,"type":"string"},"over_capacity_days":{"type":"number"},"peak_demand_minutes":{"type":"number"},"person_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"project_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"weeks":{"items":{"additionalProperties":true,"properties":{"available_minutes":{"type":"number"},"demand_minutes":{"type":"number"},"over_days":{"type":"number"},"project_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"week":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["week","demand_minutes","available_minutes","over_days","project_ids"],"type":"object"},"type":"array"}},"required":["person_id","name","project_ids","over_capacity_days","cross_project_over_days","concurrent_days","peak_demand_minutes","first_over_day","weeks"],"type":"object"},"type":"array"}},"required":["bucket","workforce","shared","candidates","coverage","project_names","truncated","basis"],"type":"object"},"schedule_SchedulePpcReport":{"additionalProperties":false,"properties":{"issues":{"items":{"additionalProperties":false,"properties":{"code":{"enum":["LP_EMPTY_WEEK","LP_WEEK_NOT_ASSESSED","LP_VARIANCE_UNEXPLAINED"],"type":"string"},"message":{"type":"string"},"week_starting":{"format":"date","type":"string"}},"required":["code","week_starting","message"],"type":"object"},"type":"array"},"mean_ppc":{"description":"Mean over measurable weeks only (never counts an unmeasurable week as zero)","maximum":100,"minimum":0,"nullable":true,"type":"number"},"measurable_weeks":{"type":"integer"},"top_reasons":{"items":{"additionalProperties":false,"properties":{"count":{"type":"integer"},"label":{"type":"string"},"reason":{"enum":["prerequisite_work","materials","labour","equipment","information","design_change","directive","weather","access","over_commitment","not_recorded"],"type":"string"}},"required":["reason","label","count"],"type":"object"},"type":"array"},"trades":{"items":{"additionalProperties":false,"properties":{"committed":{"type":"integer"},"completed":{"type":"integer"},"missed":{"type":"integer"},"ppc":{"description":"Percent plan complete (0-100); null when the week or trade cannot be measured","maximum":100,"minimum":0,"nullable":true,"type":"number"},"trade":{"type":"string"},"unassessed":{"type":"integer"},"weeks":{"type":"integer"}},"required":["trade","committed","completed","missed","unassessed","ppc","weeks"],"type":"object"},"type":"array"},"variance":{"additionalProperties":{"type":"integer"},"description":"Missed commitments by variance reason","type":"object"},"weeks":{"description":"Every week of the window in order (the trend)","items":{"$ref":"#/components/schemas/schedule_ScheduleWeekReliability"},"type":"array"},"window":{"additionalProperties":false,"properties":{"from":{"format":"date","type":"string"},"to":{"format":"date","type":"string"}},"required":["from","to"],"type":"object"}},"required":["window","weeks","mean_ppc","measurable_weeks","trades","variance","top_reasons","issues"],"type":"object"},"schedule_SchedulePresence":{"additionalProperties":false,"properties":{"head":{"additionalProperties":false,"nullable":true,"properties":{"saved_at":{"format":"date-time","type":"string"},"saved_by":{"additionalProperties":false,"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"version":{"type":"integer"},"version_id":{"type":"integer"}},"required":["version_id","version","saved_at","saved_by"],"type":"object"},"sessions":{"items":{"additionalProperties":false,"properties":{"activity_hidden":{"description":"The person has an activity selected that you cannot see","type":"boolean"},"activity_id":{"nullable":true,"type":"string"},"editing":{"description":"Soft lock: they hold unsaved edits to the activity (advisory, never blocks a save)","type":"boolean"},"seen_at":{"format":"date-time","type":"string"},"user":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"version_id":{"nullable":true,"type":"integer"}},"required":["user","activity_id","activity_hidden","editing","version_id","seen_at"],"type":"object"},"type":"array"},"ttl_ms":{"type":"integer"}},"required":["head","sessions","ttl_ms"],"type":"object"},"schedule_ScheduleProgramCalculate":{"additionalProperties":false,"properties":{"align_to_project_id":{"description":"After an option_conflict run: take every network-wide scheduling option (progress mode, lag calendar, progress, Expected Finish and external-date settings) from this selected project. The run lists every project it overrides.","maximum":2147483647,"minimum":1,"type":"integer"},"program_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"project_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"maxItems":25,"minItems":1,"type":"array"},"slip":{"additionalProperties":false,"properties":{"activity_ids":{"description":"Extend these activities; omit to slip the project's outgoing links","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":200,"minItems":1,"type":"array"},"days":{"maximum":3650,"minimum":1,"type":"integer"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["project_id","days"],"type":"object"},"slip_days":{"default":10,"description":"Working days each project's outgoing links slip in the default impact scenarios","maximum":365,"minimum":1,"type":"integer"}},"type":"object"},"schedule_ScheduleProgramLevelling":{"additionalProperties":false,"properties":{"align_to_project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"horizon":{"default":"within_float","enum":["within_float","extend_finish"],"type":"string"},"program_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"project_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"maxItems":25,"minItems":2,"type":"array"}},"type":"object"},"schedule_ScheduleProgramLevellingProposal":{"additionalProperties":false,"properties":{"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"request_id":{"format":"uuid","type":"string"}},"required":["project_id","request_id"],"type":"object"},"schedule_ScheduleProgramLevellingProposalResult":{"additionalProperties":true,"properties":{"edits":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"replayed":{"type":"boolean"},"run_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["project_id","run_id","edits"],"type":"object"},"schedule_ScheduleProgramLink":{"additionalProperties":true,"properties":{"category":{"enum":["handoff","shared_resource","utility_shutdown","access","other"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"lag_days":{"type":"integer"},"note":{"type":"string"},"predecessor":{"additionalProperties":true,"properties":{"activity_id":{"type":"string"},"activity_name":{"nullable":true,"type":"string"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"project_name":{"type":"string"},"stale":{"type":"boolean"}},"required":["project_id","project_name","activity_id","activity_name","stale"],"type":"object"},"successor":{"additionalProperties":true,"properties":{"activity_id":{"type":"string"},"activity_name":{"nullable":true,"type":"string"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"project_name":{"type":"string"},"stale":{"type":"boolean"}},"required":["project_id","project_name","activity_id","activity_name","stale"],"type":"object"},"type":{"enum":["FS","SS","FF","SF"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"updated_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","predecessor","successor","type","lag_days","category","note","created_by_id","created_at","updated_by_id","updated_at"],"type":"object"},"schedule_ScheduleProgramLinkCreate":{"additionalProperties":false,"properties":{"category":{"default":"handoff","enum":["handoff","shared_resource","utility_shutdown","access","other"],"type":"string"},"lag_days":{"default":0,"description":"Working days on the predecessor's calendar","maximum":3650,"minimum":-3650,"type":"integer"},"note":{"maxLength":1000,"type":"string"},"predecessor_activity_id":{"maxLength":200,"minLength":1,"type":"string"},"predecessor_project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"successor_activity_id":{"maxLength":200,"minLength":1,"type":"string"},"successor_project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":{"default":"FS","enum":["FS","SS","FF","SF"],"type":"string"}},"required":["predecessor_project_id","predecessor_activity_id","successor_project_id","successor_activity_id"],"type":"object"},"schedule_ScheduleProgramLinkUpdate":{"additionalProperties":false,"minProperties":1,"properties":{"category":{"enum":["handoff","shared_resource","utility_shutdown","access","other"],"type":"string"},"lag_days":{"maximum":3650,"minimum":-3650,"type":"integer"},"note":{"maxLength":1000,"type":"string"},"type":{"enum":["FS","SS","FF","SF"],"type":"string"}},"type":"object"},"schedule_ScheduleProgramProposal":{"additionalProperties":false,"properties":{"link_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"request_id":{"format":"uuid","type":"string"}},"required":["link_id","request_id"],"type":"object"},"schedule_ScheduleProgramProposalResult":{"additionalProperties":true,"properties":{"link_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"proposal":{"additionalProperties":true,"properties":{"activity_id":{"type":"string"},"constraint":{"type":"string"},"constraint_date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"note":{"type":"string"},"op":{"enum":["set_constraint"],"type":"string"}},"required":["op","activity_id","constraint","constraint_date","note"],"type":"object"},"replayed":{"type":"boolean"},"run_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"scenario":{"$ref":"#/components/schemas/schedule_ScheduleScenario"}},"required":["scenario","replayed","project_id","run_id","link_id","proposal"],"type":"object"},"schedule_ScheduleProgramRun":{"additionalProperties":true,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"parameters":{"additionalProperties":true,"type":"object"},"pins":{"items":{"additionalProperties":true,"properties":{"digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"project_name":{"type":"string"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["project_id","project_name","version_id","version","digest"],"type":"object"},"type":"array"},"project_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"result":{"additionalProperties":true,"properties":{"align_candidates":{"description":"option_conflict only: project keys usable as align_to_project_id.","items":{"type":"string"},"type":"array"},"basis":{"type":"string"},"conflicts":{"description":"option_conflict only: network-wide options whose values differ between projects whose dates they change.","items":{"additionalProperties":true,"properties":{"label":{"type":"string"},"option":{"type":"string"},"reason":{"type":"string"},"values":{"items":{"additionalProperties":true,"properties":{"lagged_links":{"type":"integer"},"project":{"type":"string"},"value":{}},"required":["project","value"],"type":"object"},"type":"array"}},"required":["option","label","reason","values"],"type":"object"},"type":"array"},"dates_applied":{"enum":[false],"type":"boolean"},"links":{"items":{"additionalProperties":true,"properties":{"delay_days":{"nullable":true,"type":"number"},"driving":{"type":"boolean"},"id":{"type":"string"},"lag_days":{"type":"number"},"predecessor_activity":{"type":"string"},"predecessor_finish":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"predecessor_project":{"type":"string"},"predecessor_start":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"proposal":{"additionalProperties":true,"properties":{"activity_id":{"type":"string"},"constraint":{"enum":["start_on_or_after","finish_on_or_after"],"type":"string"},"constraint_date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"relevant":{"type":"boolean"}},"required":["activity_id","constraint","constraint_date","relevant"],"type":"object"},"successor_activity":{"type":"string"},"successor_finish":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"successor_project":{"type":"string"},"successor_standalone_date":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"successor_start":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"successor_total_float_days":{"nullable":true,"type":"number"},"type":{"type":"string"}},"required":["id","predecessor_project","successor_project","driving","proposal"],"type":"object"},"type":"array"},"loop":{"items":{"additionalProperties":true,"properties":{"activity_id":{"type":"string"},"project":{"type":"string"}},"required":["project","activity_id"],"type":"object"},"type":"array"},"option_basis_project":{"type":"string"},"option_differences":{"items":{"type":"string"},"type":"array"},"option_resolution":{"additionalProperties":true,"description":"Each project's own options (data date, calendar default, deadline, total float method, open-end criticality) and how network-wide options were reconciled: mode per_project or aligned, the joint values, tolerated differences with the reason each cannot change dates, and aligned overrides.","type":"object"},"precision":{"type":"string"},"programme_finish":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"programme_start":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"projects":{"items":{"additionalProperties":true,"properties":{"activity_count":{"type":"number"},"critical_count":{"type":"number"},"data_date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"driven_by_projects":{"items":{"type":"string"},"type":"array"},"drives_programme":{"type":"boolean"},"driving_path":{"items":{"additionalProperties":true,"properties":{"activity_id":{"type":"string"},"finish":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"is_critical":{"type":"boolean"},"name":{"type":"string"},"project":{"type":"string"},"start":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"total_float_days":{"nullable":true,"type":"number"}},"required":["project","activity_id","name","start","finish","total_float_days","is_critical"],"type":"object"},"type":"array"},"external_drivers":{"items":{"type":"string"},"type":"array"},"finish":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"finish_delta_days":{"type":"number"},"key":{"type":"string"},"name":{"type":"string"},"standalone_finish":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"standalone_parity":{"nullable":true,"type":"boolean"},"standalone_start":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"start":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"terminal_activity_id":{"nullable":true,"type":"string"}},"required":["key","name","data_date","start","finish","standalone_start","standalone_finish","finish_delta_days","activity_count","critical_count","drives_programme","standalone_parity","terminal_activity_id","driving_path","external_drivers","driven_by_projects"],"type":"object"},"type":"array"},"resource_levelling":{"additionalProperties":true,"description":"Levelling runs only: advisory cross-project levelling of shared resources. Moves and per-project proposals (set_constraint start_on_or_after edits); nothing is written.","properties":{"basis":{"type":"string"},"horizon":{"enum":["within_float","extend_finish"],"type":"string"},"mode":{"enum":["advisory"],"type":"string"},"moves":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"pools":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"proposals":{"items":{"additionalProperties":true,"properties":{"edits":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"move_count":{"minimum":0,"type":"integer"},"project":{"type":"string"}},"required":["project","edits","move_count"],"type":"object"},"type":"array"},"status":{"enum":["levelled","no_shared_demand"],"type":"string"}},"required":["status","basis","horizon","mode","pools","moves","proposals"],"type":"object"},"slips":{"items":{"additionalProperties":true,"properties":{"applied":{"items":{"type":"string"},"type":"array"},"days":{"type":"number"},"impacts":{"items":{"additionalProperties":true,"properties":{"finish":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"finish_delta_days":{"type":"number"},"project":{"type":"string"}},"required":["project","finish","finish_delta_days"],"type":"object"},"type":"array"},"key":{"type":"string"},"link_impacts":{"items":{"additionalProperties":true,"properties":{"id":{"type":"string"},"successor_start_delta_days":{"type":"number"}},"required":["id","successor_start_delta_days"],"type":"object"},"type":"array"},"method":{"enum":["activity_duration","outgoing_link_lag"],"type":"string"},"programme_finish_delta_days":{"type":"number"},"project":{"type":"string"},"skipped_activity_ids":{"items":{"type":"string"},"type":"array"}},"required":["key","project","days","method","applied","skipped_activity_ids","programme_finish_delta_days","impacts","link_impacts"],"type":"object"},"type":"array"},"status":{"enum":["computed","logic_loop","option_conflict"],"type":"string"}},"required":["status","basis","dates_applied"],"type":"object"},"result_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"stale_project_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"}},"required":["id","project_ids","pins","parameters","engine_revision","input_digest","result_digest","created_by_id","created_at","stale_project_ids","result"],"type":"object"},"schedule_ScheduleProgramRunSummary":{"additionalProperties":true,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"pins":{"items":{"type":"object"},"type":"array"},"programme_finish":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"project_ids":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"status":{"nullable":true,"type":"string"}},"required":["id","project_ids","pins","created_by_id","created_at","status","programme_finish"],"type":"object"},"schedule_ScheduleProgressApplication":{"additionalProperties":false,"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"counts":{"additionalProperties":false,"properties":{"bind":{"minimum":0,"type":"integer"},"create":{"minimum":0,"type":"integer"},"move":{"minimum":0,"type":"integer"},"project":{"minimum":0,"type":"integer"},"restore":{"minimum":0,"type":"integer"},"retain":{"minimum":0,"type":"integer"},"retire":{"minimum":0,"type":"integer"}},"required":["create","bind","move","restore","project","retain","retire"],"type":"object"},"created_at":{"format":"date-time","type":"string"},"publication_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"replayed":{"type":"boolean"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["publication_id","version_id","calculation_id","created_at","replayed","counts"],"type":"object"},"schedule_ScheduleProgressApplyRequest":{"additionalProperties":false,"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"decisions":{"items":{"$ref":"#/components/schemas/schedule_ScheduleProgressDecision"},"maxItems":20000,"type":"array"},"expected_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"progress_decisions":{"items":{"$ref":"#/components/schemas/schedule_ScheduleProgressReviewDecision"},"maxItems":10000,"type":"array"}},"required":["expected_version_id","calculation_id","decisions","preview_digest","progress_decisions"],"type":"object"},"schedule_ScheduleProgressDecision":{"oneOf":[{"additionalProperties":false,"properties":{"assigned_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"baseline_policy":{"enum":["none","initial_dates"],"type":"string"},"identity":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyIdentity"},"operation":{"enum":["create"],"type":"string"},"parent_wbs_id":{"maxLength":512,"minLength":1,"nullable":true,"pattern":".*\\S.*","type":"string"},"private":{"type":"boolean"},"progress_policy":{"enum":["unstarted","reviewed"],"type":"string"}},"required":["operation","identity","parent_wbs_id","private","assigned_id","baseline_policy","progress_policy"],"type":"object"},{"additionalProperties":false,"properties":{"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"identity":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyIdentity"},"operation":{"enum":["bind"],"type":"string"},"parent_wbs_id":{"maxLength":512,"minLength":1,"nullable":true,"pattern":".*\\S.*","type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","identity","parent_wbs_id","task_id","expected_row_digest"],"type":"object"},{"additionalProperties":false,"properties":{"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"identity":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyIdentity"},"operation":{"enum":["move"],"type":"string"},"parent_wbs_id":{"maxLength":512,"minLength":1,"nullable":true,"pattern":".*\\S.*","type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","identity","parent_wbs_id","task_id","expected_row_digest"],"type":"object"},{"additionalProperties":false,"properties":{"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"identity":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyIdentity"},"operation":{"enum":["restore"],"type":"string"},"parent_wbs_id":{"maxLength":512,"minLength":1,"nullable":true,"pattern":".*\\S.*","type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","identity","parent_wbs_id","task_id","expected_row_digest"],"type":"object"},{"additionalProperties":false,"properties":{"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"operation":{"enum":["retain"],"type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","task_id","expected_row_digest"],"type":"object"},{"additionalProperties":false,"properties":{"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"operation":{"enum":["retire"],"type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["operation","task_id","expected_row_digest"],"type":"object"}]},"schedule_ScheduleProgressInventory":{"additionalProperties":false,"properties":{"assignee_page":{"maximum":2147483647,"minimum":1,"type":"integer"},"assignee_total":{"minimum":0,"type":"integer"},"assignees":{"items":{"additionalProperties":false,"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"maxItems":100,"type":"array"},"blockers":{"items":{"type":"string"},"type":"array"},"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"can_apply":{"enum":[false],"type":"boolean"},"inventory_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"node_page":{"maximum":2147483647,"minimum":1,"type":"integer"},"node_total":{"minimum":0,"type":"integer"},"nodes":{"items":{"additionalProperties":false,"properties":{"blockers":{"items":{"type":"string"},"type":"array"},"canonical_progress":{"additionalProperties":false,"nullable":true,"properties":{"actual_finish":{"additionalProperties":false,"properties":{"date":{"format":"date","nullable":true,"type":"string"},"effective_date":{"format":"date","nullable":true,"type":"string"},"local_timestamp":{"nullable":true,"type":"string"}},"required":["date","local_timestamp","effective_date"],"type":"object"},"actual_start":{"additionalProperties":false,"properties":{"date":{"format":"date","nullable":true,"type":"string"},"effective_date":{"format":"date","nullable":true,"type":"string"},"local_timestamp":{"nullable":true,"type":"string"}},"required":["date","local_timestamp","effective_date"],"type":"object"},"blockers":{"items":{"type":"string"},"type":"array"},"disclosures":{"items":{"type":"string"},"type":"array"},"duration":{"additionalProperties":false,"nullable":true,"properties":{"fraction":{"maximum":1,"minimum":0,"type":"number"},"raw":{"maximum":100,"minimum":0,"type":"number"},"unit":{"enum":["fraction","percent"],"type":"string"}},"required":["raw","fraction","unit"],"type":"object"},"physical":{"additionalProperties":false,"nullable":true,"properties":{"fraction":{"maximum":1,"minimum":0,"type":"number"},"raw":{"maximum":100,"minimum":0,"type":"number"},"unit":{"enum":["fraction","percent"],"type":"string"}},"required":["raw","fraction","unit"],"type":"object"}},"required":["duration","physical","actual_start","actual_finish","blockers","disclosures"],"type":"object"},"expected_row_digest":{"nullable":true,"pattern":"^[a-f0-9]{64}$","type":"string"},"field_progress":{"additionalProperties":false,"nullable":true,"properties":{"actual_finish_date":{"format":"date","nullable":true,"type":"string"},"actual_start_date":{"format":"date","nullable":true,"type":"string"},"percent_complete":{"maximum":100,"minimum":0,"type":"integer"}},"required":["percent_complete","actual_start_date","actual_finish_date"],"type":"object"},"identity":{"additionalProperties":false,"properties":{"id":{"maxLength":512,"minLength":1,"pattern":".*\\S.*","type":"string"},"namespace":{"enum":["activity","wbs"],"type":"string"}},"required":["namespace","id"],"type":"object"},"lifecycle":{"enum":["new","live","retired"],"type":"string"},"name":{"type":"string"},"parent_wbs_id":{"maxLength":512,"minLength":1,"nullable":true,"pattern":".*\\S.*","type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["identity","name","parent_wbs_id","task_id","expected_row_digest","lifecycle","blockers","canonical_progress","field_progress"],"type":"object"},"maxItems":100,"type":"array"},"page_size":{"maximum":100,"minimum":1,"type":"integer"},"requires_preview":{"enum":[true],"type":"boolean"},"task_page":{"maximum":2147483647,"minimum":1,"type":"integer"},"task_total":{"minimum":0,"type":"integer"},"tasks":{"items":{"additionalProperties":false,"properties":{"actual_finish_date":{"format":"date","nullable":true,"type":"string"},"actual_start_date":{"format":"date","nullable":true,"type":"string"},"assigned_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"expected_row_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"finish_date":{"format":"date","type":"string"},"identity":{"additionalProperties":false,"nullable":true,"properties":{"id":{"maxLength":512,"minLength":1,"pattern":".*\\S.*","type":"string"},"namespace":{"enum":["activity","wbs"],"type":"string"}},"required":["namespace","id"],"type":"object"},"lifecycle":{"enum":["live","retired"],"type":"string"},"milestone":{"type":"boolean"},"name":{"type":"string"},"parent_task_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"percent_complete":{"maximum":100,"minimum":0,"type":"integer"},"private":{"type":"boolean"},"start_date":{"format":"date","type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["task_id","name","expected_row_digest","parent_task_id","identity","lifecycle","private","assigned_id","milestone","percent_complete","start_date","finish_date","actual_start_date","actual_finish_date"],"type":"object"},"maxItems":100,"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"working_minutes":{"type":"boolean"}},"required":["version_id","calculation_id","inventory_digest","can_apply","requires_preview","blockers","page_size","node_page","task_page","node_total","task_total","nodes","tasks","assignee_page","assignee_total","assignees","working_minutes"],"type":"object"},"schedule_ScheduleProgressPreview":{"additionalProperties":false,"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"can_apply":{"enum":[true],"type":"boolean"},"counts":{"additionalProperties":false,"properties":{"bind":{"minimum":0,"type":"integer"},"create":{"minimum":0,"type":"integer"},"move":{"minimum":0,"type":"integer"},"project":{"minimum":0,"type":"integer"},"restore":{"minimum":0,"type":"integer"},"retain":{"minimum":0,"type":"integer"},"retire":{"minimum":0,"type":"integer"}},"required":["create","bind","move","restore","project","retain","retire"],"type":"object"},"disclosures":{"items":{"type":"string"},"type":"array"},"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"rows":{"items":{"additionalProperties":false,"properties":{"after":{"additionalProperties":false,"properties":{"actual_finish_date":{"format":"date","nullable":true,"type":"string"},"actual_start_date":{"format":"date","nullable":true,"type":"string"},"assigned_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"baseline_finish_date":{"format":"date","nullable":true,"type":"string"},"baseline_start_date":{"format":"date","nullable":true,"type":"string"},"critical":{"type":"boolean"},"finish_date":{"format":"date","nullable":true,"type":"string"},"milestone":{"type":"boolean"},"name":{"type":"string"},"parent":{"oneOf":[{"additionalProperties":false,"nullable":true,"properties":{"id":{"maxLength":512,"minLength":1,"pattern":".*\\S.*","type":"string"},"namespace":{"enum":["wbs"],"type":"string"}},"required":["namespace","id"],"type":"object"},{"additionalProperties":false,"properties":{"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["task_id"],"type":"object"}]},"percent_complete":{"maximum":100,"minimum":0,"type":"integer"},"private":{"type":"boolean"},"start_date":{"format":"date","nullable":true,"type":"string"}},"required":["name","private","assigned_id","milestone","start_date","finish_date","critical","baseline_start_date","baseline_finish_date","parent","percent_complete","actual_start_date","actual_finish_date"],"type":"object"},"before":{"additionalProperties":false,"nullable":true,"properties":{"actual_finish_date":{"format":"date","nullable":true,"type":"string"},"actual_start_date":{"format":"date","nullable":true,"type":"string"},"assigned_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"baseline_finish_date":{"format":"date","nullable":true,"type":"string"},"baseline_start_date":{"format":"date","nullable":true,"type":"string"},"critical":{"type":"boolean"},"finish_date":{"format":"date","nullable":true,"type":"string"},"milestone":{"type":"boolean"},"name":{"type":"string"},"parent_task_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"percent_complete":{"maximum":100,"minimum":0,"type":"integer"},"private":{"type":"boolean"},"start_date":{"format":"date","nullable":true,"type":"string"}},"required":["name","private","assigned_id","milestone","start_date","finish_date","critical","baseline_start_date","baseline_finish_date","parent_task_id","percent_complete","actual_start_date","actual_finish_date"],"type":"object"},"identity":{"additionalProperties":false,"nullable":true,"properties":{"id":{"maxLength":512,"minLength":1,"pattern":".*\\S.*","type":"string"},"namespace":{"enum":["activity","wbs"],"type":"string"}},"required":["namespace","id"],"type":"object"},"operation":{"enum":["create","bind","move","restore","project","retain","retire"],"type":"string"},"progress_review":{"additionalProperties":false,"nullable":true,"properties":{"allow_actual_date_clearing":{"type":"boolean"},"policy":{"additionalProperties":false,"properties":{"actual_date_policy":{"enum":["local_calendar_date"],"type":"string"},"percentage_basis":{"enum":["duration","physical"],"type":"string"},"rounding":{"enum":["nearest","floor","ceil"],"type":"string"}},"required":["percentage_basis","rounding","actual_date_policy"],"type":"object"}},"required":["policy","allow_actual_date_clearing"],"type":"object"},"task_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["operation","identity","task_id","before","after","progress_review"],"type":"object"},"maxItems":50000,"type":"array"},"summary_visibility_policy":{"enum":["admin_only_unassigned_v1"],"type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","calculation_id","preview_digest","can_apply","summary_visibility_policy","counts","rows","disclosures"],"type":"object"},"schedule_ScheduleProgressPreviewRequest":{"additionalProperties":false,"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"decisions":{"items":{"$ref":"#/components/schemas/schedule_ScheduleProgressDecision"},"maxItems":20000,"type":"array"},"expected_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"progress_decisions":{"items":{"$ref":"#/components/schemas/schedule_ScheduleProgressReviewDecision"},"maxItems":10000,"type":"array"}},"required":["expected_version_id","calculation_id","decisions","progress_decisions"],"type":"object"},"schedule_ScheduleProgressReviewDecision":{"additionalProperties":false,"description":"Explicit activity progress projection. New tasks require null task_id and expected_row_digest; existing tasks require both exact values. Missing progress is not zero. Clearing a non-null actual requires explicit approval.","properties":{"allow_actual_date_clearing":{"type":"boolean"},"expected_row_digest":{"nullable":true,"pattern":"^[a-f0-9]{64}$","type":"string"},"identity":{"additionalProperties":false,"properties":{"id":{"maxLength":512,"minLength":1,"pattern":".*\\S.*","type":"string"},"namespace":{"enum":["activity"],"type":"string"}},"required":["namespace","id"],"type":"object"},"policy":{"additionalProperties":false,"properties":{"actual_date_policy":{"enum":["local_calendar_date"],"type":"string"},"percentage_basis":{"enum":["duration","physical"],"type":"string"},"rounding":{"enum":["nearest","floor","ceil"],"type":"string"}},"required":["percentage_basis","rounding","actual_date_policy"],"type":"object"},"task_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["identity","task_id","expected_row_digest","policy","allow_actual_date_clearing"],"type":"object"},"schedule_ScheduleProjectionChange":{"additionalProperties":false,"properties":{"activity_id":{"description":"Canonical activity ID for activity changes; null for a summary derived from its mapped descendants.","nullable":true,"type":"string"},"after":{"$ref":"#/components/schemas/schedule_ScheduleProjectionDates"},"before":{"$ref":"#/components/schemas/schedule_ScheduleProjectionDates"},"kind":{"enum":["activity","summary"],"type":"string"},"name":{"type":"string"},"task_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["task_id","activity_id","kind","name","before","after"],"type":"object"},"schedule_ScheduleProjectionDates":{"additionalProperties":false,"properties":{"critical":{"type":"boolean"},"finish":{"format":"date","type":"string"},"start":{"format":"date","type":"string"}},"required":["start","finish","critical"],"type":"object"},"schedule_ScheduleProjectionPreview":{"additionalProperties":false,"properties":{"blockers":{"items":{"type":"string"},"type":"array"},"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"changed_task_count":{"description":"Bound tasks whose reviewed start, finish or critical flag differs.","minimum":0,"type":"integer"},"changes":{"description":"Changed rows only; unchanged mapped tasks are counted but omitted.","items":{"$ref":"#/components/schemas/schedule_ScheduleProjectionChange"},"type":"array"},"date_policy":{"enum":["engine_date_only_utc"],"type":"string"},"engine_revision":{"type":"string"},"mapped_task_count":{"description":"All validated bound tasks, including unchanged tasks.","minimum":0,"type":"integer"},"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["preview_digest","version_id","calculation_id","engine_revision","date_policy","mapped_task_count","changed_task_count","blockers","changes"],"type":"object"},"schedule_ScheduleProjectionReceipt":{"additionalProperties":false,"properties":{"applied_task_count":{"minimum":0,"type":"integer"},"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"projection_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"replayed":{"type":"boolean"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["projection_id","version_id","calculation_id","preview_digest","applied_task_count","replayed","created_at"],"type":"object"},"schedule_ScheduleReport":{"additionalProperties":false,"properties":{"available":{"type":"boolean"},"columns":{"items":{"additionalProperties":false,"properties":{"fmt":{"enum":["text","date","int","num","currency","pct","ratio"],"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"width":{"type":"number"}},"required":["key","label","fmt","width"],"type":"object"},"type":"array"},"description":{"type":"string"},"header":{"additionalProperties":false,"properties":{"baseline":{"additionalProperties":false,"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"version":{"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","name","version_id","version"],"type":["object","null"]},"data_date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":["string","null"]},"period":{"additionalProperties":false,"properties":{"from":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"to":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["from","to"],"type":["object","null"]},"project":{"type":"string"},"version":{"type":["integer","null"]},"version_id":{"type":["integer","null"]}},"required":["project","version_id","version","data_date","period","baseline"],"type":"object"},"key":{"enum":["critical_path","total_float","lookahead","baseline_variance","milestones","period_progress","out_of_sequence","constraints","open_ends","resource_usage","cost_evm","dcma_health"],"type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"rows":{"items":{"additionalProperties":false,"properties":{"activity_ids":{"items":{"type":"string"},"type":"array"},"cells":{"additionalProperties":{"type":["string","number","null"]},"type":"object"},"group":{"type":["string","null"]},"tone":{"enum":["risk","warn","ok","info",null],"type":["string","null"]}},"required":["group","cells","tone","activity_ids"],"type":"object"},"type":"array"},"sources":{"additionalProperties":false,"properties":{"baseline_id":{"type":["integer","null"]},"calculation_id":{"type":["integer","null"]},"cost_version_id":{"type":["integer","null"]},"health_calculation_id":{"type":["integer","null"]},"resource_histogram_id":{"type":["integer","null"]},"version_id":{"type":["integer","null"]}},"required":["version_id","calculation_id","baseline_id","health_calculation_id","cost_version_id","resource_histogram_id"],"type":"object"},"summary":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"type":["string","number","null"]}},"required":["label","value"],"type":"object"},"type":"array"},"title":{"type":"string"},"unavailable_reason":{"type":["string","null"]}},"required":["key","title","description","available","unavailable_reason","header","summary","columns","rows","notes","sources"],"type":"object"},"schedule_ScheduleReportCatalog":{"additionalProperties":false,"properties":{"reports":{"items":{"additionalProperties":false,"properties":{"description":{"type":"string"},"formats":{"items":{"enum":["json","csv","xlsx","pdf"],"type":"string"},"type":"array"},"key":{"enum":["critical_path","total_float","lookahead","baseline_variance","milestones","period_progress","out_of_sequence","constraints","open_ends","resource_usage","cost_evm","dcma_health"],"type":"string"},"title":{"type":"string"},"uses_baseline":{"type":"boolean"}},"required":["key","title","description","formats","uses_baseline"],"type":"object"},"type":"array"}},"required":["reports"],"type":"object"},"schedule_ScheduleReportResponse":{"additionalProperties":false,"properties":{"report":{"$ref":"#/components/schemas/schedule_ScheduleReport"}},"required":["report"],"type":"object"},"schedule_ScheduleRequiredByRegister":{"additionalProperties":false,"properties":{"links":{"items":{"$ref":"#/components/schemas/schedule_ScheduleActivityLink"},"type":"array"},"schedule":{"$ref":"#/components/schemas/schedule_ScheduleLinkScheduleSummary"},"today":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"totals":{"additionalProperties":false,"properties":{"at_risk":{"type":"integer"},"breached":{"type":"integer"},"links":{"type":"integer"},"no_forecast":{"type":"integer"},"on_track":{"type":"integer"},"satisfied":{"type":"integer"}},"required":["links","at_risk","breached","no_forecast","on_track","satisfied"],"type":"object"}},"required":["schedule","today","totals","links"],"type":"object"},"schedule_ScheduleResourceLevelingApplication":{"properties":{"applied":{"items":{"properties":{"activity_id":{"type":"string"},"from_constraint":{"nullable":true,"type":"string"},"from_date":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"shifted_working_days":{"type":"integer"},"to_date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"type":"object"},"type":"array"},"audit_event_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"basis":{"type":"string"},"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"leveling_report_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"skipped":{"items":{"properties":{"activity_id":{"type":"string"},"reason":{"type":"string"}},"type":"object"},"type":"array"},"version":{"properties":{"created_at":{"format":"date-time","type":"string"},"digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version","digest","created_at"],"type":"object"}},"required":["version","calculation_id","leveling_report_id","applied","skipped","audit_event_id","basis"],"type":"object"},"schedule_ScheduleResourceLevelingApply":{"additionalProperties":false,"properties":{"activity_ids":{"description":"Subset of proposed moves; omit to apply every applicable move.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":10000,"minItems":1,"type":"array"},"expected_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"reason":{"maxLength":500,"type":"string"},"report_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["report_id","expected_version_id"],"type":"object"},"schedule_ScheduleResourceView":{"properties":{"basis":{"type":"string"},"bucket":{"nullable":true,"type":"string"},"head":{"nullable":true,"properties":{"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"type":"object"},"histogram":{"nullable":true,"type":"object"},"history":{"items":{"type":"object"},"type":"array"},"leveling":{"description":"Latest proposal with moves[{activity_id, from_start, to_start, shifted_working_days, applicable, skip_reason}].","nullable":true,"type":"object"},"series":{"items":{"properties":{"capacity_basis":{"enum":["scalar","effective_dated","unchecked"],"type":"string"},"max_excess":{"type":"number"},"name":{"type":"string"},"over_allocated_days":{"type":"integer"},"peak_units":{"type":"number"},"periods":{"items":{"properties":{"capacity":{"nullable":true,"type":"number"},"excess":{"type":"number"},"over_allocated":{"type":"boolean"},"over_days":{"type":"integer"},"peak_day_units":{"type":"number"},"period":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"total_units":{"type":"number"},"workforce_capacity_min":{"nullable":true,"type":"number"}},"type":"object"},"type":"array"},"resource_id":{"type":"string"},"type":{"type":"string"},"unit":{"nullable":true,"type":"string"},"workforce":{"nullable":true,"type":"object"}},"type":"object"},"type":"array"},"types":{"items":{"type":"string"},"type":"array"},"workforce":{"nullable":true,"properties":{"report_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"status":{"enum":["none_retained","read","not_visible"],"type":"string"}},"type":"object"}},"required":["head","series","types","bucket","history"],"type":"object"},"schedule_ScheduleRiskResult":{"additionalProperties":true,"description":"Result of operation `risk`: a Monte Carlo simulation of activity durations through the network. The same seed, iteration count, distribution and definition reproduce the same result. Three-point estimates, a risk register and correlation groups are read from the definition's `risk_model` object (docs/SCHEDULE-RISK.md); without one, every open activity uses the engine's unsourced -10%/+45% default range and `estimates_source.label` is `default_spread`.","properties":{"activities":{"description":"Criticality index, sensitivity, DCI and estimate for up to 200 activities, most critical first.","items":{"additionalProperties":true,"properties":{"criticality_index":{"maximum":1,"minimum":0,"type":"number"},"duration_cruciality_index":{"type":"number"},"duration_sensitivity":{"maximum":1,"minimum":-1,"type":"number"},"estimate":{"additionalProperties":false,"properties":{"basis":{"enum":["entered","template","imported","default_spread","fixed","completed","not_applicable"],"type":"string"},"most_likely":{"type":"number"},"optimistic":{"type":"number"},"pessimistic":{"type":"number"}},"type":"object"},"id":{"type":"string"},"mean_duration":{"type":"number"},"name":{"type":"string"}},"type":"object"},"maxItems":200,"type":"array"},"confidence_in_deterministic":{"description":"Probability (0 to 1) of finishing on or before the deterministic finish.","maximum":1,"minimum":0,"nullable":true,"type":"number"},"correlation_groups":{"items":{"additionalProperties":true,"properties":{"achieved_mean_pairwise":{"nullable":true,"type":"number"},"coefficient":{"maximum":0.99,"minimum":0,"type":"number"},"id":{"type":"string"},"members":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"maxItems":100,"type":"array"},"deterministic_finish":{"description":"The CPM finish without uncertainty.","format":"date","nullable":true,"type":"string"},"distribution":{"enum":["pert","triangular"],"type":"string"},"drivers":{"description":"Up to 15 activities ranked by criticality.","items":{"additionalProperties":true,"properties":{"criticality_index":{"description":"Share of iterations (0 to 1) in which the activity was critical.","maximum":1,"minimum":0,"type":"number"},"duration_sensitivity":{"description":"Pearson correlation (-1 to 1) between the activity's sampled duration and the project finish.","maximum":1,"minimum":-1,"type":"number"},"id":{"type":"string"},"mean_duration":{"description":"Mean sampled duration in working days.","type":"number"},"name":{"type":"string"}},"type":"object"},"maxItems":15,"type":"array"},"estimates_source":{"additionalProperties":true,"description":"Where the sampled durations came from. `default_spread` counts open activities that used the engine's unsourced -10%/+45% range.","properties":{"activities":{"type":"integer"},"by_basis":{"additionalProperties":{"type":"integer"},"type":"object"},"completed":{"type":"integer"},"default_spread":{"type":"integer"},"estimated":{"type":"integer"},"fixed":{"type":"integer"},"ignored_estimates":{"items":{"type":"string"},"maxItems":50,"type":"array"},"label":{"enum":["real","mixed","default_spread","fixed"],"type":"string"},"missing_estimates":{"enum":["engine_default","fixed"],"type":"string"},"not_applicable":{"type":"integer"},"unknown_activity_ids":{"items":{"type":"string"},"maxItems":50,"type":"array"}},"type":"object"},"finish":{"additionalProperties":true,"properties":{"deterministic":{"format":"date","type":"string"},"histogram":{"description":"Bounded histogram of simulated finish dates: at most 40 bins of equal calendar width.","items":{"additionalProperties":false,"properties":{"count":{"minimum":0,"type":"integer"},"end":{"format":"date","type":"string"},"start":{"format":"date","type":"string"}},"type":"object"},"maxItems":40,"type":"array"},"mean":{"format":"date","nullable":true,"type":"string"},"percentiles":{"additionalProperties":true,"description":"Finish date at P10, P20, P50, P80, P90 and P95 (ISO dates, rounded up to a whole day).","properties":{"p10":{"format":"date","nullable":true,"type":"string"},"p20":{"format":"date","nullable":true,"type":"string"},"p50":{"format":"date","nullable":true,"type":"string"},"p80":{"format":"date","nullable":true,"type":"string"},"p90":{"format":"date","nullable":true,"type":"string"},"p95":{"format":"date","nullable":true,"type":"string"}},"type":"object"},"std_dev_days":{"type":"number"}},"type":"object"},"iterations":{"maximum":20000,"minimum":100,"type":"integer"},"milestones":{"description":"Key dates from `risk_model.settings.milestone_ids`.","items":{"additionalProperties":true,"properties":{"confidence_in_deterministic":{"maximum":1,"minimum":0,"type":"number"},"deterministic_finish":{"format":"date","type":"string"},"histogram":{"description":"Bounded histogram of simulated finish dates: at most 40 bins of equal calendar width.","items":{"additionalProperties":false,"properties":{"count":{"minimum":0,"type":"integer"},"end":{"format":"date","type":"string"},"start":{"format":"date","type":"string"}},"type":"object"},"maxItems":40,"type":"array"},"id":{"type":"string"},"name":{"type":"string"},"percentiles":{"additionalProperties":true,"description":"Finish date at P10, P20, P50, P80, P90 and P95 (ISO dates, rounded up to a whole day).","properties":{"p10":{"format":"date","nullable":true,"type":"string"},"p20":{"format":"date","nullable":true,"type":"string"},"p50":{"format":"date","nullable":true,"type":"string"},"p80":{"format":"date","nullable":true,"type":"string"},"p90":{"format":"date","nullable":true,"type":"string"},"p95":{"format":"date","nullable":true,"type":"string"}},"type":"object"},"post_mitigation_percentiles":{"additionalProperties":true,"description":"Finish date at P10, P20, P50, P80, P90 and P95 (ISO dates, rounded up to a whole day).","properties":{"p10":{"format":"date","nullable":true,"type":"string"},"p20":{"format":"date","nullable":true,"type":"string"},"p50":{"format":"date","nullable":true,"type":"string"},"p80":{"format":"date","nullable":true,"type":"string"},"p90":{"format":"date","nullable":true,"type":"string"},"p95":{"format":"date","nullable":true,"type":"string"}},"type":"object"}},"type":"object"},"maxItems":20,"type":"array"},"mitigation":{"additionalProperties":true,"description":"Present when any open risk states post-mitigation values; both scenarios share the seed (common random numbers).","nullable":true,"properties":{"delta_days":{"additionalProperties":{"nullable":true,"type":"integer"},"type":"object"},"method":{"type":"string"},"post":{"additionalProperties":true,"properties":{"confidence_in_deterministic":{"nullable":true,"type":"number"},"histogram":{"description":"Bounded histogram of simulated finish dates: at most 40 bins of equal calendar width.","items":{"additionalProperties":false,"properties":{"count":{"minimum":0,"type":"integer"},"end":{"format":"date","type":"string"},"start":{"format":"date","type":"string"}},"type":"object"},"maxItems":40,"type":"array"},"mean_finish":{"format":"date","nullable":true,"type":"string"},"percentiles":{"additionalProperties":true,"description":"Finish date at P10, P20, P50, P80, P90 and P95 (ISO dates, rounded up to a whole day).","properties":{"p10":{"format":"date","nullable":true,"type":"string"},"p20":{"format":"date","nullable":true,"type":"string"},"p50":{"format":"date","nullable":true,"type":"string"},"p80":{"format":"date","nullable":true,"type":"string"},"p90":{"format":"date","nullable":true,"type":"string"},"p95":{"format":"date","nullable":true,"type":"string"}},"type":"object"},"risk_events":{"items":{"additionalProperties":true,"properties":{"expected_contribution_days":{"description":"occurrence_rate x mean_delay_when_occurs_days. Null when the risk occurred in every iteration or none.","nullable":true,"type":"number"},"id":{"type":"string"},"mean_delay_when_occurs_days":{"description":"Mean finish when the risk occurs minus mean finish when it does not, calendar days.","nullable":true,"type":"number"},"mode":{"enum":["duration","fragnet"],"type":"string"},"occurrence_rate":{"maximum":1,"minimum":0,"type":"number"},"occurrences":{"minimum":0,"type":"integer"},"probability":{"maximum":1,"minimum":0,"type":"number"},"rank":{"minimum":1,"type":"integer"},"title":{"type":"string"}},"type":"object"},"type":"array"},"std_dev_days":{"type":"number"}},"type":"object"},"pre":{"additionalProperties":true,"properties":{"confidence_in_deterministic":{"nullable":true,"type":"number"},"histogram":{"description":"Bounded histogram of simulated finish dates: at most 40 bins of equal calendar width.","items":{"additionalProperties":false,"properties":{"count":{"minimum":0,"type":"integer"},"end":{"format":"date","type":"string"},"start":{"format":"date","type":"string"}},"type":"object"},"maxItems":40,"type":"array"},"mean_finish":{"format":"date","nullable":true,"type":"string"},"percentiles":{"additionalProperties":true,"description":"Finish date at P10, P20, P50, P80, P90 and P95 (ISO dates, rounded up to a whole day).","properties":{"p10":{"format":"date","nullable":true,"type":"string"},"p20":{"format":"date","nullable":true,"type":"string"},"p50":{"format":"date","nullable":true,"type":"string"},"p80":{"format":"date","nullable":true,"type":"string"},"p90":{"format":"date","nullable":true,"type":"string"},"p95":{"format":"date","nullable":true,"type":"string"}},"type":"object"},"risk_events":{"items":{"additionalProperties":true,"properties":{"expected_contribution_days":{"description":"occurrence_rate x mean_delay_when_occurs_days. Null when the risk occurred in every iteration or none.","nullable":true,"type":"number"},"id":{"type":"string"},"mean_delay_when_occurs_days":{"description":"Mean finish when the risk occurs minus mean finish when it does not, calendar days.","nullable":true,"type":"number"},"mode":{"enum":["duration","fragnet"],"type":"string"},"occurrence_rate":{"maximum":1,"minimum":0,"type":"number"},"occurrences":{"minimum":0,"type":"integer"},"probability":{"maximum":1,"minimum":0,"type":"number"},"rank":{"minimum":1,"type":"integer"},"title":{"type":"string"}},"type":"object"},"type":"array"},"std_dev_days":{"type":"number"}},"type":"object"}},"type":"object"},"model":{"description":"Present when the run used the risk-model adapter (three-point estimates, risk register, correlation).","enum":["os.construction/schedule-risk@1"],"type":"string"},"percentiles":{"additionalProperties":true,"description":"Finish date at each confidence level.","properties":{"p10":{"description":"10% of iterations finish on or before this date.","format":"date","nullable":true,"type":"string"},"p20":{"description":"20% of iterations finish on or before this date.","format":"date","nullable":true,"type":"string"},"p50":{"description":"50% of iterations finish on or before this date.","format":"date","nullable":true,"type":"string"},"p80":{"description":"80% of iterations finish on or before this date.","format":"date","nullable":true,"type":"string"},"p90":{"description":"90% of iterations finish on or before this date.","format":"date","nullable":true,"type":"string"},"p95":{"description":"95% of iterations finish on or before this date.","format":"date","nullable":true,"type":"string"}},"type":"object"},"provenance":{"additionalProperties":true,"description":"What reproduces this result.","properties":{"adapter_revision":{"type":"string"},"distribution":{"enum":["pert","triangular"],"type":"string"},"estimates_digest":{"description":"SHA-256 of the resolved O/M/P and basis of every open activity.","pattern":"^[a-f0-9]{64}$","type":"string"},"iterations":{"type":"integer"},"methods":{"additionalProperties":{"type":"string"},"type":"object"},"model_digest":{"description":"SHA-256 of the normalized risk register, correlation groups and settings.","pattern":"^[a-f0-9]{64}$","type":"string"},"scenarios":{"items":{"enum":["pre","post"],"type":"string"},"type":"array"},"seed":{"description":"The seed actually used; generated and recorded when the request asked for a random seed.","type":"integer"},"seed_requested":{"nullable":true,"type":"integer"}},"type":"object"},"risk_events":{"description":"Open risk events ranked by expected contribution (pre-mitigation).","items":{"additionalProperties":true,"properties":{"expected_contribution_days":{"description":"occurrence_rate x mean_delay_when_occurs_days. Null when the risk occurred in every iteration or none.","nullable":true,"type":"number"},"id":{"type":"string"},"mean_delay_when_occurs_days":{"description":"Mean finish when the risk occurs minus mean finish when it does not, calendar days.","nullable":true,"type":"number"},"mode":{"enum":["duration","fragnet"],"type":"string"},"occurrence_rate":{"maximum":1,"minimum":0,"type":"number"},"occurrences":{"minimum":0,"type":"integer"},"probability":{"maximum":1,"minimum":0,"type":"number"},"rank":{"minimum":1,"type":"integer"},"title":{"type":"string"}},"type":"object"},"maxItems":200,"type":"array"},"s_curve":{"description":"Cumulative probability curve from P5 to P95 in steps of 5.","items":{"additionalProperties":true,"properties":{"finish":{"format":"date","type":"string"},"p":{"maximum":95,"minimum":5,"type":"integer"}},"type":"object"},"type":"array"},"seed":{"description":"Null when the simulation was unseeded.","nullable":true,"type":"integer"},"tornado":{"description":"Activities by absolute duration sensitivity.","items":{"additionalProperties":true,"properties":{"criticality_index":{"maximum":1,"minimum":0,"type":"number"},"duration_cruciality_index":{"type":"number"},"duration_sensitivity":{"maximum":1,"minimum":-1,"type":"number"},"estimate":{"additionalProperties":false,"properties":{"basis":{"enum":["entered","template","imported","default_spread","fixed","completed","not_applicable"],"type":"string"},"most_likely":{"type":"number"},"optimistic":{"type":"number"},"pessimistic":{"type":"number"}},"type":"object"},"id":{"type":"string"},"mean_duration":{"type":"number"},"name":{"type":"string"}},"type":"object"},"maxItems":20,"type":"array"},"warnings":{"items":{"type":"string"},"type":"array"},"weather":{"additionalProperties":true,"description":"Weather impact, separate from the headline: the same risk model and seed run with and without weather (risk_model.weather). Null when no weather calendar and weather-sensitive activities are set.","nullable":true,"properties":{"activities":{"items":{"additionalProperties":false,"properties":{"expected_weather_days":{"type":"number"},"id":{"type":"string"},"name":{"type":"string"}},"type":"object"},"maxItems":20,"type":"array"},"calendar_exceptions":{"items":{"additionalProperties":true,"properties":{"by_month":{"additionalProperties":{"type":"integer"},"type":"object"},"calendar_id":{"type":"string"},"total_days":{"type":"integer"},"weather_calendar_id":{"type":"string"}},"type":"object"},"type":"array"},"delta_days":{"additionalProperties":{"nullable":true,"type":"integer"},"type":"object"},"deterministic_delta_days":{"nullable":true,"type":"integer"},"deterministic_finish_with":{"format":"date","type":"string"},"deterministic_finish_without":{"format":"date","nullable":true,"type":"string"},"expected_lost_days_by_month":{"additionalProperties":{"type":"number"},"description":"Keyed YYYY-MM","type":"object","x-key-pattern":"^\\d{4}-\\d{2}$"},"mean_activity_weather_days":{"type":"number"},"mean_delay_days":{"nullable":true,"type":"integer"},"mean_finish_with":{"format":"date","nullable":true,"type":"string"},"mean_finish_without":{"format":"date","nullable":true,"type":"string"},"method":{"type":"string"},"mode":{"enum":["calendar","probabilistic"],"type":"string"},"percentiles_with":{"additionalProperties":{"format":"date","nullable":true,"type":"string"},"type":"object"},"percentiles_without":{"additionalProperties":{"format":"date","nullable":true,"type":"string"},"type":"object"},"region_id":{"type":"string"},"region_name":{"type":"string"},"sensitive_activities":{"type":"integer"},"sensitive_activity_ids":{"items":{"type":"string"},"maxItems":50,"type":"array"}},"type":"object"}},"title":"risk: Monte Carlo finish distribution","type":"object"},"schedule_ScheduleScenario":{"additionalProperties":true,"properties":{"adopted_version_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"base_version":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"base_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"current_version_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"description":{"type":"string"},"edits":{"items":{"$ref":"#/components/schemas/schedule_ScheduleScenarioEdit"},"type":"array"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"last_compare_run_id":{"description":"List responses only.","maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"last_compared_revision":{"description":"List responses only.","maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"name":{"type":"string"},"request_id":{"type":"string"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"stale":{"description":"Open and no longer based on the current saved version; recreate it before adopting.","type":"boolean"},"status":{"enum":["open","adopted","discarded"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"updated_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","base_version_id","base_version","name","description","edits","revision","status","adopted_version_id","request_id","current_version_id","stale","created_by_id","created_at","updated_by_id","updated_at","closed_at"],"type":"object"},"schedule_ScheduleScenarioAdopt":{"additionalProperties":false,"properties":{"expected_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"expected_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["expected_revision","expected_version_id"],"type":"object"},"schedule_ScheduleScenarioAdoption":{"additionalProperties":false,"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"scenario":{"$ref":"#/components/schemas/schedule_ScheduleScenario"},"version":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"digest":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version","digest","created_at"],"type":"object"}},"required":["scenario","version","calculation_id"],"type":"object"},"schedule_ScheduleScenarioCompression":{"additionalProperties":false,"properties":{"crash_options":{"additionalProperties":{"additionalProperties":false,"properties":{"cost_per_day":{"maximum":1000000000,"minimum":0,"type":"number"},"max_crash_days":{"maximum":3650,"minimum":0,"type":"integer"}},"type":"object"},"maxProperties":10000,"type":"object"},"expected_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"fast_track_overlap":{"default":0.5,"maximum":0.9,"minimum":0.1,"type":"number"},"max_fast_track":{"default":40,"maximum":100,"minimum":0,"type":"integer"},"max_steps":{"default":60,"maximum":200,"minimum":1,"type":"integer"},"target_finish":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["expected_revision"],"type":"object"},"schedule_ScheduleScenarioCreate":{"additionalProperties":false,"properties":{"description":{"maxLength":2000,"type":"string"},"edits":{"items":{"$ref":"#/components/schemas/schedule_ScheduleScenarioEdit"},"maxItems":200,"type":"array"},"expected_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"maxLength":255,"minLength":1,"type":"string"},"request_id":{"format":"uuid","type":"string"}},"required":["expected_version_id","name","request_id"],"type":"object"},"schedule_ScheduleScenarioDetail":{"additionalProperties":false,"properties":{"latest_compare":{"anyOf":[{"$ref":"#/components/schemas/schedule_ScheduleScenarioRun"},{"type":"null"}]},"latest_compression":{"anyOf":[{"$ref":"#/components/schemas/schedule_ScheduleScenarioRun"},{"type":"null"}]},"scenario":{"$ref":"#/components/schemas/schedule_ScheduleScenario"}},"required":["scenario","latest_compare","latest_compression"],"type":"object"},"schedule_ScheduleScenarioEdit":{"description":"One isolated what-if edit, applied in list order to a copy of the base version.","oneOf":[{"additionalProperties":false,"properties":{"activity_id":{"maxLength":200,"minLength":1,"type":"string"},"basis":{"default":"original","enum":["original","remaining"],"type":"string"},"duration_days":{"maximum":3650,"minimum":0,"type":"integer"},"note":{"maxLength":500,"type":"string"},"op":{"enum":["set_duration"],"type":"string"}},"required":["op","activity_id","duration_days"],"type":"object"},{"additionalProperties":false,"properties":{"activity_id":{"maxLength":200,"minLength":1,"type":"string"},"cost_per_day":{"description":"Stated acceleration premium per day; never inferred.","maximum":1000000000,"minimum":0,"type":"number"},"days":{"maximum":3650,"minimum":1,"type":"integer"},"method":{"default":"crash","enum":["crash","overtime","added_crew","resequence","other"],"type":"string"},"note":{"maxLength":500,"type":"string"},"op":{"enum":["accelerate"],"type":"string"}},"required":["op","activity_id","days"],"type":"object"},{"additionalProperties":false,"properties":{"lag_days":{"default":0,"maximum":3650,"minimum":-3650,"type":"integer"},"note":{"maxLength":500,"type":"string"},"op":{"enum":["add_relationship"],"type":"string"},"predecessor_id":{"maxLength":200,"minLength":1,"type":"string"},"successor_id":{"maxLength":200,"minLength":1,"type":"string"},"type":{"default":"FS","enum":["FS","SS","FF","SF"],"type":"string"}},"required":["op","predecessor_id","successor_id"],"type":"object"},{"additionalProperties":false,"properties":{"note":{"maxLength":500,"type":"string"},"op":{"enum":["remove_relationship"],"type":"string"},"predecessor_id":{"maxLength":200,"minLength":1,"type":"string"},"successor_id":{"maxLength":200,"minLength":1,"type":"string"},"type":{"enum":["FS","SS","FF","SF"],"type":"string"}},"required":["op","predecessor_id","successor_id"],"type":"object"},{"additionalProperties":false,"properties":{"lag_days":{"maximum":3650,"minimum":-3650,"type":"integer"},"new_type":{"enum":["FS","SS","FF","SF"],"type":"string"},"note":{"maxLength":500,"type":"string"},"op":{"enum":["modify_relationship"],"type":"string"},"predecessor_id":{"maxLength":200,"minLength":1,"type":"string"},"successor_id":{"maxLength":200,"minLength":1,"type":"string"},"type":{"enum":["FS","SS","FF","SF"],"type":"string"}},"required":["op","predecessor_id","successor_id","type","new_type","lag_days"],"type":"object"},{"additionalProperties":false,"properties":{"activities":{"items":{"additionalProperties":false,"properties":{"duration_days":{"maximum":3650,"minimum":0,"type":"integer"},"id":{"maxLength":200,"minLength":1,"type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"}},"required":["id","name","duration_days"],"type":"object"},"maxItems":25,"minItems":1,"type":"array"},"fragnet_id":{"maxLength":200,"minLength":1,"type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"note":{"maxLength":500,"type":"string"},"op":{"enum":["add_fragnet"],"type":"string"},"predecessor_id":{"maxLength":200,"minLength":1,"type":"string"},"responsibility":{"enum":["owner","contractor","third_party","neither","undetermined"],"type":"string"},"successor_id":{"maxLength":200,"minLength":1,"type":"string"}},"required":["op","fragnet_id","name","activities"],"type":"object"},{"additionalProperties":false,"properties":{"activity_id":{"maxLength":200,"minLength":1,"type":"string"},"constraint":{"enum":["none","start_on","start_on_or_after","start_on_or_before","finish_on","finish_on_or_after","finish_on_or_before","as_late_as_possible","mandatory_start","mandatory_finish"],"type":"string"},"constraint_date":{"nullable":true,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"note":{"maxLength":500,"type":"string"},"op":{"enum":["set_constraint"],"type":"string"}},"required":["op","activity_id","constraint"],"type":"object"},{"additionalProperties":false,"properties":{"activity_id":{"description":"Omit to change the project default calendar.","maxLength":200,"minLength":1,"type":"string"},"calendar_id":{"maxLength":200,"minLength":1,"type":"string"},"note":{"maxLength":500,"type":"string"},"op":{"enum":["set_calendar"],"type":"string"}},"required":["op","calendar_id"],"type":"object"},{"additionalProperties":false,"properties":{"calendar_id":{"maxLength":200,"minLength":1,"type":"string"},"from":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"note":{"maxLength":500,"type":"string"},"op":{"enum":["add_nonworking_days"],"type":"string"},"through":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["op","calendar_id","from","through"],"type":"object"}]},"schedule_ScheduleScenarioEnvelope":{"additionalProperties":false,"properties":{"replayed":{"type":"boolean"},"scenario":{"$ref":"#/components/schemas/schedule_ScheduleScenario"}},"required":["scenario"],"type":"object"},"schedule_ScheduleScenarioList":{"additionalProperties":false,"properties":{"current_version_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"next_before_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"scenarios":{"items":{"$ref":"#/components/schemas/schedule_ScheduleScenario"},"type":"array"}},"required":["scenarios","next_before_id","current_version_id"],"type":"object"},"schedule_ScheduleScenarioRevision":{"additionalProperties":false,"properties":{"expected_revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["expected_revision"],"type":"object"},"schedule_ScheduleScenarioRun":{"additionalProperties":false,"properties":{"base_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"kind":{"enum":["compare","compression"],"type":"string"},"parameters":{"type":"object"},"result":{"description":"compare: { base_version_id, base_version, scenario_revision, comparison: { project_finish, critical_path, float, activities, cost, ... } }. compression: { crash: { cuts, ranked, tradeoff_curve, ... }, fast_track: { options, ... } } with suggested_edit on each proposal.","type":"object"},"result_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"scenario_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"scenario_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"scenario_revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","scenario_id","scenario_revision","kind","base_digest","scenario_digest","engine_revision","parameters","input_digest","result","result_digest","created_by_id","created_at"],"type":"object"},"schedule_ScheduleScenarioUpdate":{"additionalProperties":false,"properties":{"description":{"maxLength":2000,"type":"string"},"edits":{"items":{"$ref":"#/components/schemas/schedule_ScheduleScenarioEdit"},"maxItems":200,"type":"array"},"expected_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"maxLength":255,"minLength":1,"type":"string"}},"required":["expected_revision"],"type":"object"},"schedule_ScheduleSpreadsheetApply":{"allOf":[{"$ref":"#/components/schemas/schedule_ScheduleSpreadsheetRequest"},{"properties":{"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["preview_digest"],"type":"object"}]},"schedule_ScheduleSpreadsheetPreview":{"additionalProperties":false,"properties":{"changes":{"items":{"additionalProperties":false,"properties":{"activity_id":{"type":"string"},"after":{"type":"string"},"before":{"type":"string"},"column":{"type":"string"},"label":{"type":"string"}},"required":["activity_id","column","label","before","after"],"type":"object"},"maxItems":500,"type":"array"},"changes_total":{"type":"integer"},"ignored_columns":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"reason":{"type":"string"}},"required":["label","reason"],"type":"object"},"type":"array"},"inserted":{"items":{"type":"string"},"type":"array"},"matched_rows":{"type":"integer"},"preview_digest":{"type":"string"},"rejected":{"description":"Cells not applied: edited calculated columns, values the inline editor refuses, duplicate or ambiguous Activity IDs","items":{"additionalProperties":false,"properties":{"activity_id":{"type":"string"},"column":{"type":"string"},"label":{"type":"string"},"reason":{"type":"string"},"row":{"type":"integer"},"value":{"type":"string"}},"required":["row","activity_id","column","label","value","reason"],"type":"object"},"maxItems":500,"type":"array"},"rejected_ids":{"items":{"type":"string"},"type":"array"},"rejected_total":{"type":"integer"},"unknown_ids":{"enum":["reject","insert"],"type":"string"},"version":{"type":"integer"},"version_id":{"type":"integer"}},"required":["version_id","version","matched_rows","changes","changes_total","rejected","rejected_total","ignored_columns","inserted","rejected_ids","unknown_ids","preview_digest"],"type":"object"},"schedule_ScheduleSpreadsheetRequest":{"additionalProperties":false,"properties":{"expected_version_id":{"minimum":1,"type":"integer"},"file_base64":{"description":"The edited .xlsx, base64 (at most 1.5 MiB decoded)","type":"string"},"unknown_ids":{"default":"reject","description":"Rows whose Activity ID is not in the plan: listed as rejected, or inserted as new activities","enum":["reject","insert"],"type":"string"}},"required":["expected_version_id","file_base64"],"type":"object"},"schedule_ScheduleSpreadsheetResult":{"additionalProperties":false,"properties":{"calculation_id":{"type":"integer"},"changes_total":{"type":"integer"},"inserted":{"type":"integer"},"rejected_total":{"type":"integer"},"version":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"digest":{"type":"string"},"id":{"type":"integer"},"version":{"type":"integer"}},"required":["id","version","digest","created_at"],"type":"object"}},"required":["version","calculation_id","changes_total","inserted","rejected_total"],"type":"object"},"schedule_ScheduleSubmittal":{"properties":{"baseline_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"communication_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"cover_note":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"distributed_at":{"format":"date-time","nullable":true,"type":"string"},"distributed_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"files":{"items":{"$ref":"#/components/schemas/schedule_ScheduleSubmittalFile"},"type":"array"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"number":{"type":"integer"},"period_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"recipients":{"nullable":true,"type":"object"},"request_id":{"type":"string"},"response":{"enum":["approved","approved_as_noted","revise_and_resubmit","rejected",null],"nullable":true,"type":"string"},"response_date":{"format":"date","nullable":true,"type":"string"},"response_note":{"nullable":true,"type":"string"},"response_recorded_at":{"format":"date-time","nullable":true,"type":"string"},"response_recorded_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"status":{"enum":["ready","sent","responded"],"type":"string"},"subject":{"enum":["update","baseline"],"type":"string"},"submission_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"title":{"type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","number","title","subject","status","version_id"],"type":"object"},"schedule_ScheduleSubmittalCreate":{"additionalProperties":false,"properties":{"baseline_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"cover_note":{"maxLength":4000,"type":"string"},"formats":{"default":["xer"],"items":{"enum":["xer","p6xml"],"type":"string"},"maxItems":2,"minItems":1,"type":"array"},"period_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"request_id":{"format":"uuid","type":"string"},"subject":{"enum":["update","baseline"],"type":"string"},"submission_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"title":{"maxLength":255,"minLength":1,"type":"string"}},"required":["subject","request_id"],"type":"object"},"schedule_ScheduleSubmittalDistribute":{"additionalProperties":false,"properties":{"cc":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"maxItems":50,"type":"array"},"cc_external":{"items":{"format":"email","type":"string"},"maxItems":50,"type":"array"},"message":{"maxLength":10000,"type":"string"},"subject":{"maxLength":255,"type":"string"},"to":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"maxItems":50,"type":"array"},"to_external":{"items":{"format":"email","type":"string"},"maxItems":50,"type":"array"}},"type":"object"},"schedule_ScheduleSubmittalEnvelope":{"properties":{"communication_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"replayed":{"type":"boolean"},"submittal":{"$ref":"#/components/schemas/schedule_ScheduleSubmittal"}},"required":["submittal"],"type":"object"},"schedule_ScheduleSubmittalFile":{"properties":{"byte_size":{"type":"integer"},"content_type":{"type":"string"},"digest":{"type":"string"},"file_name":{"type":"string"},"kind":{"enum":["xer","p6xml","narrative","health","compare"],"type":"string"},"url":{"type":"string"}},"type":"object"},"schedule_ScheduleSubmittalList":{"properties":{"next_before_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"submittals":{"items":{"$ref":"#/components/schemas/schedule_ScheduleSubmittal"},"type":"array"}},"required":["submittals"],"type":"object"},"schedule_ScheduleSubmittalResponse":{"additionalProperties":false,"properties":{"note":{"maxLength":4000,"type":"string"},"response":{"enum":["approved","approved_as_noted","revise_and_resubmit","rejected"],"type":"string"},"response_date":{"format":"date","type":"string"}},"required":["response","response_date"],"type":"object"},"schedule_ScheduleTaktPreview":{"additionalProperties":false,"properties":{"calculation_revision":{"type":"string"},"preview":{"additionalProperties":false,"properties":{"buildable":{"type":"boolean"},"duration_days":{"description":"(trades + zones - 1) x takt days","type":"integer"},"finish":{"format":"date","nullable":true,"type":"string"},"idle_crew_days":{"type":"number"},"issues":{"items":{"additionalProperties":true,"properties":{"action":{"type":"string"},"code":{"type":"string"},"field":{"nullable":true,"type":"string"},"message":{"type":"string"},"raw_value":{"nullable":true,"type":"string"},"row_key":{"nullable":true,"type":"string"},"severity":{"enum":["info","warning","error"],"type":"string"},"table":{"nullable":true,"type":"string"}},"required":["severity","code","message"],"type":"object"},"type":"array"},"links":{"items":{"additionalProperties":false,"properties":{"lag_days":{"type":"number"},"predecessor_id":{"type":"string"},"successor_id":{"type":"string"},"type":{"enum":["FS","SS","FF","SF"],"type":"string"}},"required":["predecessor_id","successor_id","type","lag_days"],"type":"object"},"type":"array"},"minimum_takt":{"additionalProperties":false,"properties":{"days":{"type":"integer"},"wagon_id":{"type":"string"}},"required":["days","wagon_id"],"type":"object"},"rows":{"items":{"additionalProperties":false,"properties":{"activity_id":{"type":"string"},"crews":{"type":"integer"},"duration_days":{"type":"integer"},"finish":{"format":"date","type":"string"},"start":{"format":"date","type":"string"},"takt_index":{"type":"integer"},"utilisation":{"type":"number"},"wagon_id":{"type":"string"},"work_content":{"type":"number"},"zone_id":{"type":"string"}},"required":["activity_id","wagon_id","zone_id","takt_index","crews","work_content","utilisation","start","finish","duration_days"],"type":"object"},"type":"array"},"start":{"format":"date","type":"string"},"takt_days":{"type":"integer"},"tasks":{"items":{"additionalProperties":false,"properties":{"calendar_id":{"type":"string"},"constraint":{"type":"string"},"constraint_date":{"format":"date","nullable":true,"type":"string"},"duration_days":{"type":"integer"},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name","duration_days","calendar_id","constraint","constraint_date"],"type":"object"},"type":"array"},"wagons":{"items":{"additionalProperties":false,"properties":{"crews":{"type":"integer"},"id":{"type":"string"},"name":{"type":"string"},"overloaded":{"type":"boolean"},"utilisation":{"type":"number"}},"required":["id","name","crews","utilisation","overloaded"],"type":"object"},"type":"array"},"zones":{"items":{"additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"},"sequence":{"type":"integer"}},"required":["id","name","sequence"],"type":"object"},"type":"array"}},"required":["takt_days","start","finish","duration_days","zones","wagons","idle_crew_days","minimum_takt","buildable","rows","tasks","links","issues"],"type":"object"},"writes":{"enum":[false],"type":"boolean"}},"required":["calculation_revision","writes","preview"],"type":"object"},"schedule_ScheduleTaktPreviewInput":{"additionalProperties":false,"properties":{"calendar":{"additionalProperties":false,"properties":{"holidays":{"items":{"format":"date","type":"string"},"maxItems":2000,"type":"array"},"id":{"type":"string"},"working_weekdays":{"description":"Monday = 0","items":{"maximum":6,"minimum":0,"type":"integer"},"type":"array"}},"required":[],"type":"object"},"start":{"format":"date","type":"string"},"takt_days":{"description":"Working days every trade spends in every zone","maximum":60,"minimum":1,"type":"integer"},"wagons":{"description":"Trades in handover order","items":{"additionalProperties":false,"properties":{"default_work":{"default":1,"maximum":10000,"minimum":0,"type":"number"},"id":{"maxLength":120,"minLength":1,"pattern":"^[^@\\t\\r\\n]+$","type":"string"},"max_crews":{"default":4,"maximum":50,"minimum":1,"type":"integer"},"name":{"maxLength":120,"type":"string"},"work_content":{"additionalProperties":{"maximum":10000,"minimum":0,"type":"number"},"description":"Crew-days per zone id","type":"object"}},"required":["id"],"type":"object"},"maxItems":60,"minItems":1,"type":"array"},"zones":{"items":{"additionalProperties":false,"properties":{"id":{"maxLength":120,"minLength":1,"pattern":"^[^@\\t\\r\\n]+$","type":"string"},"name":{"maxLength":120,"type":"string"},"sequence":{"type":"integer"}},"required":["id"],"type":"object"},"maxItems":200,"minItems":1,"type":"array"}},"required":["takt_days","start","zones","wagons"],"type":"object"},"schedule_ScheduleTimeImpactAnalysis":{"additionalProperties":true,"properties":{"allowed_transitions":{"items":{"enum":["reviewed","accepted","rejected"],"type":"string"},"type":"array"},"already_awarded":{"items":{"type":"string"},"nullable":true,"type":"array"},"base_update_period_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"base_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"can_analyze":{"type":"boolean"},"change_event_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"decided_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"decision_note":{"type":"string"},"delay_start":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"fragnet":{"additionalProperties":true,"type":"object"},"fragnet_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"history":{"items":{"additionalProperties":true,"required":["action","actor_id","at"],"type":"object"},"type":"array"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"impact":{"additionalProperties":true,"nullable":true,"type":"object"},"measure_activity_id":{"nullable":true,"type":"string"},"mitigation_occurred":{"type":"boolean"},"mitigation_statement":{"type":"string"},"near_critical_days":{"type":"integer"},"replayed":{"type":"boolean"},"report_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"reporting_period_days":{"type":"integer"},"review_note":{"type":"string"},"reviewed_at":{"format":"date-time","nullable":true,"type":"string"},"reviewed_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"revision":{"minimum":1,"type":"integer"},"status":{"enum":["submitted","reviewed","accepted","rejected"],"type":"string"},"submitted_at":{"format":"date-time","type":"string"},"submitted_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"title":{"type":"string"},"unit":{"enum":["work_days","calendar_days"],"type":"string"}},"required":["id","title","status","delay_start","unit","base_version_id","fragnet","fragnet_digest","history","revision","allowed_transitions","can_analyze","report_id"],"type":"object"},"schedule_ScheduleTimeImpactAnalysisCreate":{"additionalProperties":false,"properties":{"already_awarded":{"description":"Step 8 ledger; omitted means not supplied.","items":{"format":"date","type":"string"},"maxItems":3650,"type":"array"},"base_version_id":{"description":"Optional check; the update in effect (last approved update statused on or before delay_start) is selected by the service.","maximum":2147483647,"minimum":1,"type":"integer"},"change_event_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"delay_start":{"format":"date","type":"string"},"fragnet":{"additionalProperties":false,"properties":{"description":{"maxLength":2000,"minLength":1,"type":"string"},"events":{"items":{"additionalProperties":false,"properties":{"basis":{"maxLength":2000,"type":"string"},"calendar_id":{"maxLength":512,"minLength":1,"type":"string"},"duration_days":{"maximum":3650,"minimum":0,"type":"integer"},"id":{"maxLength":128,"minLength":1,"type":"string"},"impacts":{"maxLength":512,"minLength":1,"type":"string"},"name":{"maxLength":512,"minLength":1,"type":"string"},"onset":{"format":"date","type":"string"},"responsibility":{"maxLength":128,"type":"string"},"source_documents":{"items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":50,"type":"array"}},"required":["id","name","duration_days","impacts"],"type":"object"},"maxItems":200,"minItems":1,"type":"array"},"extra_links":{"items":{"additionalProperties":false,"properties":{"lag_days":{"default":0,"maximum":3650,"minimum":-3650,"type":"integer"},"predecessor":{"maxLength":512,"minLength":1,"type":"string"},"successor":{"maxLength":512,"minLength":1,"type":"string"},"type":{"default":"FS","enum":["FS","SS","FF","SF"],"type":"string"}},"required":["predecessor","successor"],"type":"object"},"maxItems":200,"type":"array"},"id":{"maxLength":128,"minLength":1,"type":"string"},"narrative":{"maxLength":20000,"type":"string"}},"required":["id","description","events"],"type":"object"},"measure_activity_id":{"maxLength":512,"minLength":1,"type":"string"},"mitigation_occurred":{"default":false,"type":"boolean"},"mitigation_statement":{"default":"","maxLength":2000,"type":"string"},"near_critical_days":{"default":10,"maximum":365,"minimum":0,"type":"integer"},"reporting_period_days":{"default":30,"maximum":366,"minimum":1,"type":"integer"},"request_id":{"format":"uuid","type":"string"},"title":{"maxLength":255,"minLength":1,"type":"string"},"unit":{"enum":["work_days","calendar_days"],"type":"string"}},"required":["title","delay_start","unit","fragnet","request_id"],"type":"object"},"schedule_ScheduleTimeImpactAnalysisDecision":{"additionalProperties":false,"properties":{"decision":{"enum":["accepted","rejected"],"type":"string"},"expected_revision":{"minimum":1,"type":"integer"},"note":{"default":"","description":"Required to reject.","maxLength":4000,"type":"string"}},"required":["decision","expected_revision"],"type":"object"},"schedule_ScheduleTimeImpactAnalysisList":{"additionalProperties":false,"properties":{"next_before_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"time_impact_analyses":{"items":{"$ref":"#/components/schemas/schedule_ScheduleTimeImpactAnalysis"},"type":"array"}},"required":["time_impact_analyses","next_before_id"],"type":"object"},"schedule_ScheduleTimeImpactAnalysisReview":{"additionalProperties":false,"properties":{"expected_revision":{"minimum":1,"type":"integer"},"note":{"maxLength":4000,"minLength":1,"type":"string"}},"required":["note","expected_revision"],"type":"object"},"schedule_ScheduleUpdate":{"properties":{"accepted_at":{"format":"date-time","nullable":true,"type":"string"},"accepted_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"accepted_version_id":{"description":"The accepted update of record (immutable) once approved.","maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"base_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"baseline_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"data_date":{"format":"date","type":"string"},"draft_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"},"narrative":{"$ref":"#/components/schemas/schedule_ScheduleUpdateNarrative"},"number":{"minimum":1,"type":"integer"},"previous_period_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"request_id":{"type":"string"},"revision":{"minimum":1,"type":"integer"},"round":{"minimum":0,"type":"integer"},"status":{"enum":["open","submitted","revision_requested","approved","withdrawn"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"updated_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","number","name","data_date","status","revision","round"],"type":"object"},"schedule_ScheduleUpdateCheck":{"properties":{"item_count":{"minimum":0,"type":"integer"},"items":{"items":{"additionalProperties":true,"type":"object"},"maxItems":200,"type":"array"},"key":{"enum":["health","out_of_sequence","actuals_after_data_date","progress_not_reported","logic_changes","baseline_slip","critical_path","float_erosion"],"type":"string"},"label":{"type":"string"},"metrics":{"additionalProperties":true,"type":"object"},"status":{"enum":["pass","warn","fail","skipped"],"type":"string"},"summary":{"type":"string"}},"required":["key","label","status","summary"],"type":"object"},"schedule_ScheduleUpdateCheckEnvelope":{"properties":{"check":{"$ref":"#/components/schemas/schedule_ScheduleUpdateCheckRun"}},"required":["check"],"type":"object"},"schedule_ScheduleUpdateCheckRun":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"period_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"result":{"properties":{"checks":{"items":{"$ref":"#/components/schemas/schedule_ScheduleUpdateCheck"},"type":"array"},"progress":{"additionalProperties":{"type":"integer"},"type":"object"},"references":{"properties":{"baseline":{"nullable":true,"type":"string"},"previous":{"nullable":true,"type":"string"}},"type":"object"},"summary":{"$ref":"#/components/schemas/schedule_ScheduleUpdateCheckSummary"},"thresholds":{"additionalProperties":{"type":"number"},"type":"object"}},"required":["summary","checks"],"type":"object"},"result_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"summary":{"$ref":"#/components/schemas/schedule_ScheduleUpdateCheckSummary"},"version_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","result","result_digest"],"type":"object"},"schedule_ScheduleUpdateCheckSummary":{"properties":{"baseline_finish":{"format":"date","nullable":true,"type":"string"},"counts":{"properties":{"fail":{"type":"integer"},"pass":{"type":"integer"},"skipped":{"type":"integer"},"warn":{"type":"integer"}},"type":"object"},"critical_count":{"nullable":true,"type":"number"},"critical_path_count":{"type":"integer"},"data_date":{"format":"date","type":"string"},"duration_working_days":{"nullable":true,"type":"number"},"grade":{"nullable":true,"type":"string"},"period_delta_days":{"nullable":true,"type":"integer"},"previous_finish":{"format":"date","nullable":true,"type":"string"},"project_finish":{"format":"date","nullable":true,"type":"string"},"score":{"nullable":true,"type":"number"},"slip_days":{"nullable":true,"type":"integer"}},"type":"object"},"schedule_ScheduleUpdateComment":{"properties":{"activity_id":{"nullable":true,"type":"string"},"author_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"period_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"resolved_at":{"format":"date-time","nullable":true,"type":"string"},"resolved_by_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"submission_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"type":"object"},"schedule_ScheduleUpdateCommentCreate":{"additionalProperties":false,"properties":{"activity_id":{"maxLength":512,"minLength":1,"nullable":true,"type":"string"},"body":{"maxLength":4000,"minLength":1,"type":"string"}},"required":["body"],"type":"object"},"schedule_ScheduleUpdateCommentEnvelope":{"properties":{"comment":{"$ref":"#/components/schemas/schedule_ScheduleUpdateComment"},"notified":{"type":"integer"}},"required":["comment"],"type":"object"},"schedule_ScheduleUpdateDetail":{"properties":{"activities":{"items":{"properties":{"code":{"nullable":true,"type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"check_history":{"items":{"type":"object"},"type":"array"},"comments":{"items":{"$ref":"#/components/schemas/schedule_ScheduleUpdateComment"},"type":"array"},"head":{"nullable":true,"properties":{"data_date":{"format":"date","nullable":true,"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"version":{"type":"integer"}},"type":"object"},"latest_check":{"$ref":"#/components/schemas/schedule_ScheduleUpdateCheckRun","nullable":true},"latest_check_current":{"type":"boolean"},"narrative_draft":{"$ref":"#/components/schemas/schedule_ScheduleUpdateNarrative","nullable":true},"submissions":{"items":{"$ref":"#/components/schemas/schedule_ScheduleUpdateSubmission"},"type":"array"},"update":{"$ref":"#/components/schemas/schedule_ScheduleUpdate"}},"required":["update"],"type":"object"},"schedule_ScheduleUpdateEnvelope":{"properties":{"notified":{"type":"integer"},"replayed":{"type":"boolean"},"submission":{"$ref":"#/components/schemas/schedule_ScheduleUpdateSubmission"},"update":{"$ref":"#/components/schemas/schedule_ScheduleUpdate"},"version_saved":{"description":"True when opening saved a draft version at the new data date.","type":"boolean"}},"required":["update"],"type":"object"},"schedule_ScheduleUpdateForensicInput":{"description":"An accepted update of record, selectable as a forensic windows-analysis input.","properties":{"data_date":{"format":"date","type":"string"},"name":{"type":"string"},"number":{"type":"integer"},"period_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"type":"object"},"schedule_ScheduleUpdateHistoryRow":{"allOf":[{"$ref":"#/components/schemas/schedule_ScheduleUpdate"},{"properties":{"ball_in_court":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"latest_check":{"nullable":true,"properties":{"counts":{"nullable":true,"type":"object"},"created_at":{"format":"date-time","type":"string"},"critical_path_count":{"nullable":true,"type":"integer"},"duration_working_days":{"nullable":true,"type":"number"},"grade":{"nullable":true,"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"project_finish":{"format":"date","nullable":true,"type":"string"},"score":{"nullable":true,"type":"number"},"slip_days":{"nullable":true,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"type":"object"},"submitted_version_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"workflow_status":{"nullable":true,"type":"string"}},"type":"object"}]},"schedule_ScheduleUpdateList":{"properties":{"forensic_series":{"items":{"$ref":"#/components/schemas/schedule_ScheduleUpdateForensicInput"},"type":"array"},"head":{"nullable":true,"properties":{"data_date":{"format":"date","nullable":true,"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"version":{"type":"integer"}},"type":"object"},"next_before_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"updates":{"items":{"$ref":"#/components/schemas/schedule_ScheduleUpdateHistoryRow"},"type":"array"}},"required":["updates","forensic_series"],"type":"object"},"schedule_ScheduleUpdateNarrative":{"additionalProperties":false,"description":"Structured update narrative: critical path, progress, delays, changes, risks, mitigation.","properties":{"changes":{"maxLength":20000,"type":"string"},"critical_path":{"maxLength":20000,"type":"string"},"delays":{"maxLength":20000,"type":"string"},"mitigation":{"maxLength":20000,"type":"string"},"progress":{"maxLength":20000,"type":"string"},"risks":{"maxLength":20000,"type":"string"}},"type":"object"},"schedule_ScheduleUpdateNarrativeInput":{"additionalProperties":false,"properties":{"changes":{"maxLength":20000,"type":"string"},"critical_path":{"maxLength":20000,"type":"string"},"delays":{"maxLength":20000,"type":"string"},"mitigation":{"maxLength":20000,"type":"string"},"progress":{"maxLength":20000,"type":"string"},"risks":{"maxLength":20000,"type":"string"}},"type":"object"},"schedule_ScheduleUpdateOpen":{"additionalProperties":false,"properties":{"baseline_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"data_date":{"format":"date","type":"string"},"expected_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"maxLength":255,"minLength":1,"type":"string"},"request_id":{"format":"uuid","type":"string"}},"required":["expected_version_id","data_date","request_id"],"type":"object"},"schedule_ScheduleUpdatePatch":{"additionalProperties":false,"properties":{"expected_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"maxLength":255,"minLength":1,"type":"string"},"narrative":{"$ref":"#/components/schemas/schedule_ScheduleUpdateNarrativeInput"}},"required":["expected_revision"],"type":"object"},"schedule_ScheduleUpdateRespond":{"additionalProperties":false,"properties":{"comment":{"description":"Required when requesting a revision.","maxLength":4000,"type":"string"},"expected_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"response":{"enum":["approved","approved_as_noted","revise_and_resubmit"],"type":"string"}},"required":["expected_revision","response"],"type":"object"},"schedule_ScheduleUpdateReview":{"properties":{"activities":{"items":{"type":"object"},"type":"array"},"against":{"nullable":true,"properties":{"kind":{"enum":["previous_update","baseline"],"type":"string"},"label":{"type":"string"},"version":{"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"type":"object"},"changes":{"additionalProperties":true,"description":"Flagged changes: logic, durations, constraints, calendars, calendar_definitions, progress, retroactive (changed previously reported actuals), other, activities_added/removed, counts.","nullable":true,"type":"object"},"check":{"$ref":"#/components/schemas/schedule_ScheduleUpdateCheckRun","nullable":true},"comments":{"items":{"$ref":"#/components/schemas/schedule_ScheduleUpdateComment"},"type":"array"},"head_moved":{"type":"boolean"},"submission":{"$ref":"#/components/schemas/schedule_ScheduleUpdateSubmission"},"submitted_version":{"properties":{"digest":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"version":{"type":"integer"}},"type":"object"},"update":{"$ref":"#/components/schemas/schedule_ScheduleUpdate"}},"required":["update","submission"],"type":"object"},"schedule_ScheduleUpdateReviewStep":{"properties":{"assignee_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"comment":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"position":{"type":"integer"},"responded_at":{"format":"date-time","nullable":true,"type":"string"},"response_required":{"type":"boolean"},"status":{"enum":["pending","sent","approved","approved_as_noted","revise_and_resubmit","void"],"type":"string"},"step_type":{"enum":["Approver","Reviewer"],"type":"string"},"workflow_group_number":{"type":"integer"}},"type":"object"},"schedule_ScheduleUpdateRevision":{"additionalProperties":false,"properties":{"expected_revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["expected_revision"],"type":"object"},"schedule_ScheduleUpdateSubmission":{"properties":{"check_run_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"decided_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"narrative":{"$ref":"#/components/schemas/schedule_ScheduleUpdateNarrative"},"narrative_digest":{"type":"string"},"note":{"type":"string"},"round":{"minimum":1,"type":"integer"},"steps":{"items":{"$ref":"#/components/schemas/schedule_ScheduleUpdateReviewStep"},"type":"array"},"submitted_at":{"format":"date-time","type":"string"},"submitted_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"workflow_status":{"enum":["in_review","approved","revise_and_resubmit","withdrawn"],"type":"string"}},"type":"object"},"schedule_ScheduleUpdateSubmit":{"additionalProperties":false,"properties":{"acknowledge_failures":{"default":false,"type":"boolean"},"check_run_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"expected_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"note":{"maxLength":4000,"type":"string"},"reviewers":{"items":{"additionalProperties":false,"properties":{"step_type":{"default":"Approver","enum":["Approver","Reviewer"],"type":"string"},"user_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"workflow_group_number":{"default":1,"maximum":100,"minimum":1,"type":"integer"}},"required":["user_id"],"type":"object"},"maxItems":25,"type":"array"},"workflow_template_id":{"description":"A workflow template with item type ScheduleUpdate; its steps become reviewer steps.","maximum":2147483647,"minimum":1,"type":"integer"}},"required":["expected_revision","check_run_id"],"type":"object"},"schedule_ScheduleUpdateWithdraw":{"additionalProperties":false,"properties":{"expected_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"reason":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["expected_revision","reason"],"type":"object"},"schedule_ScheduleVersionChangePage":{"additionalProperties":false,"properties":{"against_version_id":{"description":"Null when compared with an empty plan (the first version)","nullable":true,"type":"integer"},"entries":{"items":{"additionalProperties":false,"properties":{"change":{"enum":["added","removed","changed"],"type":"string"},"fields":{"description":"Every changed field of a changed activity","items":{"type":"string"},"type":"array"},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name","change","fields"],"type":"object"},"type":"array"},"next_offset":{"description":"Offset of the next page, or null on the last","nullable":true,"type":"integer"},"offset":{"type":"integer"},"total":{"description":"Activity entries in the whole change (added, then removed, then changed)","type":"integer"},"version_id":{"type":"integer"}},"required":["version_id","against_version_id","entries","total","offset","next_offset"],"type":"object"},"schedule_ScheduleWeekReliability":{"additionalProperties":false,"properties":{"committed":{"type":"integer"},"completed":{"type":"integer"},"last_day":{"format":"date","type":"string"},"missed":{"type":"integer"},"ppc":{"description":"Percent plan complete (0-100); null when the week or trade cannot be measured","maximum":100,"minimum":0,"nullable":true,"type":"number"},"status":{"description":"none: no plan for the week","enum":["draft","committed","none"],"type":"string"},"unassessed":{"type":"integer"},"variance":{"additionalProperties":{"type":"integer"},"description":"Missed commitments by variance reason","type":"object"},"week_starting":{"format":"date","type":"string"}},"required":["week_starting","last_day","status","committed","completed","missed","unassessed","ppc","variance"],"type":"object"},"schedule_ScheduleWeeklyCommitment":{"additionalProperties":false,"properties":{"activity_id":{"type":"string"},"assessed_at":{"format":"date-time","nullable":true,"type":"string"},"assessed_by_id":{"nullable":true,"type":"integer"},"completed":{"description":"null = not yet assessed; false = missed (carries a variance reason)","nullable":true,"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"description":{"type":"string"},"id":{"type":"integer"},"notes":{"type":"string"},"plan_id":{"type":"integer"},"planned_quantity":{"nullable":true,"type":"number"},"sequence":{"type":"integer"},"trade":{"description":"Trade or crew that made the promise","type":"string"},"unit":{"type":"string"},"variance_reason":{"enum":["prerequisite_work","materials","labour","equipment","information","design_change","directive","weather","access","over_commitment","not_recorded"],"nullable":true,"type":"string"}},"required":["id","plan_id","activity_id","description","trade","planned_quantity","unit","completed","variance_reason","notes","sequence","assessed_at","assessed_by_id","created_by_id","created_at"],"type":"object"},"schedule_ScheduleWeeklyPlan":{"additionalProperties":false,"properties":{"allow_constrained":{"description":"Committed while some commitments were not make-ready (recorded override)","type":"boolean"},"commitments":{"items":{"$ref":"#/components/schemas/schedule_ScheduleWeeklyCommitment"},"type":"array"},"committed_at":{"format":"date-time","nullable":true,"type":"string"},"committed_by_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"last_day":{"format":"date","type":"string"},"note":{"type":"string"},"reliability":{"$ref":"#/components/schemas/schedule_ScheduleWeekReliability"},"status":{"enum":["draft","committed"],"type":"string"},"week_starting":{"format":"date","type":"string"}},"required":["id","week_starting","last_day","status","note","allow_constrained","committed_at","committed_by_id","created_by_id","created_at","commitments","reliability"],"type":"object"},"schedule_ScheduleWeeklyPlanList":{"additionalProperties":false,"properties":{"plans":{"items":{"$ref":"#/components/schemas/schedule_ScheduleWeeklyPlan"},"type":"array"},"window":{"additionalProperties":false,"properties":{"from":{"format":"date","type":"string"},"to":{"format":"date","type":"string"}},"required":["from","to"],"type":"object"}},"required":["window","plans"],"type":"object"},"schedule_ScheduleWeeklyPlanResult":{"additionalProperties":false,"properties":{"created":{"items":{"type":"integer"},"type":"array"},"make_ready":{"additionalProperties":false,"properties":{"checked":{"description":"False when no calculated schedule was available to check readiness","type":"boolean"},"constrained":{"items":{"additionalProperties":false,"properties":{"activity_id":{"type":"string"},"description":{"type":"string"},"open_constraints":{"type":"integer"}},"required":["activity_id","description","open_constraints"],"type":"object"},"type":"array"}},"required":["checked","constrained"],"type":"object"},"plan":{"$ref":"#/components/schemas/schedule_ScheduleWeeklyPlan"}},"required":["plan"],"type":"object"},"schedule_WorkforceCapacityPreview":{"additionalProperties":false,"properties":{"analysis_revision":{"type":"string"},"data_date":{"format":"date","type":"string"},"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"demand_basis":{"additionalProperties":false,"properties":{"legacy_normalization":{"nullable":true,"type":"string"},"loading":{"additionalProperties":true,"nullable":true,"type":"object"},"precision":{"enum":["unrounded_kernel_float"],"type":"string"}},"required":["precision","loading","legacy_normalization"],"type":"object"},"engine_revision":{"type":"string"},"from_day":{"format":"date","type":"string"},"mapping_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"minutes_per_unit":{"maximum":1440,"minimum":0,"not":{"maximum":0},"type":"number"},"person_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"resource_id":{"maxLength":512,"minLength":1,"type":"string"}},"required":["resource_id","person_id","minutes_per_unit"],"type":"object"},"maxItems":100,"type":"array"},"people":{"items":{"additionalProperties":false,"properties":{"assignable":{"type":"boolean"},"days":{"items":{"additionalProperties":false,"properties":{"allocation_overlaps":{"additionalProperties":false,"properties":{"current_crew":{"minimum":0,"type":"integer"},"other_project":{"minimum":0,"type":"integer"},"this_project":{"minimum":0,"type":"integer"}},"required":["this_project","other_project","current_crew"],"type":"object"},"available_minutes":{"maximum":1440,"minimum":0,"nullable":true,"type":"integer"},"comparison_tolerance_minutes":{"minimum":0,"type":"number"},"day":{"format":"date","type":"string"},"excess_minutes":{"minimum":0,"nullable":true,"type":"number"},"recorded_demand_minutes":{"minimum":0,"type":"number"},"revision":{"minimum":0,"type":"integer"},"status":{"enum":["person_unavailable","capacity_unknown","recorded_demand_exceeds_capacity","demand_incomplete","allocation_review_required","no_excess_in_recorded_demand"],"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["day","available_minutes","revision","updated_at","allocation_overlaps","recorded_demand_minutes","excess_minutes","comparison_tolerance_minutes","status"],"type":"object"},"maxItems":366,"type":"array"},"person_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"resource_ids":{"items":{"type":"string"},"maxItems":100,"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"unrecorded_usage_count":{"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["person_id","status","assignable","updated_at","resource_ids","unrecorded_usage_count","days"],"type":"object"},"maxItems":100,"type":"array"},"review_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"source_basis":{"additionalProperties":false,"properties":{"allocation_calendar_verified":{"enum":[false],"type":"boolean"},"capacity_verified":{"enum":[false],"type":"boolean"},"company_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"conversion_basis":{"enum":["user_stated_minutes_per_schedule_unit"],"type":"string"},"conversion_verified":{"enum":[false],"type":"boolean"},"crew_membership_history_verified":{"enum":[false],"type":"boolean"},"dates_applied":{"enum":[false],"type":"boolean"},"isolation":{"enum":["repeatable_read"],"type":"string"},"persisted":{"type":"boolean"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"qualification":{"type":"string"},"read_finished_at":{"format":"date-time","type":"string"},"read_started_at":{"format":"date-time","type":"string"},"reservations_changed":{"enum":[false],"type":"boolean"}},"required":["company_id","project_id","isolation","read_started_at","read_finished_at","persisted","allocation_calendar_verified","crew_membership_history_verified","conversion_basis","conversion_verified","capacity_verified","reservations_changed","dates_applied","qualification"],"type":"object"},"source_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"through_day":{"format":"date","type":"string"},"unmapped_resource_ids":{"items":{"type":"string"},"maxItems":100000,"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","definition_digest","engine_revision","data_date","from_day","through_day","mappings","mapping_digest","source_digest","people","unmapped_resource_ids","source_basis","demand_basis","review_digest","analysis_revision"],"type":"object"},"schedule_WorkforceCapacityReport":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"report":{"$ref":"#/components/schemas/schedule_WorkforceCapacityPreview"},"review_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"status":{"enum":["retained_unapproved"],"type":"string"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","review_digest","created_by_id","created_at","status","report"],"type":"object"},"specifications_Compare":{"additionalProperties":false,"properties":{"a":{"$ref":"#/components/schemas/specifications_CompareRevision"},"b":{"$ref":"#/components/schemas/specifications_CompareRevision"},"changed_count":{"minimum":0,"type":"integer"},"diff":{"items":{"additionalProperties":false,"properties":{"a":{"type":["string","null"]},"b":{"type":["string","null"]},"changed":{"type":"boolean"},"field":{"type":"string"},"label":{"type":"string"}},"required":["field","label","a","b","changed"],"type":"object"},"type":"array"},"section":{"$ref":"#/components/schemas/specifications_SectionIdentity"},"specification_section_id":{"type":"integer"}},"required":["specification_section_id","section","a","b","diff","changed_count"],"type":"object"},"specifications_CompareRevision":{"additionalProperties":false,"properties":{"content":{"items":{"type":"string"},"type":"array"},"current":{"type":"boolean"},"id":{"type":"integer"},"issued_date":{"format":"date","type":["string","null"]},"received_date":{"format":"date","type":["string","null"]},"revision":{"type":"string"},"set":{"anyOf":[{"additionalProperties":false,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},{"type":"null"}]},"source":{"$ref":"#/components/schemas/specifications_CompareSource"},"specification_section_division_id":{"type":["integer","null"]},"specification_section_id":{"type":"integer"},"specification_set_id":{"type":["integer","null"]}},"required":["id","specification_section_id","specification_section_division_id","specification_set_id","revision","issued_date","received_date","set","current","content","source"],"type":"object"},"specifications_CompareSource":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"legacy_synthetic"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"owned_pdf"},"page_count":{"minimum":0,"type":"integer"},"sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"size":{"minimum":0,"type":"integer"},"text_length":{"minimum":0,"type":"integer"},"text_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"upload_id":{"type":"integer"},"url":{"type":"string"}},"required":["kind","upload_id","url","sha256","size","page_count","text_sha256","text_length"],"type":"object"}]},"specifications_Division":{"additionalProperties":false,"properties":{"description":{"type":"string"},"id":{"type":"integer"},"number":{"type":"string"},"url":{"type":"null"}},"required":["id","number","description","url"],"type":"object"},"specifications_DivisionStub":{"additionalProperties":false,"properties":{"description":{"type":"string"},"id":{"type":"integer"},"number":{"type":"string"}},"required":["id","number","description"],"type":"object"},"specifications_IssuedSet":{"additionalProperties":false,"properties":{"affected_count":{"minimum":0,"type":"integer"},"company_id":{"type":"integer"},"created_at":{"format":"date-time","type":["string","null"]},"date":{"format":"date","type":["string","null"]},"deleted_at":{"format":"date-time","type":["string","null"]},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"project_id":{"type":"integer"},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["id","project_id","company_id","name","date","position","created_at","updated_at","deleted_at","affected_count"],"type":"object"},"specifications_RecycledDivision":{"additionalProperties":false,"properties":{"deleted":{"const":true},"deleted_at":{"format":"date-time","type":["string","null"]},"description":{"type":"string"},"id":{"type":"integer"},"number":{"type":"string"}},"required":["id","number","description","deleted","deleted_at"],"type":"object"},"specifications_RecycledSection":{"additionalProperties":false,"properties":{"current_revision_id":{"type":["integer","null"]},"current_revision_number":{"type":["string","null"]},"deleted":{"const":true},"deleted_at":{"format":"date-time","type":["string","null"]},"description":{"type":"string"},"id":{"type":"integer"},"label":{"type":"string"},"number":{"type":"string"},"specification_section_division":{"anyOf":[{"$ref":"#/components/schemas/specifications_DivisionStub"},{"type":"null"}]}},"required":["id","number","description","label","current_revision_id","current_revision_number","specification_section_division","deleted","deleted_at"],"type":"object"},"specifications_Related":{"additionalProperties":false,"properties":{"rfis":{"items":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"number":{"type":["string","null"]},"status":{"type":"string"},"subject":{"type":"string"},"translated_status":{"type":"string"}},"required":["id","number","subject","status","translated_status"],"type":"object"},"type":"array"},"submittals":{"items":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"number":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"},"translated_status":{"type":"string"}},"required":["id","number","title","status","translated_status"],"type":"object"},"type":"array"}},"required":["submittals","rfis"],"type":"object"},"specifications_Revision":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":["string","null"]},"current":{"type":"boolean"},"custom_fields":{"type":"object"},"description":{"type":"string"},"id":{"type":"integer"},"issued_date":{"format":"date","type":["string","null"]},"number":{"type":"string"},"position":{"type":"integer"},"received_date":{"format":"date","type":["string","null"]},"revision":{"type":"string"},"specification_section_division_id":{"type":["integer","null"]},"specification_section_id":{"type":"integer"},"specification_set_id":{"type":["integer","null"]},"updated_at":{"format":"date-time","type":["string","null"]},"url":{"type":["string","null"]}},"required":["id","specification_section_id","specification_section_division_id","specification_set_id","number","description","url","revision","issued_date","received_date","updated_at","custom_fields","current","position","created_at"],"type":"object"},"specifications_RevisionUpdate":{"description":"Both wrappers are optional; {} is accepted. Revision-level division wins over section-level division when both are supplied. Unknown fields are ignored.","properties":{"specification_section":{"properties":{"description":{"type":["string","null"]},"number":{"minLength":1,"type":"string"},"specification_section_division_id":{"minimum":1,"type":"integer"}},"type":"object"},"specification_section_revision":{"properties":{"current":{"description":"Only true promotes the revision and supersedes its siblings. False is accepted but does not demote the revision.","type":"boolean"},"issued_date":{"description":"Nonempty date-only or date-time string. The service normalizes it; an unparsable nonempty string becomes null. Null clears the date; omission preserves it.","minLength":1,"type":["string","null"]},"position":{"type":"integer"},"received_date":{"description":"Nonempty date-only or date-time string. The service normalizes it; an unparsable nonempty string becomes null. Null clears the date; omission preserves it.","minLength":1,"type":["string","null"]},"revision":{"type":"string"},"specification_section_division_id":{"minimum":1,"type":"integer"},"specification_set_id":{"minimum":1,"type":["integer","null"]}},"type":"object"}},"type":"object"},"specifications_Section":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":["string","null"]},"current_revision":{"anyOf":[{"$ref":"#/components/schemas/specifications_Revision"},{"type":"null"}]},"current_revision_id":{"type":["integer","null"]},"description":{"type":"string"},"id":{"type":"integer"},"label":{"type":"string"},"number":{"type":"string"},"project_id":{"type":"integer"},"specification_section_division":{"anyOf":[{"$ref":"#/components/schemas/specifications_DivisionStub"},{"type":"null"}]},"specification_section_division_id":{"type":["integer","null"]},"updated_at":{"format":"date-time","type":["string","null"]}},"required":["id","number","description","label","current_revision_id","project_id","specification_section_division_id","specification_section_division","current_revision","created_at","updated_at"],"type":"object"},"specifications_SectionIdentity":{"additionalProperties":false,"properties":{"current_revision_id":{"type":["integer","null"]},"description":{"type":"string"},"id":{"type":"integer"},"label":{"type":"string"},"number":{"type":"string"}},"required":["id","number","description","label","current_revision_id"],"type":"object"},"specifications_SectionUpdate":{"properties":{"specification_section":{"properties":{"description":{"type":["string","null"]},"number":{"minLength":1,"type":"string"},"specification_section_division_id":{"minimum":1,"type":"integer"}},"type":"object"}},"required":["specification_section"],"type":"object"},"specifications_SetIssue":{"properties":{"date":{"description":"Nonempty date-only or date-time string. The service normalizes it; an unparsable nonempty string becomes null. Null clears the date; omission preserves it.","minLength":1,"type":["string","null"]},"issued_date":{"description":"Nonempty date-only or date-time string. The service normalizes it; an unparsable nonempty string becomes null. Null clears the date; omission preserves it.","minLength":1,"type":["string","null"]},"received_date":{"description":"Nonempty date-only or date-time string. The service normalizes it; an unparsable nonempty string becomes null. Null clears the date; omission preserves it.","minLength":1,"type":["string","null"]}},"type":"object"},"specifications_SpecificationDivisionV2":{"properties":{"deletable":{"type":"boolean"},"description":{"type":"string"},"id":{"type":"string"},"number":{"type":"string"},"sections_ids":{"items":{"type":"integer"},"type":"array"},"specification_section_revision_ids":{"items":{"type":"integer"},"type":"array"}},"required":["id","number"],"type":"object"},"specifications_SpecificationRevisionV2":{"properties":{"created_at":{"format":"date-time","type":"string"},"current":{"type":"boolean"},"description":{"type":"string"},"division":{"nullable":true,"properties":{"description":{"type":"string"},"id":{"type":"string"},"number":{"type":"string"}},"type":"object"},"id":{"type":"string"},"issued_date":{"format":"date","nullable":true,"type":"string"},"number":{"type":"string"},"received_date":{"format":"date","nullable":true,"type":"string"},"revision":{"type":"string"},"set":{"nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"type":"object"},"specification_section_id":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"url":{"description":"Authenticated /rest/v1.0/uploads URL of the original PDF; null for revisions without an uploaded file.","nullable":true,"type":"string"}},"required":["id","specification_section_id","number","revision","current"],"type":"object"},"specifications_SpecificationSetV2":{"properties":{"date":{"format":"date","nullable":true,"type":"string"},"deletable":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"}},"required":["id","name"],"type":"object"},"timesheets_CostCode":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"timesheets_CreatedBy":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login","name"],"type":"object"},"timesheets_LocationStub":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"timesheets_NestedTimesheet":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"$ref":"#/components/schemas/timesheets_CreatedBy"},"date":{"format":"date","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"number":{"type":"integer"},"status":{"enum":["pending","approved"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"timesheets_Party":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"timesheets_Signature":{"nullable":true,"properties":{"created_by":{"$ref":"#/components/schemas/timesheets_CreatedBy"},"file_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"large_thumbnail_url":{"nullable":true,"type":"string"},"medium_thumbnail_url":{"nullable":true,"type":"string"},"signature_text":{"nullable":true,"type":"string"},"signed_at":{"format":"date-time","nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["id"],"type":"object"},"timesheets_SubJob":{"nullable":true,"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"timesheets_TimecardEntry":{"properties":{"approval_status":{"enum":["pending","reviewed","approved","completed"],"type":"string"},"billable":{"type":"boolean"},"cost_code":{"$ref":"#/components/schemas/timesheets_CostCode"},"created_at":{"format":"date-time","type":"string"},"created_by":{"$ref":"#/components/schemas/timesheets_CreatedBy"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","nullable":true,"type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"double_time_hours":{"nullable":true,"type":"string"},"hours":{"type":"string"},"id":{"type":"integer"},"injured":{"nullable":true,"type":"boolean"},"line_item_type_id":{"nullable":true,"type":"integer"},"location":{"$ref":"#/components/schemas/timesheets_LocationStub"},"lunch_time":{"nullable":true,"type":"integer"},"overtime_hours":{"nullable":true,"type":"string"},"party":{"$ref":"#/components/schemas/timesheets_Party"},"signature":{"$ref":"#/components/schemas/timesheets_Signature"},"signature_status":{"nullable":true,"type":"string"},"signed":{"type":"boolean"},"sub_job":{"$ref":"#/components/schemas/timesheets_SubJob"},"time_in":{"format":"date-time","nullable":true,"type":"string"},"time_out":{"format":"date-time","nullable":true,"type":"string"},"timecard_time_type":{"$ref":"#/components/schemas/timesheets_TimecardTimeType"},"timesheet":{"$ref":"#/components/schemas/timesheets_NestedTimesheet"},"timesheet_status":{"type":"string"},"translated_approval_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_classification":{"nullable":true,"type":"string"}},"required":["id","date","hours","approval_status","billable"],"type":"object"},"timesheets_TimecardEntryWrite":{"properties":{"approval_status":{"enum":["pending","reviewed","approved","completed"],"type":"string"},"billable":{"type":"boolean"},"cost_code_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","nullable":true,"type":"string"},"double_time_hours":{"nullable":true,"type":"string"},"hours":{"type":"string"},"injured":{"nullable":true,"type":"boolean"},"line_item_type_id":{"nullable":true,"type":"integer"},"location_id":{"nullable":true,"type":"integer"},"lunch_time":{"nullable":true,"type":"string"},"overtime_hours":{"nullable":true,"type":"string"},"party_id":{"type":"integer"},"signed":{"type":"boolean"},"sub_job_id":{"nullable":true,"type":"integer"},"time_in":{"format":"date-time","nullable":true,"type":"string"},"time_out":{"format":"date-time","nullable":true,"type":"string"},"timesheet_id":{"nullable":true,"type":"integer"},"work_classification":{"nullable":true,"type":"string"}},"required":["party_id","hours"],"type":"object"},"timesheets_TimecardTimeType":{"properties":{"abbreviated_time_type":{"type":"string"},"global":{"type":"boolean"},"time_type":{"type":"string"}},"required":["time_type","abbreviated_time_type"],"type":"object"},"timesheets_Timesheet":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"$ref":"#/components/schemas/timesheets_CreatedBy"},"date":{"format":"date","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"number":{"type":"integer"},"status":{"enum":["pending","approved"],"type":"string"},"timecard_entries":{"items":{"$ref":"#/components/schemas/timesheets_TimesheetEntryStub"},"type":"array"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","date","number","status"],"type":"object"},"timesheets_TimesheetEntryStub":{"properties":{"approval_status":{"type":"string"},"billable":{"type":"boolean"},"cost_code":{"$ref":"#/components/schemas/timesheets_CostCode"},"created_at":{"format":"date-time","type":"string"},"date":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"hours":{"type":"string"},"id":{"type":"integer"},"overtime_hours":{"nullable":true,"type":"string"},"party":{"$ref":"#/components/schemas/timesheets_Party"},"signed":{"type":"boolean"},"sub_job":{"$ref":"#/components/schemas/timesheets_SubJob"},"updated_at":{"format":"date-time","type":"string"},"work_classification":{"nullable":true,"type":"string"}},"required":["id","date","hours"],"type":"object"},"timesheets_WorkflowError":{"additionalProperties":false,"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"required":["errors"],"type":"object"},"transmittals_Action":{"additionalProperties":false,"properties":{"action":{"enum":["out_for_signature","approved_as_submitted","approved_as_noted","submit","resubmitted","returned","returned_for_corrections","resubmit","due_by","received","received_as_noted","sent_date"],"type":"string"},"date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":["string","null"]}},"required":["action","date"],"type":"object"},"transmittals_Create":{"properties":{"transmittal":{"properties":{"actions":{"items":{"enum":["out_for_signature","approved_as_submitted","approved_as_noted","submit","resubmitted","returned","returned_for_corrections","resubmit","due_by","received","received_as_noted","sent_date"],"type":"string"},"type":"array"},"cc_ids":{"items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":"array"},"date":{"type":["string","null"]},"deliver":{"type":"boolean"},"due_by_date":{"type":["string","null"]},"items":{"items":{"properties":{"date":{"type":["string","null"]},"description":{"type":"string"},"document_version_id":{"exclusiveMinimum":0,"maximum":2147483647,"type":"integer"},"drawing_revision_id":{"exclusiveMinimum":0,"maximum":2147483647,"type":"integer"},"format":{"enum":["Attic Stock","CDs","Commitment Contract","Communication","Document","Other","Plans","Potential Change Order","Prime Contract","Prints","Punch List Item","Purchase Order Contract","RFI","Samples","Shop Drawings","Submittal Log","Submittal Package"],"type":"string"},"id":{"exclusiveMinimum":0,"maximum":2147483647,"type":"integer"},"item_type":{"enum":["freeform","document","drawing"],"type":"string"},"notes":{"type":["string","null"]},"quantity":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"ref_id":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"sourceRevisionLabel":{"not":{}},"sourceUploadId":{"not":{}},"source_revision_label":{"not":{}},"source_upload_id":{"not":{}}},"required":["format"],"type":"object"},"type":"array"},"number":{"minLength":1,"type":"string"},"private":{"type":"boolean"},"remarks":{"type":["string","null"]},"sent_date":{"type":["string","null"]},"sent_via":{"anyOf":[{"enum":["attached","under_separate_cover"],"type":"string"},{"type":"null"}]},"subject":{"minLength":1,"type":"string"},"submission_key":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"submitted_for":{"anyOf":[{"enum":["approval","your_use","as_requested","review_and_comment","further_processing"],"type":"string"},{"type":"null"}]},"to_ids":{"items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":"array"}},"required":["subject"],"type":"object"}},"required":["transmittal"],"type":"object"},"transmittals_CreateFrom":{"description":"Version selection arrays, if supplied, must have the same length as their corresponding document or drawing IDs; the handler validates this cross-field constraint.","properties":{"transmittal":{"anyOf":[{"properties":{"document_ids":{"minItems":1}},"required":["document_ids"]},{"properties":{"drawing_ids":{"minItems":1}},"required":["drawing_ids"]}],"properties":{"actions":{"items":{"enum":["out_for_signature","approved_as_submitted","approved_as_noted","submit","resubmitted","returned","returned_for_corrections","resubmit","due_by","received","received_as_noted","sent_date"],"type":"string"},"type":"array"},"cc_ids":{"items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":"array"},"date":{"type":["string","null"]},"deliver":{"type":"boolean"},"document_ids":{"items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":"array"},"document_version_ids":{"items":{"exclusiveMinimum":0,"maximum":2147483647,"type":"integer"},"type":"array"},"drawing_ids":{"items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":"array"},"drawing_revision_ids":{"items":{"exclusiveMinimum":0,"maximum":2147483647,"type":"integer"},"type":"array"},"due_by_date":{"type":["string","null"]},"items":{"items":{"properties":{"date":{"type":["string","null"]},"description":{"type":"string"},"document_version_id":{"exclusiveMinimum":0,"maximum":2147483647,"type":"integer"},"drawing_revision_id":{"exclusiveMinimum":0,"maximum":2147483647,"type":"integer"},"format":{"enum":["Attic Stock","CDs","Commitment Contract","Communication","Document","Other","Plans","Potential Change Order","Prime Contract","Prints","Punch List Item","Purchase Order Contract","RFI","Samples","Shop Drawings","Submittal Log","Submittal Package"],"type":"string"},"id":{"exclusiveMinimum":0,"maximum":2147483647,"type":"integer"},"item_type":{"enum":["freeform","document","drawing"],"type":"string"},"notes":{"type":["string","null"]},"quantity":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"ref_id":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"sourceRevisionLabel":{"not":{}},"sourceUploadId":{"not":{}},"source_revision_label":{"not":{}},"source_upload_id":{"not":{}}},"required":["format"],"type":"object"},"type":"array"},"number":{"minLength":1,"type":"string"},"private":{"type":"boolean"},"remarks":{"type":["string","null"]},"sent_date":{"type":["string","null"]},"sent_via":{"anyOf":[{"enum":["attached","under_separate_cover"],"type":"string"},{"type":"null"}]},"subject":{"minLength":1,"type":"string"},"submission_key":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"},"submitted_for":{"anyOf":[{"enum":["approval","your_use","as_requested","review_and_comment","further_processing"],"type":"string"},{"type":"null"}]},"to_ids":{"items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":"array"}},"type":"object"}},"required":["transmittal"],"type":"object"},"transmittals_Item":{"additionalProperties":false,"properties":{"date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":["string","null"]},"description":{"type":"string"},"document_version_id":{"type":["integer","null"]},"drawing_revision_id":{"type":["integer","null"]},"format":{"enum":["Attic Stock","CDs","Commitment Contract","Communication","Document","Other","Plans","Potential Change Order","Prime Contract","Prints","Punch List Item","Purchase Order Contract","RFI","Samples","Shop Drawings","Submittal Log","Submittal Package"],"type":"string"},"id":{"type":"integer"},"item_type":{"enum":["freeform","document","drawing"],"type":"string"},"notes":{"type":["string","null"]},"quantity":{"type":["integer","null"]},"ref":{"oneOf":[{"type":"null"},{"additionalProperties":false,"properties":{"availability":{"enum":["stored","metadata_only","revision_not_recorded"],"type":"string"},"display":{"type":"string"},"document_version_id":{"type":["integer","null"]},"download_url":{"type":["string","null"]},"drawing_revision_id":{"type":["integer","null"]},"id":{"type":"integer"},"source_revision_label":{"type":["string","null"]},"source_upload_id":{"type":["integer","null"]},"type":{"enum":["document","drawing"],"type":"string"},"url":{"type":"string"}},"required":["type","id","display","url","document_version_id","drawing_revision_id","source_upload_id","source_revision_label","availability","download_url"],"type":"object"}]},"ref_id":{"type":["integer","null"]},"source_revision_label":{"type":["string","null"]},"source_upload_id":{"type":["integer","null"]}},"required":["id","format","description","date","quantity","notes","item_type","ref_id","ref","document_version_id","drawing_revision_id","source_upload_id","source_revision_label"],"type":"object"},"transmittals_PersonStub":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login","name"],"type":"object"},"transmittals_Receipt":{"additionalProperties":false,"properties":{"acknowledged":{"type":"boolean"},"received":{"type":"boolean"},"received_at":{"type":["string","null"]},"user":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/transmittals_PersonStub"}]}},"required":["user","received","received_at","acknowledged"],"type":"object"},"transmittals_ReceiptInput":{"properties":{"acknowledged":{"type":"boolean"},"received":{"type":"boolean"},"user_id":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["user_id"],"type":"object"},"transmittals_Transmittal":{"additionalProperties":false,"properties":{"actions":{"items":{"$ref":"#/components/schemas/transmittals_Action"},"type":"array"},"cc":{"items":{"$ref":"#/components/schemas/transmittals_PersonStub"},"type":"array"},"created_at":{"type":"string"},"created_by":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/transmittals_PersonStub"}]},"date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":["string","null"]},"delivered_date":{"type":["string","null"]},"email_recorded_at":{"type":["string","null"]},"from":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/transmittals_PersonStub"}]},"id":{"type":"integer"},"items":{"items":{"$ref":"#/components/schemas/transmittals_Item"},"type":"array"},"number":{"type":"string"},"private":{"type":"boolean"},"receipts":{"items":{"$ref":"#/components/schemas/transmittals_Receipt"},"type":"array"},"remarks":{"type":["string","null"]},"sent_via":{"enum":["attached","under_separate_cover",null]},"status":{"enum":["sent","delivered"]},"subject":{"type":["string","null"]},"submitted_for":{"enum":["approval","your_use","as_requested","review_and_comment","further_processing",null]},"to":{"items":{"$ref":"#/components/schemas/transmittals_PersonStub"},"type":"array"},"updated_at":{"type":"string"}},"required":["id","number","subject","date","to","cc","from","sent_via","private","submitted_for","actions","remarks","status","delivered_date","email_recorded_at","items","created_by","created_at","updated_at","receipts"],"type":"object"},"transmittals_Update":{"properties":{"transmittal":{"properties":{"actions":{"items":{"enum":["out_for_signature","approved_as_submitted","approved_as_noted","submit","resubmitted","returned","returned_for_corrections","resubmit","due_by","received","received_as_noted","sent_date"],"type":"string"},"type":"array"},"cc_ids":{"items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":"array"},"date":{"type":["string","null"]},"due_by_date":{"type":["string","null"]},"items":{"items":{"properties":{"date":{"type":["string","null"]},"description":{"type":"string"},"document_version_id":{"exclusiveMinimum":0,"maximum":2147483647,"type":"integer"},"drawing_revision_id":{"exclusiveMinimum":0,"maximum":2147483647,"type":"integer"},"format":{"enum":["Attic Stock","CDs","Commitment Contract","Communication","Document","Other","Plans","Potential Change Order","Prime Contract","Prints","Punch List Item","Purchase Order Contract","RFI","Samples","Shop Drawings","Submittal Log","Submittal Package"],"type":"string"},"id":{"exclusiveMinimum":0,"maximum":2147483647,"type":"integer"},"item_type":{"enum":["freeform","document","drawing"],"type":"string"},"notes":{"type":["string","null"]},"quantity":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"ref_id":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"sourceRevisionLabel":{"not":{}},"sourceUploadId":{"not":{}},"source_revision_label":{"not":{}},"source_upload_id":{"not":{}}},"required":["format"],"type":"object"},"type":"array"},"number":{"minLength":1,"type":"string"},"private":{"type":"boolean"},"remarks":{"type":["string","null"]},"sent_date":{"type":["string","null"]},"sent_via":{"anyOf":[{"enum":["attached","under_separate_cover"],"type":"string"},{"type":"null"}]},"subject":{"minLength":1,"type":"string"},"submitted_for":{"anyOf":[{"enum":["approval","your_use","as_requested","review_and_comment","further_processing"],"type":"string"},{"type":"null"}]},"to_ids":{"items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":"array"}},"type":"object"}},"required":["transmittal"],"type":"object"},"wbs_CompanySegmentItemUpdate":{"properties":{"segment_item":{"properties":{"code":{"minLength":1,"type":"string"},"name":{"minLength":1,"type":"string"},"parent_id":{"description":"Id of the parent in the same tiered segment, or null to move the item to the root.","minimum":1,"nullable":true,"type":"integer"},"position":{"description":"Item position. Null leaves the current position unchanged.","nullable":true,"type":"integer"},"status":{"enum":["active","inactive"],"type":"string"}},"type":"object"}},"required":["segment_item"],"type":"object"},"wbs_CostType":{"properties":{"base_type":{"enum":["labor","equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"translated_base_type":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","code","base_type"],"type":"object"},"wbs_Segment":{"properties":{"company_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"delimiter":{"type":"string"},"id":{"type":"integer"},"is_included_in_project_pattern":{"type":"boolean"},"name":{"type":"string"},"position":{"type":"integer"},"project_can_delete_origin_company":{"type":"boolean"},"project_can_modify_origin_project":{"type":"boolean"},"project_id":{"nullable":true,"type":"integer"},"required":{"type":"boolean"},"segment_items_count":{"nullable":true,"type":"integer"},"selectable_tiers":{"type":"boolean"},"structure":{"enum":["tiered","flat"],"type":"string"},"tier_depth":{"type":"integer"},"tiered":{"type":"boolean"},"translated_type":{"type":"string"},"type":{"enum":["sub_job","cost_code","line_item_type","custom","attribute"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_pattern_id":{"type":"integer"}},"required":["id","type","name","position","delimiter","structure"],"type":"object"},"wbs_SegmentItem":{"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"is_parent":{"type":"boolean"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"path_code":{"type":"string"},"path_codes":{"items":{"type":"string"},"type":"array"},"path_ids":{"items":{"type":"integer"},"type":"array"},"path_names":{"items":{"type":"string"},"type":"array"},"segment":{"$ref":"#/components/schemas/wbs_SegmentStub"},"status":{"enum":["active","inactive"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","code","name","status"],"type":"object"},"wbs_SegmentStub":{"properties":{"created_at":{"format":"date-time","type":"string"},"delimiter":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"project_can_delete_origin_company":{"type":"boolean"},"project_can_modify_origin_project":{"type":"boolean"},"required":{"type":"boolean"},"segment_items_count":{"type":"integer"},"structure":{"type":"string"},"type":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_pattern_id":{"type":"integer"}},"type":"object"},"wbs_StandardCostCode":{"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"division":{"nullable":true,"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","code","full_code","name"],"type":"object"},"wbs_WbsApiError":{"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"required":["errors"],"type":"object"},"wbs_WbsCode":{"properties":{"attribute_items":{"items":{},"type":"array"},"created_at":{"format":"date-time","type":"string"},"flat_code":{"type":"string"},"flat_name":{"type":"string"},"id":{"type":"integer"},"is_in_group":{"type":"boolean"},"segment_items":{"items":{"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"path_code":{"type":"string"},"path_codes":{"items":{"type":"string"},"type":"array"},"path_ids":{"items":{"type":"integer"},"type":"array"},"path_names":{"items":{"type":"string"},"type":"array"},"segment":{"properties":{"delimiter":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"type":{"type":"string"}},"type":"object"},"status":{"type":"string"}},"type":"object"},"type":"array"},"status":{"enum":["active","inactive"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_pattern_id":{"type":"integer"}},"required":["id","flat_code","flat_name","status","segment_items"],"type":"object"},"wbs_WbsPattern":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_project_level_ordered":{"type":"boolean"},"segments":{"items":{"$ref":"#/components/schemas/wbs_Segment"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","description","is_project_level_ordered","segments"],"type":"object"},"wbs_WbsValidationError":{"properties":{"errors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}},"required":["errors"],"type":"object"},"webhooks_Webhook":{"properties":{"active":{"type":"boolean"},"company_id":{"type":"integer"},"created_at":{"nullable":true,"type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"events":{"description":"Event names: exact (\"analytics.schedule.delivered\"), a namespace prefix (\"analytics.*\") or \"*\". Emitted today: analytics.alert.fired, analytics.insight.opened, analytics.schedule.delivered (metadata and a signed, expiring download link rendered as the schedule owner; never values).","items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"secret":{"type":"string"},"secret_preview":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"url":{"type":"string"}},"required":["id","company_id","url","events","active","secret"],"type":"object"},"webhooks_WebhookDelivery":{"properties":{"attemptCount":{"type":"integer"},"attempts":{"items":{"properties":{"errorCode":{"nullable":true,"type":"string"},"finishedAt":{"nullable":true,"type":"string"},"httpStatus":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"startedAt":{"type":"string"}},"type":"object"},"maxItems":10,"type":"array"},"createdAt":{"type":"string"},"errorCode":{"nullable":true,"type":"string"},"event":{"type":"string"},"eventId":{"description":"Event id of a project record event delivery.","format":"uuid","nullable":true,"type":"string"},"httpStatus":{"nullable":true,"type":"integer"},"id":{"format":"uuid","type":"string"},"jobId":{"type":"integer"},"outcome":{"enum":["pending","succeeded","cancelled"],"type":"string"},"replayOf":{"format":"uuid","nullable":true,"type":"string"},"sequence":{"nullable":true,"type":"integer"},"status":{"enum":["queued","running","completed","failed"],"type":"string"},"subscriptionId":{"type":"integer"},"updatedAt":{"type":"string"}},"required":["id","subscriptionId","jobId","outcome","status","attemptCount","attempts"],"type":"object"},"webhooks_WebhookListItem":{"properties":{"active":{"type":"boolean"},"company_id":{"type":"integer"},"created_at":{"nullable":true,"type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"events":{"description":"Event names: exact (\"analytics.schedule.delivered\"), a namespace prefix (\"analytics.*\") or \"*\". Emitted today: analytics.alert.fired, analytics.insight.opened, analytics.schedule.delivered (metadata and a signed, expiring download link rendered as the schedule owner; never values).","items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"secret_preview":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"url":{"type":"string"}},"required":["id","company_id","url","events","active"],"type":"object"},"workforce_Assignment":{"properties":{"category_name":{"nullable":true,"type":"string"},"company_id":{"type":"integer"},"created_at":{"nullable":true,"type":"string"},"created_by":{"$ref":"#/components/schemas/workforce_UserStub"},"crew_id":{"nullable":true,"type":"integer"},"crew_name":{"nullable":true,"type":"string"},"end_day":{"nullable":true,"type":"string"},"hours_per_day":{"nullable":true,"type":"number"},"id":{"type":"integer"},"notes":{"nullable":true,"type":"string"},"person_id":{"nullable":true,"type":"integer"},"person_name":{"nullable":true,"type":"string"},"project_id":{"type":"integer"},"project_name":{"nullable":true,"type":"string"},"role":{"nullable":true,"type":"string"},"start_day":{"nullable":true,"type":"string"},"state":{"enum":["pending","confirmed","completed","canceled"],"type":"string"},"translated_state":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","company_id","project_id","start_day","state"],"type":"object"},"workforce_Crew":{"properties":{"company_id":{"type":"integer"},"created_at":{"nullable":true,"type":"string"},"created_by":{"$ref":"#/components/schemas/workforce_UserStub"},"created_by_id":{"nullable":true,"type":"integer"},"employee_count":{"type":"integer"},"employees":{"items":{"properties":{"id":{"type":"integer"},"login":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"id":{"type":"integer"},"lead":{"$ref":"#/components/schemas/workforce_PersonStub"},"lead_person_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","company_id","name","employees"],"type":"object"},"workforce_Errors":{"properties":{"errors":{}},"type":"object"},"workforce_FilterOption":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"workforce_Person":{"properties":{"company_id":{"type":"integer"},"created_at":{"nullable":true,"type":"string"},"crew_ids":{"items":{"type":"integer"},"type":"array"},"deleted_at":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"employee_id":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"hourly_rate":{"nullable":true,"type":"number"},"id":{"type":"integer"},"is_assignable":{"type":"boolean"},"job_title":{"nullable":true,"type":"string"},"last_name":{"type":"string"},"name":{"type":"string"},"phone":{"nullable":true,"type":"string"},"status":{"enum":["active","inactive"],"type":"string"},"trade":{"nullable":true,"type":"string"},"translated_status":{"type":"string"},"updated_at":{"nullable":true,"type":"string"},"user_id":{"nullable":true,"type":"integer"}},"required":["id","company_id","first_name","last_name","name","status","is_assignable"],"type":"object"},"workforce_PersonShow":{"allOf":[{"$ref":"#/components/schemas/workforce_Person"},{"properties":{"created_by":{"$ref":"#/components/schemas/workforce_UserStub"},"crews":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"}},"type":"object"}]},"workforce_PersonStub":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"workforce_UserStub":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login","name"],"type":"object"}},"securitySchemes":{"bearerAuth":{"description":"Personal API token, service account token or OAuth access token.","scheme":"bearer","type":"http"}}},"info":{"description":"Every implemented os.construction REST operation in one document, generated from the module contracts by app/scripts/gen-openapi-bundle.ts. Authenticate with `Authorization: Bearer <token>`. List endpoints paginate with page/per_page and return Total, Per-Page and Link headers. Writes accept an optional Idempotency-Key header. Developer guides: https://os.construction/developers","title":"os.construction REST API","version":"1.0.0","x-os-operation-count":2549},"openapi":"3.0.3","paths":{"/rest/v1.0/auth/connected_apps":{"get":{"description":"Your own live authorizations. People only.","operationId":"listAuthConnectedApps","parameters":[{"in":"query","name":"after","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/identity_Authorization"},"type":"array"}}},"description":"Authorizations"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"List your connected apps","tags":["identity"],"x-os-idempotent":false,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/auth/connected_apps/{grant_id}":{"delete":{"description":"People only.","operationId":"deleteAuthConnectedApp","parameters":[{"description":"Authorization id (uuid)","in":"path","name":"grant_id","required":true,"schema":{"type":"string"}},{"description":"Optional. Repeating a request with the same key within 24 hours replays the first 2xx response instead of running the write again.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"Revoke one of your connected apps","tags":["identity"],"x-os-idempotent":true,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/bidding/recipient/{id}":{"get":{"description":"A scoped API token needs `bidding:read`.","operationId":"getBiddingRecipient","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"action":{"enum":["submit","decline"],"type":"string"},"bid":{"additionalProperties":false,"properties":{"alternates":{"items":{"additionalProperties":false,"properties":{"amount":{"pattern":"^(?:0|[1-9]\\d{0,11})(?:\\.\\d{1,2})?$","type":"string"},"description":{"maxLength":500,"minLength":1,"type":"string"},"kind":{"enum":["additive","deductive"],"type":"string"}},"required":["description","kind","amount"],"type":"object"},"maxItems":10,"type":"array"},"bid_items":{"items":{"additionalProperties":false,"properties":{"amount":{"type":["number","null"]},"bid_form_item_id":{"exclusiveMinimum":0,"type":"integer"},"included":{"type":"boolean"},"quantity":{"type":["number","null"]},"unit_cost":{"type":["number","null"]},"uom":{"type":["string","null"]}},"required":["bid_form_item_id"],"type":"object"},"type":"array"},"bidder_comments":{"type":["string","null"]},"bidder_exclusion":{"type":["string","null"]},"bidder_inclusion":{"type":["string","null"]},"lead_time":{"type":["string","null"]},"lump_sum_amount":{"type":["number","null"]},"qualifications":{"items":{"maxLength":500,"minLength":1,"type":"string"},"maxItems":10,"type":"array"}},"type":"object"},"request_key":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","type":"string"}},"required":["action"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"Get recipient","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":false},"patch":{"operationId":"updateBiddingRecipient","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"header","name":"x-bid-invitation-token","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"action":{"enum":["submit","decline"],"type":"string"},"bid":{"description":"Pricing and bidder-authored fields only","type":"object"},"request_key":{"description":"Required for new reviewed-package submissions; stable on retry","format":"uuid","type":"string"}},"required":["action"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"ok":{"enum":[true],"type":"boolean"}},"required":["ok"],"type":"object"}}},"description":"Submitted or declined response"},"403":{"description":"Invitation or recipient authority is not current"},"409":{"description":"Stale package, quote, or conflicting request key"},"422":{"description":"Invalid response or missing request key for reviewed-package submission"}},"summary":"Submit or decline a bid through a scoped invitation","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/bidding/recipient/{id}/addendum_acknowledgments":{"get":{"operationId":"listBiddingRecipientAddendumAcknowledgments","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"header","name":"x-bid-invitation-token","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":50,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"acknowledgments":{"items":{"$ref":"#/components/schemas/bidding_BidAddendumAcknowledgment"},"type":"array"},"addendum":{"oneOf":[{"$ref":"#/components/schemas/bidding_BidAddendumCurrent"},{"enum":[null],"nullable":true,"type":"string"}]},"total":{"minimum":0,"type":"integer"}},"required":["addendum","acknowledgments","total"],"type":"object"}}},"description":"Exact live recipient status and history; private no-store"},"403":{"description":"Invitation, user, release, or token authority is not current"},"422":{"description":"History page exceeds supported range"}},"summary":"Show current reviewed addendum and this recipient's retained acknowledgment history","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":true},"post":{"operationId":"createBiddingRecipientAddendumAcknowledgment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"header","name":"x-bid-invitation-token","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"release_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"release_version_id":{"minimum":1,"type":"integer"},"request_key":{"format":"uuid","type":"string"}},"required":["release_version_id","release_sha256","request_key"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bidding_BidAddendumAcknowledgment"}}},"description":"Immutable current-version acknowledgment or exact replay; private no-store"},"403":{"description":"Invitation, user, release, or token authority is not current"},"409":{"description":"Stale release or changed idempotency payload"},"413":{"description":"Acknowledgment body exceeds 4 KiB"},"422":{"description":"Invalid version, digest, or request key"}},"summary":"Acknowledge the exact current reviewed addendum before submitting a quote","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/bidding/recipient/{id}/submission_receipts":{"get":{"operationId":"listBiddingRecipientSubmissionReceipts","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"header","name":"x-bid-invitation-token","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":50,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"receipts":{"items":{"$ref":"#/components/schemas/bidding_BidSubmissionReceiptRecipient"},"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["receipts","total"],"type":"object"}}},"description":"This invitation's quote history under current recipient authority; private no-store"},"403":{"description":"Invitation, recipient, release, or Bidding authority is not current"},"422":{"description":"Receipt history page exceeds supported range"}},"summary":"List only this authenticated invitation's immutable quote revisions","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":true}},"/rest/v1.0/budget_line_items":{"post":{"operationId":"createBudgetLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"budget_line_item":{"properties":{"calculation_strategy":{"enum":["automatic","manual"],"type":"string"},"cost_code_id":{"type":"integer"},"line_item_type_id":{"type":"integer"},"original_budget_amount":{"format":"float","type":"number"},"quantity":{"format":"float","type":"number"},"unit_cost":{"format":"float","type":"number"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"}},"required":["cost_code_id","line_item_type_id"],"title":"Budget Line Item","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","budget_line_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"approved_budget_changes":{"format":"float","type":"number"},"budget_forecast":{"format":"float","type":"number"},"budget_modifications":{"format":"float","type":"number"},"calculation_strategy":{"type":"string"},"committed_costs":{"format":"float","type":"number"},"cost_code":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"currency_iso_code":{"type":"string"}},"type":"object"},"direct_costs":{"format":"float","type":"number"},"division":{"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"estimated_cost_at_completion":{"format":"float","type":"number"},"id":{"type":"integer"},"line_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"original_budget_amount":{"format":"float","type":"number"},"pending_budget_changes":{"format":"float","type":"number"},"pending_cost_changes":{"format":"float","type":"number"},"projected_budget":{"format":"float","type":"number"},"projected_costs":{"format":"float","type":"number"},"projected_over_under":{"format":"float","type":"number"},"quantity":{"format":"float","type":"number"},"revised_budget":{"format":"float","type":"number"},"unit_cost":{"format":"float","type":"number"},"uom":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"nullable":false,"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Budget Line Item","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/budget_line_items/bulk_create":{"post":{"description":"Create up to 100 budget line items in one project. Each item is the `budget_line_item` body of POST /budget_line_items and runs through the same checks. Items run in order; a failing item does not roll back the others. Successful items have status 201. With Idempotency-Key, a retried batch replays the first response; retry only the failed items with a new key.","operationId":"createBudgetLineItemsBulkCreate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"budget_line_items":{"items":{"properties":{"calculation_strategy":{"enum":["automatic","manual"],"type":"string"},"cost_code_id":{"type":"integer"},"line_item_type_id":{"type":"integer"},"original_budget_amount":{"format":"float","type":"number"},"quantity":{"format":"float","type":"number"},"unit_cost":{"format":"float","type":"number"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"}},"required":["cost_code_id","line_item_type_id"],"title":"Budget Line Item","type":"object"},"maxItems":100,"minItems":1,"type":"array"},"project_id":{"type":"integer"}},"required":["project_id","budget_line_items"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/budget_BudgetLineItem"}],"description":"The record as the single-record route returns it (successful items only)."},"errors":{"description":"Failed items only: a message list or a field -> messages map (422).","oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]},"id":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]},"index":{"description":"Position of the item in the request array.","type":"integer"},"status":{"description":"HTTP-style status of this item: 200/201 on success, 4xx on failure.","type":"integer"}},"required":["index","status"],"type":"object"},"type":"array"},"summary":{"properties":{"failed":{"type":"integer"},"succeeded":{"type":"integer"},"total":{"type":"integer"}},"required":["total","succeeded","failed"],"type":"object"}},"required":["results","summary"],"type":"object"}}},"description":"Per-item results."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Malformed envelope."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"More than 100 items."}},"summary":"Bulk create budget line items","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/budget_line_items/bulk_update":{"patch":{"description":"Update up to 100 budget line items. Each item carries the record `id` and the fields to change, and runs through the same checks as PATCH /budget_line_items/{id}. Items run in order; a failing item does not roll back the others. With Idempotency-Key, a retried batch replays the first response; retry only the failed items with a new key.","operationId":"updateBudgetLineItemsBulkUpdate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"budget_line_items":{"items":{"properties":{"calculation_strategy":{"enum":["automatic","manual"],"type":"string"},"cost_code_id":{"type":"integer"},"direct_costs":{"format":"float","type":"number"},"id":{"description":"The record to update.","type":"integer"},"line_item_type_id":{"type":"integer"},"original_budget_amount":{"format":"float","type":"number"},"quantity":{"format":"float","type":"number"},"unit_cost":{"format":"float","type":"number"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"}},"required":["id"],"title":"Budget Line Item","type":"object"},"maxItems":100,"minItems":1,"type":"array"},"project_id":{"type":"integer"}},"required":["project_id","budget_line_items"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/budget_BudgetLineItem"}],"description":"The record as the single-record route returns it (successful items only)."},"errors":{"description":"Failed items only: a message list or a field -> messages map (422).","oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]},"id":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]},"index":{"description":"Position of the item in the request array.","type":"integer"},"status":{"description":"HTTP-style status of this item: 200/201 on success, 4xx on failure.","type":"integer"}},"required":["index","status"],"type":"object"},"type":"array"},"summary":{"properties":{"failed":{"type":"integer"},"succeeded":{"type":"integer"},"total":{"type":"integer"}},"required":["total","succeeded","failed"],"type":"object"}},"required":["results","summary"],"type":"object"}}},"description":"Per-item results."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Malformed envelope."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"More than 100 items."}},"summary":"Bulk update budget line items","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/budget_line_items/{id}":{"get":{"operationId":"getBudgetLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"approved_budget_changes":{"format":"float","type":"number"},"budget_forecast":{"format":"float","type":"number"},"budget_modifications":{"format":"float","type":"number"},"calculation_strategy":{"type":"string"},"committed_costs":{"format":"float","type":"number"},"cost_code":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"currency_iso_code":{"type":"string"}},"type":"object"},"direct_costs":{"format":"float","type":"number"},"division":{"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"estimated_cost_at_completion":{"format":"float","type":"number"},"id":{"type":"integer"},"line_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"original_budget_amount":{"format":"float","type":"number"},"pending_budget_changes":{"format":"float","type":"number"},"pending_cost_changes":{"format":"float","type":"number"},"projected_budget":{"format":"float","type":"number"},"projected_costs":{"format":"float","type":"number"},"projected_over_under":{"format":"float","type":"number"},"quantity":{"format":"float","type":"number"},"revised_budget":{"format":"float","type":"number"},"unit_cost":{"format":"float","type":"number"},"uom":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Budget Line Item","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":false},"patch":{"operationId":"updateBudgetLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"budget_line_item":{"properties":{"calculation_strategy":{"enum":["automatic","manual"],"type":"string"},"cost_code_id":{"type":"integer"},"direct_costs":{"format":"float","type":"number"},"line_item_type_id":{"type":"integer"},"original_budget_amount":{"format":"float","type":"number"},"quantity":{"format":"float","type":"number"},"unit_cost":{"format":"float","type":"number"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"}},"title":"Budget Line Item","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","budget_line_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"approved_budget_changes":{"format":"float","type":"number"},"budget_forecast":{"format":"float","type":"number"},"budget_modifications":{"format":"float","type":"number"},"calculation_strategy":{"type":"string"},"committed_costs":{"format":"float","type":"number"},"cost_code":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"currency_iso_code":{"type":"string"}},"type":"object"},"direct_costs":{"format":"float","type":"number"},"division":{"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"estimated_cost_at_completion":{"format":"float","type":"number"},"id":{"type":"integer"},"line_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"original_budget_amount":{"format":"float","type":"number"},"pending_budget_changes":{"format":"float","type":"number"},"pending_cost_changes":{"format":"float","type":"number"},"projected_budget":{"format":"float","type":"number"},"projected_costs":{"format":"float","type":"number"},"projected_over_under":{"format":"float","type":"number"},"quantity":{"format":"float","type":"number"},"revised_budget":{"format":"float","type":"number"},"unit_cost":{"format":"float","type":"number"},"uom":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"nullable":false,"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Budget Line Item","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/budget_line_items/{id}/forecast":{"patch":{"description":"Requires budget:write and current project edit permission. Company is derived from authentication; path, query or body project must be authorized. Project is supplied in the JSON body. Locked original budgets reject forecast edits with 422. Null clears the override.","operationId":"forecastBudgetLineItem","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/budget_ForecastUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/budget_ForecastUpdateResult"}}},"description":"Successful response"},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Current actor or token permission denied"},"404":{"description":"Resource not found in authorized project"},"409":{"description":"Reserved or inconsistent change-event projection"},"422":{"description":"Validation or locked-budget constraint"}},"summary":"Set or clear manual forecast","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/budget_view_snapshots":{"get":{"operationId":"listBudgetViewSnapshots","parameters":[{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"links":{"properties":{"detail_rows":{"type":"string"},"summary_rows":{"type":"string"}},"type":"object"},"name":{"type":"string"},"snapshot_type":{"enum":["ad_hoc","project_status_snapshot"],"type":"string"}},"required":["id","name","created_at","links"],"type":"object"},"type":"array"}}}}},"summary":"List Budget View Snapshots","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":false},"post":{"operationId":"createBudgetViewSnapshot","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"budget_view_id":{"type":"integer"},"name":{"type":"string"},"project_id":{"type":"integer"}},"required":["project_id","name"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"links":{"properties":{"detail_rows":{"type":"string"},"summary_rows":{"type":"string"}},"type":"object"},"name":{"type":"string"},"snapshot_type":{"enum":["ad_hoc","project_status_snapshot"],"type":"string"}},"required":["id","name","created_at","links"],"type":"object"}}}}},"summary":"Create Budget View Snapshot","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/budget_view_snapshots/{budget_view_snapshot_id}":{"get":{"operationId":"getBudgetViewSnapshot","parameters":[{"in":"path","name":"budget_view_snapshot_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"links":{"properties":{"detail_rows":{"type":"string"},"summary_rows":{"type":"string"}},"type":"object"},"name":{"type":"string"},"snapshot_type":{"enum":["ad_hoc","project_status_snapshot"],"type":"string"}},"required":["id","name","created_at","links"],"type":"object"}}}}},"summary":"Show Budget View Snapshot","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/budget_view_snapshots/{budget_view_snapshot_id}/captured":{"get":{"description":"Returns retained labels, stored values and summed totals without querying current cost-code labels or recomputing the budget. Legacy snapshots have null captured labels. This endpoint is not paginated; large snapshots may exceed connector response limits. Use detail_rows for paginated grids.","operationId":"listBudgetViewSnapshotCaptured","parameters":[{"in":"path","name":"budget_view_snapshot_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project whose current budget-view permission is checked; the snapshot must belong to this project.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/budget_CapturedSnapshot"}}},"description":"Captured budget evidence."},"400":{"description":"Missing or invalid project or snapshot ID."},"401":{"description":"Authentication required."},"403":{"description":"Token scope, project membership, or budget permission denied."},"404":{"description":"Snapshot does not exist in the authorized project."},"409":{"description":"A retained line has inconsistent company/project identity or a non-finite captured amount."},"429":{"description":"Rate limit exceeded."}},"summary":"Read captured budget snapshot evidence","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/budget_view_snapshots/{budget_view_snapshot_id}/detail_rows":{"get":{"description":"Reads stored values and prefers captured labels, with current cost-code/division references as fallback. Filters by ID and budgeted state; name filters are not implemented for snapshot rows. Requires budget:read and current project budget-view permission.","operationId":"listBudgetViewSnapshotDetailRows","parameters":[{"in":"path","name":"budget_view_snapshot_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project whose current budget-view permission is checked; the snapshot must belong to this project.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Repeat this query key for multiple values; comma-separated values are also accepted.","explode":true,"in":"query","name":"cost_code_id[]","schema":{"items":{"minimum":1,"type":"integer"},"type":"array"},"style":"form"},{"description":"Repeat this query key for multiple values; comma-separated values are also accepted.","explode":true,"in":"query","name":"root_cost_code_id[]","schema":{"items":{"minimum":1,"type":"integer"},"type":"array"},"style":"form"},{"description":"Repeat this query key for multiple values; comma-separated values are also accepted.","explode":true,"in":"query","name":"category_id[]","schema":{"items":{"minimum":1,"type":"integer"},"type":"array"},"style":"form"},{"description":"Repeat this query key for multiple values; comma-separated values are also accepted.","explode":true,"in":"query","name":"budget_line_item_id[]","schema":{"items":{"minimum":1,"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"budget_row_type","schema":{"default":"budgeted","enum":["budgeted","unbudgeted","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/budget_SnapshotDetailRow"},"type":"array"}}},"description":"Captured budget evidence.","headers":{"Link":{"description":"First, previous, next and last page links.","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size.","schema":{"type":"integer"}},"Total":{"description":"Total matching rows before page slicing.","schema":{"type":"integer"}}}},"400":{"description":"Missing or invalid project or snapshot ID."},"401":{"description":"Authentication required."},"403":{"description":"Token scope, project membership, or budget permission denied."},"404":{"description":"Snapshot does not exist in the authorized project."},"429":{"description":"Rate limit exceeded."}},"summary":"List captured budget snapshot detail rows","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":true}},"/rest/v1.0/budget_view_snapshots/{budget_view_snapshot_id}/export":{"get":{"description":"Requires the `view` permission on the project's budget tool. A scoped API token needs `budget:read`.","operationId":"listBudgetViewSnapshotExport","parameters":[{"in":"path","name":"budget_view_snapshot_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Export budget view snapshot","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/budget_view_snapshots/{budget_view_snapshot_id}/summary_rows":{"get":{"description":"Aggregates frozen stored values by group; group labels may use current project/cost-code references. This endpoint accepts group_by and pagination, not detail-row filters. Requires budget:read and current project budget-view permission.","operationId":"listBudgetViewSnapshotSummaryRows","parameters":[{"in":"path","name":"budget_view_snapshot_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project whose current budget-view permission is checked; the snapshot must belong to this project.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"group_by","schema":{"default":"cost_code","enum":["project","biller","category","cost_code","root_cost_code","cost_code_name","root_cost_code_name"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/budget_SnapshotSummaryRow"},"type":"array"}}},"description":"Captured budget evidence.","headers":{"Link":{"description":"First, previous, next and last page links.","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size.","schema":{"type":"integer"}},"Total":{"description":"Total matching rows before page slicing.","schema":{"type":"integer"}}}},"400":{"description":"Missing or invalid project or snapshot ID."},"401":{"description":"Authentication required."},"403":{"description":"Token scope, project membership, or budget permission denied."},"404":{"description":"Snapshot does not exist in the authorized project."},"429":{"description":"Rate limit exceeded."}},"summary":"List captured budget snapshot summary rows","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":true}},"/rest/v1.0/budget_view_snapshots/{budget_view_snapshot_id}/variance":{"get":{"operationId":"listBudgetViewSnapshotVariance","parameters":[{"in":"path","name":"budget_view_snapshot_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"currency_configuration":{"type":"object"},"lines":{"items":{"properties":{"budget_line_item_id":{"type":"integer"},"cost_code":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"current":{"properties":{"approved_budget_changes":{"type":"string"},"budget_modifications":{"type":"string"},"committed_costs":{"type":"string"},"direct_costs":{"type":"string"},"estimated_cost_at_completion":{"type":"string"},"forecast_to_complete":{"type":"string"},"original_budget_amount":{"type":"string"},"pending_budget_changes":{"type":"string"},"projected_budget":{"type":"string"},"projected_costs":{"type":"string"},"projected_over_under":{"type":"string"},"revised_budget":{"type":"string"}},"type":"object"},"current_present":{"type":"boolean"},"delta":{"properties":{"approved_budget_changes":{"type":"string"},"budget_modifications":{"type":"string"},"committed_costs":{"type":"string"},"direct_costs":{"type":"string"},"estimated_cost_at_completion":{"type":"string"},"forecast_to_complete":{"type":"string"},"original_budget_amount":{"type":"string"},"pending_budget_changes":{"type":"string"},"projected_budget":{"type":"string"},"projected_costs":{"type":"string"},"projected_over_under":{"type":"string"},"revised_budget":{"type":"string"}},"type":"object"},"line_item_type":{"nullable":true,"type":"string"},"snapshot":{"properties":{"approved_budget_changes":{"type":"string"},"budget_modifications":{"type":"string"},"committed_costs":{"type":"string"},"direct_costs":{"type":"string"},"estimated_cost_at_completion":{"type":"string"},"forecast_to_complete":{"type":"string"},"original_budget_amount":{"type":"string"},"pending_budget_changes":{"type":"string"},"projected_budget":{"type":"string"},"projected_costs":{"type":"string"},"projected_over_under":{"type":"string"},"revised_budget":{"type":"string"}},"type":"object"},"snapshot_present":{"type":"boolean"}},"required":["budget_line_item_id","current","snapshot","delta"],"type":"object"},"type":"array"},"snapshot":{"properties":{"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"links":{"properties":{"detail_rows":{"type":"string"},"summary_rows":{"type":"string"}},"type":"object"},"name":{"type":"string"},"snapshot_type":{"enum":["ad_hoc","project_status_snapshot"],"type":"string"}},"required":["id","name","created_at","links"],"type":"object"},"totals":{"properties":{"current":{"properties":{"approved_budget_changes":{"type":"string"},"budget_modifications":{"type":"string"},"committed_costs":{"type":"string"},"direct_costs":{"type":"string"},"estimated_cost_at_completion":{"type":"string"},"forecast_to_complete":{"type":"string"},"original_budget_amount":{"type":"string"},"pending_budget_changes":{"type":"string"},"projected_budget":{"type":"string"},"projected_costs":{"type":"string"},"projected_over_under":{"type":"string"},"revised_budget":{"type":"string"}},"type":"object"},"delta":{"properties":{"approved_budget_changes":{"type":"string"},"budget_modifications":{"type":"string"},"committed_costs":{"type":"string"},"direct_costs":{"type":"string"},"estimated_cost_at_completion":{"type":"string"},"forecast_to_complete":{"type":"string"},"original_budget_amount":{"type":"string"},"pending_budget_changes":{"type":"string"},"projected_budget":{"type":"string"},"projected_costs":{"type":"string"},"projected_over_under":{"type":"string"},"revised_budget":{"type":"string"}},"type":"object"},"snapshot":{"properties":{"approved_budget_changes":{"type":"string"},"budget_modifications":{"type":"string"},"committed_costs":{"type":"string"},"direct_costs":{"type":"string"},"estimated_cost_at_completion":{"type":"string"},"forecast_to_complete":{"type":"string"},"original_budget_amount":{"type":"string"},"pending_budget_changes":{"type":"string"},"projected_budget":{"type":"string"},"projected_costs":{"type":"string"},"projected_over_under":{"type":"string"},"revised_budget":{"type":"string"}},"type":"object"}},"required":["current","snapshot","delta"],"type":"object"}},"required":["snapshot","lines","totals"],"type":"object"}}}}},"summary":"Budget Snapshot Variance Report","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/budget_views":{"get":{"operationId":"listBudgetViews","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"sort","schema":{"enum":["created_at"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_at":{"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"links":{"properties":{"detail_rows":{"type":"string"},"summary_rows":{"type":"string"}},"type":"object"},"name":{"type":"string"},"role":{"type":"string"},"updated_at":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Budget Views","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":true}},"/rest/v1.0/budget_views/{budget_view_id}/detail_rows":{"get":{"description":"Requires budget:read and current project view permission. Company is derived from authentication; path, query or body project must be authorized. Total, Per-Page and Link headers paginate the flat array. Filters accept repeated bracketed keys or comma-separated values; names match case-insensitively. Includes synthetic unbudgeted rows when requested.","operationId":"listBudgetViewDetailRows","parameters":[{"in":"path","name":"budget_view_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"budget_row_type","required":false,"schema":{"default":"budgeted","enum":["budgeted","unbudgeted","all"],"type":"string"}},{"explode":true,"in":"query","name":"cost_code_id[]","required":false,"schema":{"items":{"minimum":1,"type":"integer"},"type":"array"},"style":"form"},{"explode":true,"in":"query","name":"root_cost_code_id[]","required":false,"schema":{"items":{"minimum":1,"type":"integer"},"type":"array"},"style":"form"},{"explode":true,"in":"query","name":"category_id[]","required":false,"schema":{"items":{"minimum":1,"type":"integer"},"type":"array"},"style":"form"},{"explode":true,"in":"query","name":"budget_line_item_id[]","required":false,"schema":{"items":{"minimum":1,"type":"integer"},"type":"array"},"style":"form"},{"explode":true,"in":"query","name":"cost_code_name[]","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"explode":true,"in":"query","name":"root_cost_code_name[]","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/budget_Detail"},"type":"array"}}},"description":"Successful response","headers":{"Link":{"description":"Pagination navigation links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"string"}},"Total":{"description":"Total matching rows","schema":{"type":"string"}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Current actor or token permission denied"},"404":{"description":"Resource not found in authorized project"},"409":{"description":"Reserved or inconsistent change-event projection"},"422":{"description":"Validation or locked-budget constraint"}},"summary":"List live budget detail rows","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":true}},"/rest/v1.0/budget_views/{budget_view_id}/forecast":{"get":{"description":"Requires budget:read and current project view permission. Company is derived from authentication; path, query or body project must be authorized. Unpaginated grouped grid using configured view formulas. Large grids may exceed connector response limits. Negative synthetic IDs are strings. Read-only calculation does not persist forecasts.","operationId":"listBudgetViewForecast","parameters":[{"in":"path","name":"budget_view_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/budget_Forecast"}}},"description":"Successful response"},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Current actor or token permission denied"},"404":{"description":"Resource not found in authorized project"},"409":{"description":"Reserved or inconsistent change-event projection"},"422":{"description":"Validation or locked-budget constraint"}},"summary":"Read grouped budget forecast","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/budget_views/{budget_view_id}/summary_rows":{"get":{"deprecated":true,"operationId":"listBudgetViewSummaryRows","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"budget_view_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"biller[]","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"cost_code_id[]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"cost_code_name[]","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"root_cost_code_id[]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"root_cost_code_name[]","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"category_id[]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"budget_line_item_id[]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"group_by","schema":{"enum":["project","biller","category","cost_code","root_cost_code","cost_code_name","root_cost_code_name"],"type":"string"}},{"in":"query","name":"budget_row_type","required":false,"schema":{"enum":["budgeted","unbudgeted","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":true,"properties":{"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budget_forecast":{"properties":{"amount":{"format":"float","type":"string"}},"type":"object"},"budget_modifications":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"type":"string"}},"type":"object"},"id":{"type":"string"},"name":{"type":"string"},"original_budget_amount":{"format":"float","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"503":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"required":["code","message","details"],"type":"object"}},"required":["error"],"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Budget View Summary Rows","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":true}},"/rest/v1.0/change_event/statuses":{"get":{"operationId":"listChangeEventStatuses","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"default_status":{"type":"boolean"},"id":{"type":"integer"},"mapped_to_status":{"enum":["open","closed","void","pending"],"type":"string"},"name":{"type":"string"},"show_in_select":{"type":"boolean"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Change Event statuses","tags":["change_events"],"x-os-idempotent":false,"x-os-module":"change_events","x-os-paginated":true}},"/rest/v1.0/change_events":{"get":{"operationId":"listChangeEvents","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":true,"in":"query","name":"filters[change_event_status_id][]","required":false,"schema":{"items":{"type":"integer"},"type":"array"}},{"explode":true,"in":"query","name":"filters[change_order_change_reason_id][]","required":false,"schema":{"items":{"type":"integer"},"type":"array"}},{"explode":true,"in":"query","name":"filters[change_type_id][]","required":false,"schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[include_deleted]","required":false,"schema":{"enum":["only","with"],"type":"string"}},{"explode":true,"in":"query","name":"filters[origin_type][]","required":false,"schema":{"items":{"enum":["CommunicationThread","GenericToolItem","Meeting","Observations::Item","Rfi::Header","SiteInstruction"],"type":"string"},"type":"array"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"include_rfqs","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"alphanumeric_number":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"change_event_line_items":{"items":{"properties":{"biller":{"properties":{"guid":{"type":"string"},"id":{"type":"integer"},"model_name":{"type":"string"},"name":{"type":"string"}},"type":"object"},"biller_guid":{"type":"string"},"budget_code":{"properties":{"flat_code":{"nullable":false,"type":"string"},"id":{"nullable":false,"type":"integer"},"segment_items":{"items":{"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"is_parent":{"type":"boolean"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"path_code":{"type":"string"},"path_codes":{"items":{"type":"string"},"type":"array"},"path_ids":{"items":{"type":"integer"},"type":"array"},"path_names":{"items":{"type":"string"},"type":"array"},"segment":{"properties":{"created_at":{"format":"date-time","type":"string"},"delimiter":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"project_can_delete_origin_company":{"type":"boolean"},"project_can_modify_origin_project":{"type":"boolean"},"required":{"type":"boolean"},"segment_items_count":{"type":"integer"},"structure":{"enum":["tiered","flat"],"type":"string"},"type":{"enum":["cost_code","line_item_type","sub_job","custom","attribute"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_pattern_id":{"type":"integer"}},"type":"object"},"status":{"enum":["active","inactive"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"budget_mod":{"properties":{"created_at":{"format":"date-time","type":"string"},"from_budget_line_item_id":{"type":"integer"},"from_budget_line_item_name":{"type":"string"},"notes":{"type":"string"},"to_budget_line_item_id":{"type":"integer"},"to_budget_line_item_name":{"type":"string"},"transfer_amount":{"format":"float","type":"string"}},"type":"object"},"budget_mod_amount":{"type":"string"},"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"number":{"type":"string"},"title":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_code_biller_name":{"type":"string"},"cost_code_id":{"type":"integer"},"cost_code_is_budgeted":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"deletable":{"type":"boolean"},"editable":{"type":"boolean"},"estimated_cost_amount":{"type":"string"},"estimated_cost_calculation_strategy":{"type":"string"},"estimated_cost_quantity":{"format":"float","type":"number"},"estimated_cost_unit_cost":{"format":"float","type":"number"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"line_item_type_id":{"type":"integer"},"links":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"type":"string"},"edit":{"type":"string"},"prime_pco_cost":{"type":"string"},"rfq_amount":{"type":"string"},"rom":{"type":"string"},"view":{"type":"string"}},"type":"object"},"number":{"type":"string"},"prime_pco_cost":{"format":"float","type":"string"},"proposed_contract_id":{"type":"integer"},"proposed_vendor_id":{"type":"integer"},"request_for_quote_id":{"type":"integer"},"rfq_amount":{"format":"float","type":"string"},"rfq_sent":{"type":"string"},"rom":{"type":"integer"},"status":{"type":"string"},"statuses":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_contract_tooltip":{"type":"string"},"commitment_pco_cost":{"type":"string"},"commitment_pco_tooltip":{"type":"string"},"contract":{"type":"string"},"prime_pco_cost":{"type":"string"},"prime_pco_tooltip":{"type":"string"},"rfq_amount":{"type":"string"},"rfq_tooltip":{"type":"string"}},"type":"object"},"title":{"type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"change_event_origin_id":{"type":"integer"},"change_event_origin_type":{"type":"string"},"change_event_status":{"properties":{"id":{"type":"integer"},"mapped_to_status":{"type":"string"},"name":{"type":"string"},"show_in_select":{"type":"boolean"}},"type":"object"},"change_order_change_reason":{"properties":{"change_reason":{"type":"string"},"company_id":{"type":"integer"},"id":{"type":"integer"},"show_in_select":{"type":"boolean"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"event_scope":{"enum":["tbd","in_scope","out_of_scope"],"type":"string"},"event_type":{"type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"project_id":{"type":"integer"},"rfi":{"properties":{"due_date":{"format":"date-time","type":"string"},"full_number":{"type":"string"},"full_number_with_revision":{"type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"revision":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"}},"type":"object"},"rfqs":{"items":{"properties":{"assigned":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_contract_id":{"type":"integer"},"commitment_potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"estimated_amount":{"format":"float","type":"number"},"estimated_schedule_impact":{"type":"integer"},"estimated_status":{"enum":["rom","final"],"type":"string"},"id":{"type":"integer"},"intent_to_quote":{"type":"boolean"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"original_quote":{"format":"float","type":"number"},"position":{"type":"integer"},"potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"quotes":{"items":{"properties":{"attachments_count":{"type":"integer"},"commitment_quote_number":{"type":"string"},"cost":{"format":"float","type":"number"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"import_origin_id":{"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"request_for_quote_id":{"type":"integer"},"schedule_impact":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Quote","type":"object"},"type":"array"},"responses":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Response","type":"object"},"type":"array"},"specification_section":{"properties":{"spec_section_description":{"type":"string"},"spec_section_number":{"type":"string"},"specification_section_id":{"type":"integer"}},"type":"object"},"status":{"enum":["out_for_pricing","revise_and_resubmit","under_review","pending_final_approval","closed","withdrawn"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ","type":"object"},"type":"array"},"status":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Change Events","tags":["change_events"],"x-os-idempotent":false,"x-os-module":"change_events","x-os-paginated":true},"post":{"operationId":"createChangeEvent","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"change_event":{"properties":{"attachments_by_drawing_revision":{"items":{"properties":{"id":{"type":"integer"}},"type":"object"},"type":"array"},"attachments_by_file_version":{"items":{"properties":{"id":{"type":"integer"}},"type":"object"},"type":"array"},"attachments_by_form":{"items":{"properties":{"id":{"type":"integer"}},"type":"object"},"type":"array"},"attachments_by_image":{"items":{"properties":{"id":{"type":"integer"}},"type":"object"},"type":"array"},"attachments_by_uuid":{"items":{"properties":{"upload_uuid":{"type":"string"}},"type":"object"},"type":"array"},"change_event_line_items_attributes":{"items":{"properties":{"budget_code":{"nullable":true,"properties":{"id":{"type":"integer"}},"type":"object"},"commitment_contract_line_item_id":{"type":"integer"},"cost_code_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"estimated_cost_amount":{"format":"float","type":"number"},"estimated_cost_calculation_strategy":{"enum":["automatic","manual"],"type":"string"},"estimated_cost_quantity":{"format":"float","type":"number"},"estimated_cost_unit_cost":{"format":"float","type":"number"},"id":{"type":"integer"},"line_item_type_id":{"type":"integer"},"proposed_contract_id":{"type":"integer"},"proposed_vendor_id":{"type":"integer"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Change Event Line Item","type":"object"},"type":"array"},"change_event_status_id":{"type":"integer"},"change_order_change_reason_id":{"type":"integer"},"event_scope":{"enum":["tbd","in_scope","out_of_scope"],"type":"string"},"event_type":{"enum":["tbd","allowance","contingency","owner_change","transfer"],"type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"rfi_id":{"type":"integer"},"status":{"enum":["open","closed"],"type":"string"},"title":{"type":"string"}},"required":["change_event_status_id","event_scope"],"title":"Change Event","type":"object"},"change_event_origin_id":{"type":"integer"},"change_event_origin_type":{"type":"string"},"origin_global_id":{"type":"string"}},"required":["change_event"]}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"alphanumeric_number":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"change_event_line_items":{"items":{"properties":{"biller":{"properties":{"guid":{"type":"string"},"id":{"type":"integer"},"model_name":{"type":"string"},"name":{"type":"string"}},"type":"object"},"biller_guid":{"type":"string"},"budget_code":{"properties":{"flat_code":{"nullable":false,"type":"string"},"id":{"nullable":false,"type":"integer"},"segment_items":{"items":{"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"is_parent":{"type":"boolean"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"path_code":{"type":"string"},"path_codes":{"items":{"type":"string"},"type":"array"},"path_ids":{"items":{"type":"integer"},"type":"array"},"path_names":{"items":{"type":"string"},"type":"array"},"segment":{"properties":{"created_at":{"format":"date-time","type":"string"},"delimiter":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"project_can_delete_origin_company":{"type":"boolean"},"project_can_modify_origin_project":{"type":"boolean"},"required":{"type":"boolean"},"segment_items_count":{"type":"integer"},"structure":{"enum":["tiered","flat"],"type":"string"},"type":{"enum":["cost_code","line_item_type","sub_job","custom","attribute"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_pattern_id":{"type":"integer"}},"type":"object"},"status":{"enum":["active","inactive"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"budget_mod":{"properties":{"created_at":{"format":"date-time","type":"string"},"from_budget_line_item_id":{"type":"integer"},"from_budget_line_item_name":{"type":"string"},"notes":{"type":"string"},"to_budget_line_item_id":{"type":"integer"},"to_budget_line_item_name":{"type":"string"},"transfer_amount":{"format":"float","type":"string"}},"type":"object"},"budget_mod_amount":{"type":"string"},"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"number":{"type":"string"},"title":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_code_biller_name":{"type":"string"},"cost_code_id":{"type":"integer"},"cost_code_is_budgeted":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"deletable":{"type":"boolean"},"editable":{"type":"boolean"},"estimated_cost_amount":{"type":"string"},"estimated_cost_calculation_strategy":{"type":"string"},"estimated_cost_quantity":{"format":"float","type":"number"},"estimated_cost_unit_cost":{"format":"float","type":"number"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"line_item_type_id":{"type":"integer"},"links":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"type":"string"},"edit":{"type":"string"},"prime_pco_cost":{"type":"string"},"rfq_amount":{"type":"string"},"rom":{"type":"string"},"view":{"type":"string"}},"type":"object"},"number":{"type":"string"},"prime_pco_cost":{"format":"float","type":"string"},"proposed_contract_id":{"type":"integer"},"proposed_vendor_id":{"type":"integer"},"request_for_quote_id":{"type":"integer"},"rfq_amount":{"format":"float","type":"string"},"rfq_sent":{"type":"string"},"rom":{"type":"integer"},"status":{"type":"string"},"statuses":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_contract_tooltip":{"type":"string"},"commitment_pco_cost":{"type":"string"},"commitment_pco_tooltip":{"type":"string"},"contract":{"type":"string"},"prime_pco_cost":{"type":"string"},"prime_pco_tooltip":{"type":"string"},"rfq_amount":{"type":"string"},"rfq_tooltip":{"type":"string"}},"type":"object"},"title":{"type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"change_event_origin_id":{"type":"integer"},"change_event_origin_type":{"type":"string"},"change_event_status":{"properties":{"id":{"type":"integer"},"mapped_to_status":{"type":"string"},"name":{"type":"string"},"show_in_select":{"type":"boolean"}},"type":"object"},"change_order_change_reason":{"properties":{"change_reason":{"type":"string"},"company_id":{"type":"integer"},"id":{"type":"integer"},"show_in_select":{"type":"boolean"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"event_scope":{"enum":["tbd","in_scope","out_of_scope"],"type":"string"},"event_type":{"type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"project_id":{"type":"integer"},"rfi":{"properties":{"due_date":{"format":"date-time","type":"string"},"full_number":{"type":"string"},"full_number_with_revision":{"type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"revision":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"}},"type":"object"},"rfqs":{"items":{"properties":{"assigned":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_contract_id":{"type":"integer"},"commitment_potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"estimated_amount":{"format":"float","type":"number"},"estimated_schedule_impact":{"type":"integer"},"estimated_status":{"enum":["rom","final"],"type":"string"},"id":{"type":"integer"},"intent_to_quote":{"type":"boolean"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"original_quote":{"format":"float","type":"number"},"position":{"type":"integer"},"potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"quotes":{"items":{"properties":{"attachments_count":{"type":"integer"},"commitment_quote_number":{"type":"string"},"cost":{"format":"float","type":"number"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"import_origin_id":{"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"request_for_quote_id":{"type":"integer"},"schedule_impact":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Quote","type":"object"},"type":"array"},"responses":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Response","type":"object"},"type":"array"},"specification_section":{"properties":{"spec_section_description":{"type":"string"},"spec_section_number":{"type":"string"},"specification_section_id":{"type":"integer"}},"type":"object"},"status":{"enum":["out_for_pricing","revise_and_resubmit","under_review","pending_final_approval","closed","withdrawn"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ","type":"object"},"type":"array"},"status":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Change Event","tags":["change_events"],"x-os-idempotent":true,"x-os-module":"change_events","x-os-paginated":false}},"/rest/v1.0/change_events/{id}":{"delete":{"operationId":"deleteChangeEvent","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete change event","tags":["change_events"],"x-os-idempotent":false,"x-os-module":"change_events","x-os-paginated":false},"get":{"operationId":"getChangeEvent","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"alphanumeric_number":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"change_event_line_items":{"items":{"properties":{"biller":{"properties":{"guid":{"type":"string"},"id":{"type":"integer"},"model_name":{"type":"string"},"name":{"type":"string"}},"type":"object"},"biller_guid":{"type":"string"},"budget_code":{"properties":{"flat_code":{"nullable":false,"type":"string"},"id":{"nullable":false,"type":"integer"},"segment_items":{"items":{"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"is_parent":{"type":"boolean"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"path_code":{"type":"string"},"path_codes":{"items":{"type":"string"},"type":"array"},"path_ids":{"items":{"type":"integer"},"type":"array"},"path_names":{"items":{"type":"string"},"type":"array"},"segment":{"properties":{"created_at":{"format":"date-time","type":"string"},"delimiter":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"project_can_delete_origin_company":{"type":"boolean"},"project_can_modify_origin_project":{"type":"boolean"},"required":{"type":"boolean"},"segment_items_count":{"type":"integer"},"structure":{"enum":["tiered","flat"],"type":"string"},"type":{"enum":["cost_code","line_item_type","sub_job","custom","attribute"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_pattern_id":{"type":"integer"}},"type":"object"},"status":{"enum":["active","inactive"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"budget_mod":{"properties":{"created_at":{"format":"date-time","type":"string"},"from_budget_line_item_id":{"type":"integer"},"from_budget_line_item_name":{"type":"string"},"notes":{"type":"string"},"to_budget_line_item_id":{"type":"integer"},"to_budget_line_item_name":{"type":"string"},"transfer_amount":{"format":"float","type":"string"}},"type":"object"},"budget_mod_amount":{"type":"string"},"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"number":{"type":"string"},"title":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_code_biller_name":{"type":"string"},"cost_code_id":{"type":"integer"},"cost_code_is_budgeted":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"deletable":{"type":"boolean"},"editable":{"type":"boolean"},"estimated_cost_amount":{"type":"string"},"estimated_cost_calculation_strategy":{"type":"string"},"estimated_cost_quantity":{"format":"float","type":"number"},"estimated_cost_unit_cost":{"format":"float","type":"number"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"line_item_type_id":{"type":"integer"},"links":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"type":"string"},"edit":{"type":"string"},"prime_pco_cost":{"type":"string"},"rfq_amount":{"type":"string"},"rom":{"type":"string"},"view":{"type":"string"}},"type":"object"},"number":{"type":"string"},"prime_pco_cost":{"format":"float","type":"string"},"proposed_contract_id":{"type":"integer"},"proposed_vendor_id":{"type":"integer"},"request_for_quote_id":{"type":"integer"},"rfq_amount":{"format":"float","type":"string"},"rfq_sent":{"type":"string"},"rom":{"type":"integer"},"status":{"type":"string"},"statuses":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_contract_tooltip":{"type":"string"},"commitment_pco_cost":{"type":"string"},"commitment_pco_tooltip":{"type":"string"},"contract":{"type":"string"},"prime_pco_cost":{"type":"string"},"prime_pco_tooltip":{"type":"string"},"rfq_amount":{"type":"string"},"rfq_tooltip":{"type":"string"}},"type":"object"},"title":{"type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"change_event_origin_id":{"type":"integer"},"change_event_origin_type":{"type":"string"},"change_event_status":{"properties":{"id":{"type":"integer"},"mapped_to_status":{"type":"string"},"name":{"type":"string"},"show_in_select":{"type":"boolean"}},"type":"object"},"change_order_change_reason":{"properties":{"change_reason":{"type":"string"},"company_id":{"type":"integer"},"id":{"type":"integer"},"show_in_select":{"type":"boolean"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"event_scope":{"enum":["tbd","in_scope","out_of_scope"],"type":"string"},"event_type":{"type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"project_id":{"type":"integer"},"rfi":{"properties":{"due_date":{"format":"date-time","type":"string"},"full_number":{"type":"string"},"full_number_with_revision":{"type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"revision":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"}},"type":"object"},"rfqs":{"items":{"properties":{"assigned":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_contract_id":{"type":"integer"},"commitment_potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"estimated_amount":{"format":"float","type":"number"},"estimated_schedule_impact":{"type":"integer"},"estimated_status":{"enum":["rom","final"],"type":"string"},"id":{"type":"integer"},"intent_to_quote":{"type":"boolean"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"original_quote":{"format":"float","type":"number"},"position":{"type":"integer"},"potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"quotes":{"items":{"properties":{"attachments_count":{"type":"integer"},"commitment_quote_number":{"type":"string"},"cost":{"format":"float","type":"number"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"import_origin_id":{"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"request_for_quote_id":{"type":"integer"},"schedule_impact":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Quote","type":"object"},"type":"array"},"responses":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Response","type":"object"},"type":"array"},"specification_section":{"properties":{"spec_section_description":{"type":"string"},"spec_section_number":{"type":"string"},"specification_section_id":{"type":"integer"}},"type":"object"},"status":{"enum":["out_for_pricing","revise_and_resubmit","under_review","pending_final_approval","closed","withdrawn"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ","type":"object"},"type":"array"},"status":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Change Event","tags":["change_events"],"x-os-idempotent":false,"x-os-module":"change_events","x-os-paginated":false},"patch":{"operationId":"updateChangeEvent","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"change_event":{"properties":{"attachments_by_drawing_revision":{"items":{"properties":{"id":{"type":"integer"}},"type":"object"},"type":"array"},"attachments_by_file_version":{"items":{"properties":{"id":{"type":"integer"}},"type":"object"},"type":"array"},"attachments_by_form":{"items":{"properties":{"id":{"type":"integer"}},"type":"object"},"type":"array"},"attachments_by_image":{"items":{"properties":{"id":{"type":"integer"}},"type":"object"},"type":"array"},"attachments_by_uuid":{"items":{"properties":{"upload_uuid":{"type":"string"}},"type":"object"},"type":"array"},"change_event_line_items_attributes":{"items":{"properties":{"commitment_contract_line_item_id":{"type":"integer"},"cost_code_id":{"type":"integer"},"estimated_cost_amount":{"format":"float","type":"number"},"estimated_cost_calculation_strategy":{"enum":["automatic","manual"],"type":"string"},"estimated_cost_quantity":{"format":"float","type":"number"},"estimated_cost_unit_cost":{"format":"float","type":"number"},"id":{"type":"integer"},"line_item_type_id":{"type":"integer"},"proposed_contract_id":{"type":"integer"},"proposed_vendor_id":{"type":"integer"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"},"wbs_code_id":{"nullable":true,"properties":{"id":{"type":"integer"}},"type":"object"}},"title":"Change Event Line Item","type":"object"},"type":"array"},"change_event_status_id":{"type":"integer"},"change_order_change_reason_id":{"type":"integer"},"event_scope":{"enum":["tbd","in_scope","out_of_scope"],"type":"string"},"event_type":{"enum":["tbd","allowance","contingency","owner_change","transfer"],"type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"rfi_id":{"type":"integer"},"status":{"enum":["open","closed"],"type":"string"},"title":{"type":"string"}},"title":"Change Event","type":"object"},"change_event_origin_id":{"type":"integer"},"change_event_origin_type":{"type":"string"},"origin_global_id":{"type":"string"},"project_id":{"type":"integer"}},"required":["change_event","project_id"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"alphanumeric_number":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"change_event_line_items":{"items":{"properties":{"biller":{"properties":{"guid":{"type":"string"},"id":{"type":"integer"},"model_name":{"type":"string"},"name":{"type":"string"}},"type":"object"},"biller_guid":{"type":"string"},"budget_code":{"properties":{"flat_code":{"nullable":false,"type":"string"},"id":{"nullable":false,"type":"integer"},"segment_items":{"items":{"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"is_parent":{"type":"boolean"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"path_code":{"type":"string"},"path_codes":{"items":{"type":"string"},"type":"array"},"path_ids":{"items":{"type":"integer"},"type":"array"},"path_names":{"items":{"type":"string"},"type":"array"},"segment":{"properties":{"created_at":{"format":"date-time","type":"string"},"delimiter":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"project_can_delete_origin_company":{"type":"boolean"},"project_can_modify_origin_project":{"type":"boolean"},"required":{"type":"boolean"},"segment_items_count":{"type":"integer"},"structure":{"enum":["tiered","flat"],"type":"string"},"type":{"enum":["cost_code","line_item_type","sub_job","custom","attribute"],"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_pattern_id":{"type":"integer"}},"type":"object"},"status":{"enum":["active","inactive"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"budget_mod":{"properties":{"created_at":{"format":"date-time","type":"string"},"from_budget_line_item_id":{"type":"integer"},"from_budget_line_item_name":{"type":"string"},"notes":{"type":"string"},"to_budget_line_item_id":{"type":"integer"},"to_budget_line_item_name":{"type":"string"},"transfer_amount":{"format":"float","type":"string"}},"type":"object"},"budget_mod_amount":{"type":"string"},"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"number":{"type":"string"},"title":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_code_biller_name":{"type":"string"},"cost_code_id":{"type":"integer"},"cost_code_is_budgeted":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"deletable":{"type":"boolean"},"editable":{"type":"boolean"},"estimated_cost_amount":{"type":"string"},"estimated_cost_calculation_strategy":{"type":"string"},"estimated_cost_quantity":{"format":"float","type":"number"},"estimated_cost_unit_cost":{"format":"float","type":"number"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"line_item_type_id":{"type":"integer"},"links":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"type":"string"},"edit":{"type":"string"},"prime_pco_cost":{"type":"string"},"rfq_amount":{"type":"string"},"rom":{"type":"string"},"view":{"type":"string"}},"type":"object"},"number":{"type":"string"},"prime_pco_cost":{"format":"float","type":"string"},"proposed_contract_id":{"type":"integer"},"proposed_vendor_id":{"type":"integer"},"request_for_quote_id":{"type":"integer"},"rfq_amount":{"format":"float","type":"string"},"rfq_sent":{"type":"string"},"rom":{"type":"integer"},"status":{"type":"string"},"statuses":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_contract_tooltip":{"type":"string"},"commitment_pco_cost":{"type":"string"},"commitment_pco_tooltip":{"type":"string"},"contract":{"type":"string"},"prime_pco_cost":{"type":"string"},"prime_pco_tooltip":{"type":"string"},"rfq_amount":{"type":"string"},"rfq_tooltip":{"type":"string"}},"type":"object"},"title":{"type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"change_event_origin_id":{"type":"integer"},"change_event_origin_type":{"type":"string"},"change_event_status":{"properties":{"id":{"type":"integer"},"mapped_to_status":{"type":"string"},"name":{"type":"string"},"show_in_select":{"type":"boolean"}},"type":"object"},"change_order_change_reason":{"properties":{"change_reason":{"type":"string"},"company_id":{"type":"integer"},"id":{"type":"integer"},"show_in_select":{"type":"boolean"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"event_scope":{"enum":["tbd","in_scope","out_of_scope"],"type":"string"},"event_type":{"type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"project_id":{"type":"integer"},"rfi":{"properties":{"due_date":{"format":"date-time","type":"string"},"full_number":{"type":"string"},"full_number_with_revision":{"type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"revision":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"}},"type":"object"},"rfqs":{"items":{"properties":{"assigned":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_contract_id":{"type":"integer"},"commitment_potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"estimated_amount":{"format":"float","type":"number"},"estimated_schedule_impact":{"type":"integer"},"estimated_status":{"enum":["rom","final"],"type":"string"},"id":{"type":"integer"},"intent_to_quote":{"type":"boolean"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"original_quote":{"format":"float","type":"number"},"position":{"type":"integer"},"potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"quotes":{"items":{"properties":{"attachments_count":{"type":"integer"},"commitment_quote_number":{"type":"string"},"cost":{"format":"float","type":"number"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"import_origin_id":{"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"request_for_quote_id":{"type":"integer"},"schedule_impact":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Quote","type":"object"},"type":"array"},"responses":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Response","type":"object"},"type":"array"},"specification_section":{"properties":{"spec_section_description":{"type":"string"},"spec_section_number":{"type":"string"},"specification_section_id":{"type":"integer"}},"type":"object"},"status":{"enum":["out_for_pricing","revise_and_resubmit","under_review","pending_final_approval","closed","withdrawn"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ","type":"object"},"type":"array"},"status":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Change Event","tags":["change_events"],"x-os-idempotent":true,"x-os-module":"change_events","x-os-paginated":false}},"/rest/v1.0/change_events/{id}/posting_history":{"get":{"description":"Requires change_events:read and current project view permission. Company is derived from authentication; path, query or body project must be authorized. Append-only posting evidence with current projection and legacy-baseline indicator; newest revision first. Cache-Control no-store and pagination headers. The handler default is 100; per_page above 100 fails 422 in the service. Uses change_events permission, not budget permission. Advisory locking protects a consistent read and does not create journal entries.","operationId":"listChangeEventPostingHistory","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/budget_PostingJournal"}}},"description":"Successful response","headers":{"Link":{"description":"Pagination navigation links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"string"}},"Total":{"description":"Total matching rows","schema":{"type":"string"}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Current actor or token permission denied"},"404":{"description":"Resource not found in authorized project"},"409":{"description":"Reserved or inconsistent change-event projection"},"422":{"description":"Validation or locked-budget constraint"}},"summary":"Read change-event budget posting journal","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":true}},"/rest/v1.0/change_events/{id}/restore":{"patch":{"description":"Restore a recycled Change Event. Returns 200 show.","operationId":"restoreChangeEvent","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Restore change event","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/change_order_packages":{"get":{"operationId":"listChangeOrderPackages","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"contract_id","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[reviewed_at]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[due_date]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[include_deleted]","required":false,"schema":{"enum":["only","with"],"type":"string"}},{"in":"query","name":"filters[invoiced_date]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[paid_date]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[signed_change_order_received_date]","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"contract":{"properties":{"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"currency_configuration":{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"designated_reviewer":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"signed_change_order_received_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","pending_billable","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Change Order Packages","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":true},"post":{"operationId":"createChangeOrderPackage","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"change_order":{"properties":{"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"invoiced_date":{"format":"date","type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"schedule_impact_amount":{"type":"integer"},"signed_change_order_received_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","pending_billable","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"}},"type":"object"},"contract_id":{"type":"integer"},"project_id":{"type":"integer"}},"required":["change_order","project_id","contract_id"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"designated_reviewer":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"cost_code":{"oneOf":[{"properties":{"biller":{"type":"string"},"biller_id":{"nullable":true,"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob",""],"type":"string"},"budgeted":{"type":"boolean"},"code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"parent":{"properties":{"id":{"nullable":true,"type":"integer"}},"type":"object"},"position":{"nullable":true,"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"}]},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"markup_line_items":{"items":{"properties":{"amount":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"id":{"type":"integer"},"markup":{"properties":{"compounds_markups_above":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"desitination_budget_line_item_id":{"type":"integer"},"destination_cost_code":{"allOf":[{"properties":{"origin_data":{"type":"string"},"origin_id":{"type":"string"}},"type":"object"}]},"destination_line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"destination_sub_job":{"allOf":[{"properties":{"created_at":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"updated_at":{"type":"string"}},"type":"object"},{"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"id":{"type":"integer"},"markup_set":{"type":"string"},"name":{"type":"string"},"percentage":{"type":"string"},"position":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"position":{"type":"integer"},"quantity":{"format":"float","type":"string"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"position":{"type":"integer"},"private":{"type":"boolean"},"review_notes":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"reviewer":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"revised_substantial_completion_date":{"format":"date","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"signed_change_order_received_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","pending_billable","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"type":{"enum":["PrimeContractChangeOrder","CommitmentContractChangeOrder","ChangeOrderPackage"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Change Order Package","tags":["change_orders"],"x-os-idempotent":true,"x-os-module":"change_orders","x-os-paginated":false}},"/rest/v1.0/change_order_packages/{id}":{"get":{"operationId":"getChangeOrderPackage","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"contract_id","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"designated_reviewer":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"markup_line_items":{"items":{"properties":{"amount":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"id":{"type":"integer"},"markup":{"properties":{"compounds_markups_above":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"desitination_budget_line_item_id":{"type":"integer"},"destination_cost_code":{"allOf":[{"properties":{"origin_data":{"type":"string"},"origin_id":{"type":"string"}},"type":"object"}]},"destination_line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"destination_sub_job":{"allOf":[{"properties":{"created_at":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"updated_at":{"type":"string"}},"type":"object"},{"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"id":{"type":"integer"},"markup_set":{"type":"string"},"name":{"type":"string"},"percentage":{"type":"string"},"position":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"wbs_code_id":{"type":"integer"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"position":{"type":"integer"},"quantity":{"format":"float","type":"string"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"position":{"type":"integer"},"private":{"type":"boolean"},"review_notes":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"reviewer":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"revised_substantial_completion_date":{"format":"date","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"signed_change_order_received_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","pending_billable","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"type":{"enum":["PrimeContractChangeOrder","CommitmentContractChangeOrder","ChangeOrderPackage"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Change Order Package","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":false},"patch":{"operationId":"updateChangeOrderPackage","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"change_order":{"properties":{"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"invoiced_date":{"format":"date","type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"schedule_impact_amount":{"type":"integer"},"signed_change_order_received_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","pending_billable","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"}},"type":"object"},"contract_id":{"type":"integer"},"project_id":{"type":"integer"}},"required":["change_order","project_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"designated_reviewer":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"markup_line_items":{"items":{"properties":{"amount":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"id":{"type":"integer"},"markup":{"properties":{"compounds_markups_above":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"desitination_budget_line_item_id":{"type":"integer"},"destination_cost_code":{"allOf":[{"properties":{"origin_data":{"type":"string"},"origin_id":{"type":"string"}},"type":"object"}]},"destination_line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"destination_sub_job":{"allOf":[{"properties":{"created_at":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"updated_at":{"type":"string"}},"type":"object"},{"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"id":{"type":"integer"},"markup_set":{"type":"string"},"name":{"type":"string"},"percentage":{"type":"string"},"position":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"wbs_code_id":{"type":"integer"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"position":{"type":"integer"},"quantity":{"format":"float","type":"string"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"position":{"type":"integer"},"private":{"type":"boolean"},"review_notes":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"reviewer":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"revised_substantial_completion_date":{"format":"date","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"signed_change_order_received_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","pending_billable","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"type":{"enum":["PrimeContractChangeOrder","CommitmentContractChangeOrder","ChangeOrderPackage"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Change Order Package","tags":["change_orders"],"x-os-idempotent":true,"x-os-module":"change_orders","x-os-paginated":false}},"/rest/v1.0/change_order_requests":{"get":{"operationId":"listChangeOrderRequests","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"contract_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["extended"],"type":"string"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[due_date]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[invoiced_date]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[paid_date]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[change_order_package_id]","required":false,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[status]","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[not_status]","schema":{"items":{"type":"string"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"change_order_package_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"currency_configuration":{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","pending_billable","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"total_tax_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Change Order Requests","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":true}},"/rest/v1.0/change_order_requests/{id}":{"get":{"operationId":"getChangeOrderRequest","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"contract_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["extended"],"type":"string"}},{"in":"query","name":"filters[include_deleted]","required":false,"schema":{"enum":["only","with"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"batch":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","pending_billable","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"}},"type":"object"},"change_order_package_id":{"type":"integer"},"contract":{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date-time","type":"string"},"executed":{"type":"boolean"},"grand_total":{"format":"float","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"position":{"type":"integer"},"private":{"type":"boolean"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"signed_change_order_received_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","pending_billable","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"total_tax_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Change Order Request","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":false}},"/rest/v1.0/commitment_change_orders":{"get":{"description":"Requires commitments:read and live Commitments view permission. The parent contract must be visible. Results include only change orders on visible parent commitments. Schedule-of-values permissions control line details.","operationId":"listCommitmentChangeOrders","parameters":[{"description":"Project containing the record.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Change-order IDs.","explode":true,"in":"query","name":"filters[id]","schema":{"items":{"minimum":1,"type":"integer"},"type":"array"},"style":"form"},{"description":"Parent commitment IDs.","explode":true,"in":"query","name":"filters[commitment_id]","schema":{"items":{"minimum":1,"type":"integer"},"type":"array"},"style":"form"},{"description":"Parent commitment IDs. Overrides the commitment_id filter when both are present.","explode":true,"in":"query","name":"filters[contract_id]","schema":{"items":{"minimum":1,"type":"integer"},"type":"array"},"style":"form"},{"description":"Filter by change-order status.","explode":true,"in":"query","name":"filters[status]","schema":{"items":{"enum":["draft","pending","approved","rejected","void"],"type":"string"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/commitments_ChangeOrder"},"type":"array"}}},"description":"Paginated change orders.","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"maximum":1000,"minimum":1,"type":"integer"}},"Total":{"schema":{"minimum":0,"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."}},"summary":"List commitment change orders","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":true},"post":{"description":"Requires commitments:write, live Commitments permission for this action and access to the parent contract. Uses create permission and requires schedule-of-values access when lines are supplied. Line references must belong to the same project and commitment. Approved change orders affect the parent commitment's revised amount.","operationId":"createCommitmentChangeOrder","parameters":[{"description":"Project containing the record. Supply either this query parameter or the JSON body project_id. A valid query value takes precedence.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ChangeOrderCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ChangeOrder"}}},"description":"Created change order."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ValidationErrors"}}},"description":"The request fields are invalid."}},"summary":"Create a commitment change order","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/commitment_change_orders/{id}":{"delete":{"description":"Requires commitments:write, live Commitments permission for this action and access to the parent contract. Uses delete permission. The order is soft-deleted. Removing an approved order changes the revised amount.","operationId":"deleteCommitmentChangeOrder","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Change order removed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."}},"summary":"Remove a commitment change order","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false},"get":{"description":"Requires commitments:read and live Commitments view permission. The parent contract must be visible. Schedule-of-values permissions control line details.","operationId":"getCommitmentChangeOrder","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ChangeOrder"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."}},"summary":"Get a commitment change order","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false},"patch":{"description":"Requires commitments:write, live Commitments permission for this action and access to the parent contract. Uses edit permission. Update the header fields here and change lines through the line-item operations. Approved change orders affect the parent commitment's revised amount.","operationId":"updateCommitmentChangeOrder","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record. Supply either this query parameter or the JSON body project_id. A valid query value takes precedence.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ChangeOrderPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ChangeOrder"}}},"description":"Updated change order."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ValidationErrors"}}},"description":"The request fields are invalid."}},"summary":"Update a commitment change order","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/commitment_change_orders/{id}/line_items":{"get":{"description":"Requires commitments:read and live Commitments view permission. The parent contract must be visible. Returns an empty line list if the actor lacks access to the parent schedule of values.","operationId":"listCommitmentChangeOrderLineItems","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/commitments_ChangeOrderLine"},"type":"array"}}},"description":"Paginated visible lines.","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"maximum":1000,"minimum":1,"type":"integer"}},"Total":{"schema":{"minimum":0,"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."}},"summary":"List commitment change order lines","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":true},"post":{"description":"Requires commitments:write, live Commitments permission for this action and access to the parent contract. Uses create permission and requires schedule-of-values visibility. Referenced cost codes and commitment lines must match the same project and parent. Approved change orders affect the parent commitment's revised amount.","operationId":"createCommitmentChangeOrderLineItem","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record. Supply either this query parameter or the JSON body project_id. A valid query value takes precedence.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ChangeOrderLineCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ChangeOrder"}}},"description":"Parent change order with the newly added line."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ValidationErrors"}}},"description":"The request fields are invalid."}},"summary":"Add a commitment change order line","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/commitment_change_orders/{id}/line_items/{line_item_id}":{"delete":{"description":"Requires commitments:write, live Commitments permission for this action and access to the parent contract. Uses delete permission and requires schedule-of-values visibility. Permanently removes the line and changes the parent's revised amount when the order is approved.","operationId":"deleteCommitmentChangeOrderLineItem","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"line_item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Change-order line deleted."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."}},"summary":"Delete a commitment change order line","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false},"patch":{"description":"Requires commitments:write, live Commitments permission for this action and access to the parent contract. Uses edit permission and requires schedule-of-values visibility. Approved change orders affect the parent commitment's revised amount.","operationId":"updateCommitmentChangeOrderLineItem","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"line_item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record. Supply either this query parameter or the JSON body project_id. A valid query value takes precedence.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ChangeOrderLinePatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ChangeOrder"}}},"description":"Parent change order with the updated line."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ValidationErrors"}}},"description":"The request fields are invalid."}},"summary":"Update a commitment change order line","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/communications/{communication_id}/threads":{"get":{"operationId":"listCommunicationThreads","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"communication_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"from":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"from_external_email":{"type":"boolean"},"to":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},{"properties":{"email_sent_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"subject":{"type":"string"}},"type":"object"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Communication Threads","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/communications/{communication_id}/threads/{id}":{"get":{"operationId":"getCommunicationThread","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"communication_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bcc":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"body":{"type":"string"},"cc":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},{"properties":{"from":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"from_external_email":{"type":"boolean"},"to":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},{"properties":{"email_sent_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"subject":{"type":"string"}},"type":"object"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Communication Thread","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/communications/{id}":{"get":{"operationId":"getCommunication","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"communication_tags":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"},"initial_post":{"properties":{"email_sent_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"subject":{"type":"string"}},"type":"object"}},"type":"object"},{"properties":{"closed":{"type":"boolean"},"created_at":{"format":"date","type":"string"},"private":{"type":"boolean"}},"type":"object"},{"properties":{"id":{"type":"integer"},"subject":{"type":"string"}},"type":"object"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Communication","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/access_reviews":{"get":{"description":"Campaigns newest first with decision counts. An entity-limited grant sees only its entities' campaigns. Filter with status (open, completed, cancelled). Paginated (page, per_page). Needs manage_grants. Requires accounting:read.","operationId":"listCompanyAccountingAccessReviews","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"status","required":false,"schema":{"enum":["open","completed","cancelled"],"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_GovAccessReview"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants, a project-scoped grant, wrong company or a token without the required scope"}},"summary":"List access review campaigns","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Snapshots, immutably, every accounting grant in scope (the company, or the grants that reach one entity; expired grants and inactive members included) and every company administrator: flags, entity and project scope, delegations given and received, live API tokens with an accounting scope (never the token), MFA, last accounting activity, dormancy (no activity for dormant_days, default 90) and the SoD conflicts of the person's effective duties. Every reviewer needs manage_grants over the whole scope; when a reviewer's own access is in scope a second reviewer is required. A quarterly campaign names its period (one per scope and quarter, else 409). Needs manage_grants (unrestricted for a company-wide campaign). Honors Idempotency-Key. Requires accounting:write.","operationId":"createCompanyAccountingAccessReview","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"access_review":{"$ref":"#/components/schemas/accounting_GovAccessReviewInput"}},"required":["access_review"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GovAccessReview"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants, an entity outside the caller's grant, wrong company or a read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown entity or reviewer"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A quarterly campaign already exists for this scope and period, or an Idempotency-Key conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body, a past due date, a reviewer without manage_grants over the scope, or a reviewer who would review their own access alone"}},"summary":"Open an access review campaign","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/access_reviews/{id}":{"get":{"description":"The campaign, its counts and every snapshotted item with the decision recorded so far. Needs manage_grants over the campaign's scope. Requires accounting:read.","operationId":"getCompanyAccountingAccessReview","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GovAccessReviewDetail"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants, wrong company or a token without the required scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No such campaign in the caller's scope"}},"summary":"Get an access review campaign with its snapshot","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/access_reviews/{id}/cancel":{"post":{"description":"Cancels an open campaign with a reason; decisions already applied stand. The campaign's creator or a designated reviewer. Needs manage_grants. Requires accounting:write.","operationId":"cancelCompanyAccountingAccessReview","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"cancel":{"additionalProperties":false,"properties":{"reason":{"maxLength":1000,"minLength":10,"type":"string"}},"required":["reason"],"type":"object"}},"required":["cancel"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GovAccessReview"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants, or neither creator nor reviewer"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No such campaign"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already completed or cancelled"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body"}},"summary":"Cancel an access review campaign","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/access_reviews/{id}/complete":{"post":{"description":"Closes the campaign once every item is decided (422 access_review_incomplete otherwise) and stores the decision counts. The completed campaign is evidence for control objective CO-1. A designated reviewer only. Needs manage_grants. Requires accounting:write.","operationId":"completeCompanyAccountingAccessReview","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"complete":{"additionalProperties":false,"properties":{"note":{"maxLength":1000,"type":"string"}},"type":"object"}},"required":["complete"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GovAccessReview"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants or not a designated reviewer"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No such campaign"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already completed or cancelled"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Undecided items remain"}},"summary":"Complete an access review campaign","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/access_reviews/{id}/items/{item_id}/decision":{"post":{"description":"Records keep, modify or revoke with a reason, once. Only a designated reviewer may decide, and never the item's own holder (403). Revoke and modify apply through the grant-change path (step-up, entity limits, no flags the reviewer lacks, segregation of duties, its own grant_changed or grant_revoked audit row) and the item records that audit event; keep stamps the grant certified when it still matches the snapshot. A company administrator's item can only be kept. drift_at_decision records that the live grant differed from the snapshot. Needs manage_grants and step-up (a token needs accounting:step_up). Requires accounting:write.","operationId":"decisionCompanyAccountingAccessReviewItem","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Item id","in":"path","name":"item_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"decision":{"$ref":"#/components/schemas/accounting_GovDecisionInput"}},"required":["decision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GovAccessReviewItem"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants, step-up required, not a designated reviewer, or the caller's own item"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No such campaign or item"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already decided, campaign not open, or a modify on a grant that no longer exists"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body, a non-keep decision on an administrator, or a grant change the grant path refuses (sod_blocked, sod_reason_required)"}},"summary":"Decide one access review item","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/accounts":{"get":{"description":"The chart of accounts in number order. Filter with `filters[type]`, `filters[is_active]`, `filters[is_postable]`, or `search` (number prefix or name). Delta sync: updated_since and/or cursor return changes in ascending (updated_at, id) order with Next-Cursor. Requires the accounting:read scope.","operationId":"listCompanyAccountingAccounts","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Account number prefix or name fragment","in":"query","name":"search","schema":{"type":"string"}},{"description":"Comma-separated account types","in":"query","name":"filters[type]","schema":{"type":"string"}},{"description":"Active accounts only, or inactive only","in":"query","name":"filters[is_active]","schema":{"enum":["true","false"]}},{"description":"Postable or header accounts","in":"query","name":"filters[is_postable]","schema":{"enum":["true","false"]}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Delta sync: only rows created or changed at or after this time (ISO 8601 with offset). Switches the list to ascending (updated_at, id) order; page is ignored and Next-Cursor continues it. Re-read with a small overlap (a few seconds) and dedupe by id.","in":"query","name":"updated_since","schema":{"format":"date-time","type":"string"}},{"description":"Opaque keyset cursor from a previous response's Next-Cursor header; each page costs the same however deep it is.","in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Account"},"type":"array"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Next-Cursor":{"description":"Delta sync only: cursor for the next page, present while a full page came back","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown filter value"}},"summary":"List GL accounts","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Adds an account. Normal balance and cash-flow category default from the type. Header accounts (`is_postable: false`) group others in the tree and never take postings. Job-cost accounts set `job_cost_type` so lines with a project also write the job cost subledger. Needs manage_coa. Requires the accounting:write scope.","operationId":"createCompanyAccountingAccount","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account":{"properties":{"cash_flow_category":{"enum":["operating","investing","financing",null]},"currency":{"type":"string"},"description":{"type":["string","null"]},"is_active":{"type":"boolean"},"is_control":{"type":"boolean"},"is_postable":{"type":"boolean"},"job_cost_type":{"enum":["labor","material","subcontract","equipment","other","burden",null]},"name":{"type":"string"},"normal_balance":{"enum":["debit","credit"]},"number":{"type":"string"},"parent_id":{"minimum":1,"type":["integer","null"]},"require_cost_code":{"type":"boolean"},"require_cost_type":{"type":"boolean"},"require_project":{"type":"boolean"},"subtype":{"type":["string","null"]},"type":{"enum":["bank","cash","accounts_receivable","retainage_receivable","contract_asset","other_current_asset","inventory","fixed_asset","accumulated_depreciation","other_asset","accounts_payable","retainage_payable","contract_liability","credit_card","payroll_liability","sales_tax_payable","other_current_liability","long_term_liability","equity","retained_earnings","income","other_income","cost_of_revenue","expense","other_expense"]}},"required":["number","name","type"],"type":"object"}},"required":["account"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Account"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Create a GL account","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/accounts/apply_template":{"post":{"description":"Adds the numbered construction template (cash, retainage, contract assets and liabilities for under/over billings, job cost by cost type, payroll liabilities, accumulated depreciation, equity and system roles). Only missing account numbers are added, so it is safe to repeat. Needs manage_coa. Requires the accounting:write scope.","operationId":"createCompanyAccountingAccountsApplyTemplate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"template":{"properties":{"name":{"enum":["construction"]}},"required":["name"],"type":"object"}},"required":["template"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounts_created":{"type":"integer"},"accounts_total":{"type":"integer"},"template":{"enum":["construction"]}},"required":["template","accounts_created","accounts_total"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"Apply the construction chart of accounts","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/accounts/packs":{"get":{"description":"General contractor, specialty contractor, home builder, heavy civil and construction management packs: the accounts each adds to the construction template, suggested dimensions and default job cost accounts, plus the pack this company last applied. Requires the accounting:read scope.","operationId":"listCompanyAccountingAccountsPacks","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"applied":{"type":["string","null"]},"packs":{"items":{"$ref":"#/components/schemas/accounting_AcctCoaPack"},"type":"array"}},"required":["applied","packs"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, an entity-restricted or project-scoped grant writing, wrong company, read-only workspace, or (edition changes) missing step-up or MFA"}},"summary":"List industry chart-of-accounts packs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/accounts/packs/apply":{"post":{"description":"Creates the pack's accounts the company does not have; never renumbers, renames, retypes, remaps or removes an existing account. A company with accounts must send the preview's confirm_hash (422 pack_preview_required without it, 409 pack_preview_stale when the chart changed). create_dimensions adds the suggested dimensions as optional. Audited (pack_applied). Needs manage_coa on an unrestricted grant. Requires the accounting:write scope.","operationId":"createCompanyAccountingAccountsPacksApply","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"pack":{"additionalProperties":false,"properties":{"confirm_hash":{"maxLength":64,"minLength":1,"type":"string"},"create_dimensions":{"type":"boolean"},"key":{"enum":["general_contractor","specialty_contractor","home_builder","heavy_civil","construction_management"],"type":"string"}},"required":["key"],"type":"object"}},"required":["pack"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctCoaPackApplied"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, an entity-restricted or project-scoped grant writing, wrong company, read-only workspace, or (edition changes) missing step-up or MFA"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The chart changed since the preview, or an Idempotency-Key conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Preview required, or an invalid body"}},"summary":"Apply a pack","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/accounts/packs/preview":{"get":{"description":"The non-destructive merge of `pack` into this company's chart: accounts to create (numbers it does not have), existing accounts kept unchanged (posted or not), role mappings kept, assigned or left for manual mapping, dimensions to create, and the hash to confirm with. Needs manage_coa. Requires the accounting:read scope.","operationId":"listCompanyAccountingAccountsPacksPreview","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"pack","required":false,"schema":{"enum":["general_contractor","specialty_contractor","home_builder","heavy_civil","construction_management"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctCoaPackPlan"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, an entity-restricted or project-scoped grant writing, wrong company, read-only workspace, or (edition changes) missing step-up or MFA"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown or missing pack"}},"summary":"Preview a pack merge","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/accounts/tree":{"get":{"description":"Every account nested under its parent header account, roots in number order. Requires the accounting:read scope.","operationId":"listCompanyAccountingAccountsTree","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AccountNode"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"Chart of accounts tree","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/accounts/{id}":{"get":{"description":"One account of this company. Requires the accounting:read scope.","operationId":"getCompanyAccountingAccount","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Account"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a GL account","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Edits an account. Once it has journal activity its type, normal balance and postable flag are fixed (reclassify with a journal entry instead). Needs manage_coa. Requires the accounting:write scope.","operationId":"updateCompanyAccountingAccount","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account":{"properties":{"cash_flow_category":{"enum":["operating","investing","financing",null]},"currency":{"type":"string"},"description":{"type":["string","null"]},"is_active":{"type":"boolean"},"is_control":{"type":"boolean"},"is_postable":{"type":"boolean"},"job_cost_type":{"enum":["labor","material","subcontract","equipment","other","burden",null]},"name":{"type":"string"},"normal_balance":{"enum":["debit","credit"]},"number":{"type":"string"},"parent_id":{"minimum":1,"type":["integer","null"]},"require_cost_code":{"type":"boolean"},"require_cost_type":{"type":"boolean"},"require_project":{"type":"boolean"},"subtype":{"type":["string","null"]},"type":{"enum":["bank","cash","accounts_receivable","retainage_receivable","contract_asset","other_current_asset","inventory","fixed_asset","accumulated_depreciation","other_asset","accounts_payable","retainage_payable","contract_liability","credit_card","payroll_liability","sales_tax_payable","other_current_liability","long_term_liability","equity","retained_earnings","income","other_income","cost_of_revenue","expense","other_expense"]}},"type":"object"}},"required":["account"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Account"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Update a GL account","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ach/monitoring":{"get":{"description":"Needs manage_vendor_banking. Evidence for Nacha's risk-based fraud monitoring (non-consumer Originators, effective 2026-06-22) over a window: controls in force, vendor and employee bank-account changes and NOC applications, prenote and block records, returns by code (unauthorized R05/R07/R10/R29 counted), NOC timeliness and the notices. Masks only. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingAchMonitoring","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"from","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"to","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounts":{"items":{"type":"object"},"type":"array"},"bank_changes":{"items":{"type":"object"},"type":"array"},"controls":{"type":"object"},"from":{"format":"date","type":"string"},"nocs":{"type":"object"},"notices":{"items":{"$ref":"#/components/schemas/accounting_AchNotice"},"type":"array"},"returns":{"type":"object"},"to":{"format":"date","type":"string"}},"required":["from","to","controls","bank_changes","accounts","returns","nocs","notices"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties (sod_noc), wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"ACH fraud-monitoring evidence","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ach/notices":{"get":{"description":"Needs manage_vendor_banking. Newest first, up to 500; filter with status (open, applied, manual, unmatched). Corrected NOC data stays encrypted and is never returned. Newest first, paged in the database with the caller's entity scope applied (Total, Per-Page and Link headers). Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingAchNotices","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Only notices in this status; any other value is 422.","in":"query","name":"status","required":false,"schema":{"enum":["open","applied","manual","unmatched"]}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AchNotice"},"type":"array"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties (sod_noc), wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"ACH returns and NOCs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Needs manage_vendor_banking (plus release_payments for AP returns, payroll_run for payroll returns). A NACHA return/COR file (entries with addenda 99/98) or a bank CSV (code, original_trace, id_number, amount, corrected_data, optional trace_number). A return on an AP payment reverses it dated received_date (closed period refused), reopens its bills with an ach_returned hold and, for R02/R03/R04/R07/R10/R12/R14/R15/R16/R20/R23/R29, blocks that bank account; a return on a paycheck posts Dr payroll cash / Cr payroll clearing (net pay owed again); a returned prenote blocks the account. NOCs are queued with their six-banking-day due date. Idempotent: notices already imported are counted in skipped. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403. A grant with neither manage_vendor_banking nor payroll_run (for example a view-only role) gets 403 before anything is written, even for a file whose notices were all imported already, and so does a read-only workspace.","operationId":"createCompanyAccountingAchNotice","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"ach_import":{"properties":{"content":{"type":"string"},"format":{"enum":["nacha","csv"],"type":"string"},"received_date":{"format":"date","type":"string"}},"required":["format","content","received_date"],"type":"object"}},"required":["ach_import"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"notices":{"items":{"properties":{"code":{"type":"string"},"id":{"type":"integer"},"kind":{"type":"string"},"message":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","kind","code","status"],"type":"object"},"type":"array"},"skipped":{"type":"integer"}},"required":["notices","skipped"],"type":"object"}}},"description":"Imported"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties (sod_noc), wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"ach_trace_ambiguous, ach_return_not_posted"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Import an ACH return/NOC file","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ach/notices/apply_nocs":{"post":{"description":"Needs manage_vendor_banking (payroll_run for employee NOCs). Applies the open C01/C02/C03/C05 NOCs named in ids (required, at least one: there is no apply-all; an empty list is 422 noc_ids_required) to the vendor or employee bank record and records the corrected account as verified, so the next file pays it. Needs step-up (a token needs the accounting:step_up scope, 403 step_up_required). The importer can't apply (403 sod_noc). Audited per notice (noc_applied) with masks only; the response carries each notice's masked old -> new routing and account last 4 (changes). Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403. A grant with neither manage_vendor_banking nor payroll_run (for example a view-only role) gets 403 before anything is written, even for a file whose notices were all imported already, and so does a read-only workspace.","operationId":"createCompanyAccountingAchNoticesApplyNoc","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"apply":{"properties":{"ids":{"items":{"type":"integer"},"maxItems":500,"minItems":1,"type":"array"}},"required":["ids"],"type":"object"}},"required":["apply"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"applied":{"items":{"type":"integer"},"type":"array"},"changes":{"items":{"properties":{"account_last4":{"items":{"type":"string"},"type":"array"},"account_type":{"items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"party_id":{"type":"integer"},"party_kind":{"enum":["vendor","employee"],"type":"string"},"routing_last4":{"items":{"type":"string"},"type":"array"}},"type":"object"},"type":"array"}},"required":["applied","changes"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties (sod_noc), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"An id is not an open NOC"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"noc_no_account"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Apply NOCs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ach/notices/{id}/resolve":{"post":{"description":"Needs manage_vendor_banking. Marks a C04/C06/C07 NOC (status manual) applied after the bank record was corrected by hand; the importer can't resolve it (403 sod_noc). Needs step-up (a token needs the accounting:step_up scope, 403 step_up_required). Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403. A grant with neither manage_vendor_banking nor payroll_run (for example a view-only role) gets 403 before anything is written, even for a file whose notices were all imported already, and so does a read-only workspace.","operationId":"resolveCompanyAccountingAchNotice","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"resolve":{"properties":{"reason":{"type":"string"}},"required":["reason"],"type":"object"}},"required":["resolve"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"}},"required":["id"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties (sod_noc), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not a manual NOC in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Resolve a manual NOC","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ach/prenotes":{"post":{"description":"Vendors need manage_vendor_banking and bank_account_id (the ODFI); employees need payroll_run and view_payroll_pii over every entity. Zero-dollar prenote entries (transaction code 23/33) for every ACH vendor or direct-deposit employee whose current account has no prenote, verification or block; vendor batches use the SEC code from bank_account_ownership. Records the settlement date and the earliest live date (third banking day after, Nacha Rules 2.6). 422 nothing_to_prenote when none is due. Returns the NACHA text with X-Prenote-Count and X-Earliest-Live-Date headers. Requires the accounting:write scope.","operationId":"createCompanyAccountingAchPrenote","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"prenote":{"properties":{"bank_account_id":{"type":["integer","null"]},"effective_date":{"format":"date","type":"string"},"kind":{"enum":["vendor","employee"],"type":"string"}},"required":["kind","effective_date"],"type":"object"}},"required":["prenote"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"NACHA prenote file"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties (sod_noc), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Bank account not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Generate a prenote file","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/allocation_runs":{"post":{"description":"Spreads `amount` (the pool) across job targets by `basis` with largest-remainder rounding, so the shares always add up to the pool. Posts one balanced `JC` entry (source `allocation_run`): a debit per target on its `account_id` (else `target_account_id`) tagged with the target project and optional cost code, and a credit to `pool_account_id`. A negative pool swaps the sides. Job-cost accounts write job cost rows. `fixed_pct` bases must total 100. Control accounts are refused. The pool account must be an expense, cost of revenue or other expense account and every target account a job cost account (422 otherwise). At or above the approval threshold (settings require_approval_above; null = every amount), or when an active journal_entry approval rule matches, the run is not posted: it is saved as a pending_approval journal entry with its approval route and answered 202. A second person approves it (journal_entries/{id}/approve; the preparer cannot) and a close_period holder posts it (journal_entries/{id}/post). Needs close_period. Requires the accounting:write scope.","operationId":"createCompanyAccountingAllocationRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amount":{"description":"Pool, a non-zero decimal string with at most two places","type":"string"},"auto_reverse_date":{"format":"date","type":["string","null"]},"basis":{"enum":["labor_hours","labor_cost","direct_cost","units","fixed_pct"]},"date":{"format":"date","type":"string"},"entity_id":{"type":["integer","null"]},"memo":{"maxLength":500,"type":"string"},"pool_account_id":{"type":"integer"},"pool_dimension_value_ids":{"description":"User-defined dimension values on the pool (credit) line.","items":{"minimum":1,"type":"integer"},"maxItems":20,"type":["array","null"]},"target_account_id":{"type":"integer"},"targets":{"items":{"properties":{"account_id":{"type":["integer","null"]},"basis":{"description":"Non-negative decimal string (hours, cost, units or percent)","type":"string"},"cost_code_id":{"type":["integer","null"]},"dimension_value_ids":{"description":"User-defined dimension values on this target's line (e.g. the job's region or division).","items":{"minimum":1,"type":"integer"},"maxItems":20,"type":["array","null"]},"project_id":{"type":"integer"}},"required":["project_id","basis"],"type":"object"},"maxItems":500,"minItems":1,"type":"array"}},"required":["date","memo","basis","amount","pool_account_id","target_account_id","targets"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"allocation":{"properties":{"basis_total":{"type":"string"},"pool":{"type":"string"},"shares":{"items":{"properties":{"amount":{"type":"string"},"basis":{"type":"string"},"project_id":{"type":"integer"},"ratio":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"journal_entry":{"$ref":"#/components/schemas/accounting_JournalEntryShow"},"pending_approval":{"description":"false: posted now","type":"boolean"}},"type":"object"}}},"description":"Allocation posted"},"202":{"content":{"application/json":{"schema":{"properties":{"allocation":{"properties":{"basis_total":{"type":"string"},"pool":{"type":"string"},"shares":{"items":{"properties":{"amount":{"type":"string"},"basis":{"type":"string"},"project_id":{"type":"integer"},"ratio":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"journal_entry":{"$ref":"#/components/schemas/accounting_JournalEntryShow"},"pending_approval":{"description":"true: approve and post it through journal_entries/{id}","type":"boolean"}},"type":"object"}}},"description":"Saved pending approval (threshold or approval rule); journal_entry.status is pending_approval"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Post an allocation run","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/allocation_runs/{id}/reverse":{"post":{"description":"`id` is the allocation run's journal entry id (`journal_entry.id` from POST allocation_runs). Posts the mirror entry on `date`; the reversal writes negating job cost rows. Repeating the call returns the same reversal. Needs post_journal and close_period; at or above the approval threshold the reverser must hold approve_journal and must not have prepared the run. An entry of any other source is 404. Emits `accounting.journal_entry.reversed`. Requires the accounting:write scope.","operationId":"reverseCompanyAccountingAllocationRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reversal":{"properties":{"date":{"format":"date","type":"string"},"reason":{"maxLength":500,"type":["string","null"]}},"required":["date"],"type":"object"}},"required":["reversal"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_JournalEntryShow"}}},"description":"The reversing entry"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Reverse an allocation run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/aging":{"get":{"description":"Rebuilt from documents and dated applications, so a past aging re-performs exactly. Retainage is aged separately. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingApAging","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"","in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}},{"description":"","in":"query","name":"basis","required":false,"schema":{"enum":["due","document"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApAging"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"AP aging as of a date","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/automation/settings":{"get":{"description":"Capture address and allow list, vendor portal, remittance and virtual card settings. A project-scoped grant gets 403. Requires the accounting:read scope.","operationId":"listCompanyAccountingApAutomationSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApAutomationSettings"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"}},"summary":"Get AP automation settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Needs manage_coa. Virtual card fields also need release_payments and step-up; enabling virtual cards needs a non-control liability clearing account and an active bank (not card) funding account. rotate_capture_address issues a new capture address at once. Audited with the values before and after. Requires the accounting:write scope.","operationId":"updateCompanyAccountingApAutomationSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"automation_settings":{"properties":{"capture_allowed_senders":{"items":{"type":"string"},"maxItems":200,"type":"array"},"capture_enabled":{"type":"boolean"},"portal_enabled":{"type":"boolean"},"remittance_enabled":{"type":"boolean"},"rotate_capture_address":{"type":"boolean"},"virtual_card_clearing_account_id":{"type":["integer","null"]},"virtual_card_enabled":{"type":"boolean"},"virtual_card_funding_bank_account_id":{"type":["integer","null"]}},"required":[],"type":"object"}},"required":["automation_settings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApAutomationSettings"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Update AP automation settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/backup_notices":{"get":{"description":"B notice records, newest first. Filter with vendor_id. Requires the accounting:read scope.","operationId":"listCompanyAccountingApBackupNotices","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"vendor_id","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_BackupNotice"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"}},"summary":"List CP2100 B notices","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Records a vendor listed on an IRS CP2100/CP2100A notice. notice_date is the CP2100 date or the date received, whichever is later. The letter is due within 15 business days, and 24% backup withholding applies to AP payments dated on or after notice_date + 30 IRS business days until the notice is cured (Pub 1281). notice_number defaults to 2 when the vendor already had a notice in the same or the two preceding calendar years. Needs ap_enter; audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingApBackupNotice","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"backup_notice":{"additionalProperties":false,"properties":{"notice_date":{"format":"date","type":"string"},"notice_number":{"enum":[1,2,null],"type":["integer","null"]},"tax_year":{"type":["integer","null"]},"vendor_id":{"type":"integer"}},"required":["vendor_id","notice_date"],"type":"object"}},"required":["backup_notice"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BackupNotice"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, no vendor needs this form, a payee TIN, name or address is missing, the template is missing, for another form or has an unknown required column, or a corrected return was requested"}},"summary":"Record a CP2100 B notice","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/backup_notices/{id}":{"patch":{"description":"letter_sent_at records the mailing date (ap_enter). cured_at with cure_kind stops backup withholding from that date and needs manage_vendor_banking: a first notice is cured only by a signed W-9 (w9); a second notice only by SSA or IRS validation (ssa_card, letter_147c, letter_685c, letter_096c), otherwise 422 cure_not_allowed. A cure is final (409 already_cured). Audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingApBackupNotice","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"backup_notice":{"additionalProperties":false,"properties":{"cure_kind":{"enum":["w9","ssa_card","letter_147c","letter_685c","letter_096c",null],"type":["string","null"]},"cured_at":{"format":"date","type":["string","null"]},"letter_sent_at":{"format":"date","type":["string","null"]}},"required":[],"type":"object"}},"required":["backup_notice"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BackupNotice"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, no vendor needs this form, a payee TIN, name or address is missing, the template is missing, for another form or has an unknown required column, or a corrected return was requested"}},"summary":"Mark a B notice letter sent or record the cure","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/backup_notices/{id}/letter":{"get":{"description":"The first or second B notice letter header for the vendor (reply-by date, account number, name, masked TIN, 24% rate) and the opening paragraph of the IRS text (Pub 1281 Rev. 12-2023, Part 4). Enclose the rest of the IRS notice text (and Form W-9 for a first notice); mail it in an envelope marked IMPORTANT TAX INFORMATION ENCLOSED. Requires the accounting:read scope.","operationId":"listCompanyAccountingApBackupNoticeLetter","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"envelope":{"type":"string"},"filename":{"type":"string"},"letter_due_by":{"format":"date","type":"string"},"notice_number":{"type":"integer"},"text":{"type":"string"}},"required":["filename","text","envelope","letter_due_by","notice_number"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"B notice letter","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/bills":{"get":{"description":"Filters: filters[status], filters[kind], vendor_id, project_id, due_by, search. Paginated (Total, Per-Page headers). Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingApBills","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"filters[status]","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"filters[kind]","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"vendor_id","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"due_by","required":false,"schema":{"format":"date","type":"string"}},{"description":"","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Delta sync: only rows created or changed at or after this time (ISO 8601 with offset). Switches the list to ascending (updated_at, id) order; page is ignored and Next-Cursor continues it. Re-read with a small overlap (a few seconds) and dedupe by id.","in":"query","name":"updated_since","schema":{"format":"date-time","type":"string"}},{"description":"Opaque keyset cursor from a previous response's Next-Cursor header; each page costs the same however deep it is.","in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApBill"},"type":"array"}}},"description":"OK","headers":{"Next-Cursor":{"description":"Delta sync only: cursor for the next page, present while a full page came back","schema":{"type":"string"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"}},"summary":"List bills and vendor credits","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Needs ap_enter. Retainage defaults from the commitment, then the vendor profile; due and discount dates from terms. A suspected duplicate (same vendor, normalized invoice number) returns 409 duplicate_suspected unless an ap_approve user sends duplicate_override_reason (audited). A vendor inactive in the directory returns 409 vendor_inactive unless an ap_approve user sends inactive_vendor_override_reason (audited). Requires the accounting:write scope.","operationId":"createCompanyAccountingApBill","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bill":{"properties":{"billed_through":{"format":"date","type":["string","null"]},"commitment_id":{"type":["integer","null"]},"commitment_type":{"type":["string","null"]},"due_date":{"format":"date","type":"string"},"duplicate_override_reason":{"type":["string","null"]},"entity_id":{"type":["integer","null"]},"inactive_vendor_override_reason":{"description":"Bill a vendor that is inactive in the directory (otherwise 409 vendor_inactive). ap_approve only (403); audited as inactive_vendor_overridden. Credits are not refused.","type":["string","null"]},"invoice_date":{"format":"date","type":"string"},"invoice_number":{"type":["string","null"]},"kind":{"type":"string"},"lines":{"items":{"properties":{"account_id":{"type":"integer"},"amount":{"type":"string"},"commitment_line_item_id":{"type":["integer","null"]},"cost_code_id":{"type":["integer","null"]},"cost_type_id":{"type":["integer","null"]},"description":{"type":["string","null"]},"dimension_value_ids":{"description":"User-defined dimension values (AcctDimensionValue ids), at most one per dimension; see oas-dimensions.json.","items":{"minimum":1,"type":"integer"},"maxItems":20,"type":["array","null"]},"equipment_id":{"type":["integer","null"]},"project_id":{"type":["integer","null"]},"quantity":{"type":["string","null"]},"reportable_1099":{"type":"boolean"},"retainage_amount":{"description":"Explicit retainage (at most the line amount); overrides retainage_percent.","type":["string","null"]},"retainage_percent":{"type":["string","null"]},"tax_category":{"enum":["material","fixture","labor","equipment",null],"type":["string","null"]},"unit_price":{"type":["string","null"]},"use_tax":{"description":"Omitted on an untaxed material line of a job whose tax profile accrues use tax (consumer states such as CA): defaults to true, and the bill tax code defaults to the job use tax code.","type":"boolean"}},"required":["account_id","amount"],"type":"object"},"type":"array"},"memo":{"type":["string","null"]},"off_rent_date":{"format":"date","type":["string","null"]},"pay_when_paid_mode":{"type":["string","null"]},"pay_when_paid_pay_app_id":{"type":["integer","null"]},"posting_date":{"format":"date","type":"string"},"retainage_percent":{"type":["string","null"]},"tax_code_id":{"type":["integer","null"]},"term_id":{"type":["integer","null"]},"vendor_id":{"type":"integer"}},"required":["vendor_id","invoice_date","lines"],"type":"object"}},"required":["bill"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Create a draft bill or vendor credit","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/bills/from_source":{"post":{"description":"Approved subcontract requisition → draft bill for the period delta (never the cumulative claim), coded to the subcontract job cost account; approved direct cost → draft bill by line type. Requires the accounting:write scope.","operationId":"createCompanyAccountingApBillsFromSource","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"source":{"properties":{"direct_cost_id":{"type":["integer","null"]},"invoice_date":{"format":"date","type":"string"},"requisition_id":{"type":["integer","null"]}},"required":[],"type":"object"}},"required":["source"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Draft a bill from a requisition or direct cost","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/bills/{id}":{"delete":{"description":"Needs ap_enter. Requires the accounting:write scope.","operationId":"deleteCompanyAccountingApBill","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Delete a draft bill","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"get":{"description":"Lines, approvals for the current revision, applications, retainage releases, current payment holds and the approval route preview. Requires the accounting:read scope.","operationId":"getCompanyAccountingApBill","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a bill","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Every PATCH, including a partial header-only edit, requires bill.expected_revision from the last read. Missing or invalid tokens return 422; a stale token returns 409 stale_revision without changing the bill. Reload and review before retrying. Any edit bumps the revision and returns the bill to draft; approvals of earlier revisions no longer count. Replacing lines or changing tax_code_id recalculates use_tax_amount; tax_code_id null while a line has use_tax returns 422. Needs ap_enter. Requires the accounting:write scope.","operationId":"updateCompanyAccountingApBill","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bill":{"properties":{"billed_through":{"format":"date","type":["string","null"]},"commitment_id":{"type":["integer","null"]},"commitment_type":{"type":["string","null"]},"due_date":{"format":"date","type":"string"},"duplicate_override_reason":{"type":["string","null"]},"entity_id":{"type":["integer","null"]},"expected_revision":{"description":"Revision returned by the last bill read; required for every edit.","maximum":2147483647,"minimum":0,"type":"integer"},"inactive_vendor_override_reason":{"description":"Bill a vendor that is inactive in the directory (otherwise 409 vendor_inactive). ap_approve only (403); audited as inactive_vendor_overridden. Credits are not refused.","type":["string","null"]},"invoice_date":{"format":"date","type":"string"},"invoice_number":{"type":["string","null"]},"kind":{"type":"string"},"lines":{"items":{"properties":{"account_id":{"type":"integer"},"amount":{"type":"string"},"commitment_line_item_id":{"type":["integer","null"]},"cost_code_id":{"type":["integer","null"]},"cost_type_id":{"type":["integer","null"]},"description":{"type":["string","null"]},"dimension_value_ids":{"description":"User-defined dimension values (AcctDimensionValue ids), at most one per dimension; see oas-dimensions.json.","items":{"minimum":1,"type":"integer"},"maxItems":20,"type":["array","null"]},"equipment_id":{"type":["integer","null"]},"project_id":{"type":["integer","null"]},"quantity":{"type":["string","null"]},"reportable_1099":{"type":"boolean"},"retainage_amount":{"description":"Explicit retainage (at most the line amount); overrides retainage_percent.","type":["string","null"]},"retainage_percent":{"type":["string","null"]},"tax_category":{"enum":["material","fixture","labor","equipment",null],"type":["string","null"]},"unit_price":{"type":["string","null"]},"use_tax":{"description":"Omitted on an untaxed material line of a job whose tax profile accrues use tax (consumer states such as CA): defaults to true, and the bill tax code defaults to the job use tax code.","type":"boolean"}},"required":["account_id","amount"],"type":"object"},"type":"array"},"memo":{"type":["string","null"]},"off_rent_date":{"format":"date","type":["string","null"]},"pay_when_paid_mode":{"type":["string","null"]},"pay_when_paid_pay_app_id":{"type":["integer","null"]},"posting_date":{"format":"date","type":"string"},"retainage_percent":{"type":["string","null"]},"tax_code_id":{"type":["integer","null"]},"term_id":{"type":["integer","null"]},"vendor_id":{"type":"integer"}},"required":["expected_revision"],"type":"object"}},"required":["bill"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (stale_revision or duplicate_suspected)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Edit a draft or pending bill","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/bills/{id}/apply_credit":{"post":{"description":"The path id is the credit. Same vendor, both posted; no GL effect. Requires the accounting:write scope.","operationId":"applyCreditCompanyAccountingApBill","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"application":{"properties":{"amount":{"type":"string"},"bill_id":{"type":"integer"},"date":{"format":"date","type":"string"}},"required":["bill_id","amount","date"],"type":"object"}},"required":["application"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Apply a vendor credit to a bill","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/bills/{id}/approve":{"post":{"description":"Needs ap_approve. Segregation of duties: the preparer or last editor cannot approve (403 sod_maker_checker); one vote per user per revision (409 already_approved). The route comes from the lowest-priority active ap_bill approval rule matching the bill (amount, entity, project, vendor risk); with none, amount bands set the number of approvals and the final approver role. The route is snapshotted at submit. A caller not on the current step gets 403 approver_role_required unless an active delegation lets them act for someone who is. The final approval posts the bill (Dr cost / Cr AP / Cr retainage payable, use tax accrual) in the same transaction; a match exception returns 409 match_exception. In small-team SoD mode (settings sod_mode) a maker may approve their own document by sending approve.reason; the event is audited as self_approved and listed by approvals/self_approved. Requires the accounting:write scope.","operationId":"approveCompanyAccountingApBill","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"approve":{"additionalProperties":false,"properties":{"reason":{"description":"Required only to approve your own document in small-team SoD mode (422 self_approval_reason_required); the approval is flagged self_approved.","maxLength":500,"minLength":3,"type":"string"}},"type":"object"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Approve a bill","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/bills/{id}/attachments":{"get":{"description":"Oldest first. Needs view_ledger and the parent's entity scope. Requires the accounting:read scope.","operationId":"listCompanyAccountingApBillAttachments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctAttachment"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"List attachments on a bill","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Multipart upload (one `file` part, allow-listed type, up to MAX_UPLOAD_BYTES). Allowed after posting: attachments are not ledger data. Writes an attachment_added audit event on the parent in the same transaction. Needs ap_enter and the parent's entity scope. Requires the accounting:write scope.","operationId":"createCompanyAccountingApBillAttachment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctAttachment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused for a different request or still in progress"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Request body too large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing file, empty file, too large, or a type that is not allowed"}},"summary":"Attach a file to a bill","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/bills/{id}/override_hold":{"post":{"description":"Needs ap_approve (and release_payments for payment holds). Audited with the reason. The preparer cannot override; the bank-change cool-off cannot be overridden. Requires the accounting:write scope. expires_at (optional date) limits the override to pay dates on or before it, so a later lapse holds again. Code match_exception also overrides every open three-way match exception on the bill (each audited with the reason).","operationId":"overrideHoldCompanyAccountingApBill","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"override":{"properties":{"code":{"type":"string"},"expires_at":{"format":"date","type":["string","null"]},"reason":{"type":"string"}},"required":["code","reason"],"type":"object"}},"required":["override"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Override a hold","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/bills/{id}/reject":{"post":{"description":"Needs ap_approve and the bill's entity. A pending_approval bill returns to draft with a new revision, so votes on the rejected revision are spent and resubmission routes afresh. The reason is required and audited (action rejected); the preparer sees it in their approvals inbox. Requires the accounting:write scope.","operationId":"rejectCompanyAccountingApBill","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reject":{"additionalProperties":false,"properties":{"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}},"required":["reject"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Reject a bill (return to the preparer)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/bills/{id}/release_retainage":{"post":{"description":"Needs ap_approve. Posts Dr retainage payable / Cr AP. A final release needs the vendor's conditional final, prior unconditional progress and every lower tier's unconditional final waiver (422 missing_closeout_docs); pay-when-paid bills need owner_released. Send an Idempotency-Key: a retried partial release otherwise releases twice. Void a release with POST ap/retainage_releases/{id}/void. Requires the accounting:write scope.","operationId":"releaseRetainageCompanyAccountingApBill","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"release":{"properties":{"amount":{"type":"string"},"date":{"format":"date","type":"string"},"final":{"type":"boolean"},"lower_tier_parties":{"items":{"type":"string"},"type":"array"},"owner_released":{"type":"boolean"}},"required":["date"],"type":"object"}},"required":["release"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Release retainage payable","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/bills/{id}/rematch":{"post":{"description":"Re-evaluates a bill pending approval on live figures (receipts, other posted bills, approved change orders, the current match policy): exceptions no longer found are resolved (re_evaluated), new ones open and hold the bill. Receipts, bill posts and voids on the same commitment do this automatically. Needs ap_enter. 422 not_pending for any other status. Requires the accounting:write scope.","operationId":"rematchCompanyAccountingApBill","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Re-run the three-way match","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/bills/{id}/submit":{"post":{"description":"Runs the commitment / three-way match and stores the result; over-commitment with action block returns 409. Resolves and snapshots the approval route (409 approver_unresolved when no project-team member for a project-role step can approve, or a named user approver prepared the bill or lacks the approve grant). Requires the accounting:write scope.","operationId":"submitCompanyAccountingApBill","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Submit a bill for approval","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/bills/{id}/unapply_credit":{"post":{"description":"The path id is the credit. Reopens the credit and the bill as of `date` (on or after the application date), so either can be voided; as-of aging before that date still shows the application. No GL effect. Requires the accounting:write scope.","operationId":"unapplyCreditCompanyAccountingApBill","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"application":{"properties":{"application_id":{"type":"integer"},"date":{"format":"date","type":"string"}},"required":["application_id","date"],"type":"object"}},"required":["application"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Undo a vendor credit application","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/bills/{id}/void":{"post":{"description":"Needs ap_approve. Posts a reversing entry on the given date (must be in an open period). Bills with payments, credit applications or retainage releases return 409. Requires the accounting:write scope.","operationId":"voidCompanyAccountingApBill","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"void":{"properties":{"date":{"format":"date","type":"string"},"reason":{"type":"string"}},"required":["date","reason"],"type":"object"}},"required":["void"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Void a posted bill","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/capture/documents":{"get":{"description":"Captured bill documents, oldest first. Filters: status (comma-separated new, in_progress, drafted, rejected), source (upload, email, portal), vendor_id (keyed or suggested), assigned_to_id, unassigned=true, search (number, invoice number, sender, file name). Paginated (Total, Per-Page, Link). Requires the accounting:read scope.","operationId":"listCompanyAccountingApCaptureDocuments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"status","required":false,"schema":{"type":"string"}},{"in":"query","name":"source","required":false,"schema":{"type":"string"}},{"in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"vendor_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"assigned_to_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"unassigned","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApCapturedDocument"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"List the capture inbox","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"One file (multipart field file; optional kind invoice | pay_app and notes) under the accounting attachment size and type rules. Needs ap_enter. The document is checked for duplicates by file hash at once (and by vendor + invoice number once keyed). Nothing is read out of the file: there is no OCR or AI extraction. Requires the accounting:write scope.","operationId":"createCompanyAccountingApCaptureDocument","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"},"kind":{"enum":["invoice","pay_app"],"type":"string"},"notes":{"type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApCapturedDocument"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed body or Idempotency-Key"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state guard)"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"File too large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Upload a bill document to the capture inbox","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/capture/documents/{id}":{"get":{"description":"With its duplicate findings, keyed header, assignment and the bill drafted from it. Requires the accounting:read scope.","operationId":"getCompanyAccountingApCaptureDocument","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApCapturedDocument"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Get a captured document","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Needs ap_enter. Keying vendor, invoice number, date or amount moves a new document to in_progress and re-runs the duplicate check. The assignee must be an active user who can enter AP bills. A drafted or rejected document is final (409 capture_closed). Audited with the values before and after. Requires the accounting:write scope.","operationId":"updateCompanyAccountingApCaptureDocument","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"captured_document":{"properties":{"amount":{"type":["string","null"]},"assigned_to_id":{"type":["integer","null"]},"invoice_date":{"format":"date","type":["string","null"]},"invoice_number":{"type":["string","null"]},"kind":{"enum":["invoice","pay_app"],"type":"string"},"notes":{"type":["string","null"]},"status":{"enum":["new","in_progress"],"type":"string"},"vendor_id":{"type":["integer","null"]}},"required":[],"type":"object"}},"required":["captured_document"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApCapturedDocument"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state guard)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Key, assign or progress a captured document","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/capture/documents/{id}/draft_bill":{"post":{"description":"Needs ap_enter. The AP bill body with the clerk's manual coding; vendor_id and invoice_date default to the keyed header, invoice_number too. The bill must name the keyed vendor (422 vendor_mismatch) and, when an amount was keyed, its lines must total it (422 amount_mismatch). The usual vendor + invoice number duplicate check applies (409 duplicate_suspected unless an AP approver overrides). Creates an unapproved draft bill with a copy of the file, closes the document as drafted, and audits both; the drafter is a maker of the bill and cannot approve it. Requires the accounting:write scope.","operationId":"draftBillCompanyAccountingApCaptureDocument","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bill":{"properties":{"billed_through":{"format":"date","type":["string","null"]},"commitment_id":{"type":["integer","null"]},"commitment_type":{"type":["string","null"]},"due_date":{"format":"date","type":"string"},"duplicate_override_reason":{"type":["string","null"]},"entity_id":{"type":["integer","null"]},"invoice_date":{"format":"date","type":"string"},"invoice_number":{"type":["string","null"]},"kind":{"type":"string"},"lines":{"items":{"properties":{"account_id":{"type":"integer"},"amount":{"type":"string"},"commitment_line_item_id":{"type":["integer","null"]},"cost_code_id":{"type":["integer","null"]},"cost_type_id":{"type":["integer","null"]},"description":{"type":["string","null"]},"equipment_id":{"type":["integer","null"]},"project_id":{"type":["integer","null"]},"quantity":{"type":["string","null"]},"reportable_1099":{"type":"boolean"},"retainage_amount":{"description":"Explicit retainage (at most the line amount); overrides retainage_percent.","type":["string","null"]},"retainage_percent":{"type":["string","null"]},"tax_category":{"enum":["material","fixture","labor","equipment",null],"type":["string","null"]},"unit_price":{"type":["string","null"]},"use_tax":{"description":"Omitted on an untaxed material line of a job whose tax profile accrues use tax (consumer states such as CA): defaults to true, and the bill tax code defaults to the job use tax code.","type":"boolean"}},"required":["account_id","amount"],"type":"object"},"type":"array"},"memo":{"type":["string","null"]},"off_rent_date":{"format":"date","type":["string","null"]},"pay_when_paid_mode":{"type":["string","null"]},"pay_when_paid_pay_app_id":{"type":["integer","null"]},"posting_date":{"format":"date","type":"string"},"retainage_percent":{"type":["string","null"]},"tax_code_id":{"type":["integer","null"]},"term_id":{"type":["integer","null"]},"vendor_id":{"type":"integer"}},"required":["lines"],"type":"object"}},"required":["bill"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"bill":{"properties":{"id":{"type":"integer"},"links":{"type":"object"},"number":{"type":"string"},"status":{"type":"string"},"total":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"type":"object"},"captured_document":{"$ref":"#/components/schemas/accounting_ApCapturedDocument"}},"required":["captured_document","bill"],"type":"object"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state guard)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Draft a bill from a captured document","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/capture/documents/{id}/file":{"get":{"description":"Always sent as an attachment (application/octet-stream), never rendered inline. Requires the accounting:read scope.","operationId":"listCompanyAccountingApCaptureDocumentFile","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The file"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Download a captured file","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/capture/documents/{id}/reject":{"post":{"description":"Needs ap_enter and a reason (3-500 characters). Final; audited. Requires the accounting:write scope.","operationId":"rejectCompanyAccountingApCaptureDocument","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reject":{"properties":{"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}},"required":["reject"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApCapturedDocument"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state guard)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Reject a captured document","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/capture/documents/{id}/suggestions":{"get":{"description":"Fixed rules only (no model): the vendor (keyed, the portal grant's vendor, or the sender rule), the coding of its last 50 posted bills in the caller's entities ranked by bills that used it then recency, its default expense account, and its open purchase order and subcontract lines (amount less posted billing). vendor_id overrides the vendor. Requires the accounting:read scope.","operationId":"listCompanyAccountingApCaptureDocumentSuggestions","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"vendor_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApCaptureSuggestions"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Coding suggestions for a captured document","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/checks/{id}/reprint":{"post":{"description":"Needs release_payments. Voids the AP check's register row (positive pay sends the void when the issue was sent) and registers the same check under the bank account's next check number; the payment and its journal entry are unchanged. Audited. Requires the accounting:write scope.","operationId":"reprintCompanyAccountingApCheck","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reprint":{"properties":{"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}},"required":["reprint"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"ap_payment_id":{"type":"integer"},"check_number":{"type":"string"},"id":{"type":"integer"},"status":{"type":"string"}},"required":["id","check_number","ap_payment_id","amount","status"],"type":"object"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Reprint a check under a new number","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/compliance_requirements":{"get":{"description":"Requirements that apply to every vendor, one vendor or one commitment. vendor_id narrows to that vendor's and the company-wide ones. Requires the accounting:read scope.","operationId":"listCompanyAccountingApComplianceRequirements","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"vendor_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApComplianceRequirement"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"}},"summary":"List compliance requirements","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Needs ap_approve. A vendor (or every vendor when vendor_id is null, or the vendor on a commitment) must keep a current, active record of this kind; otherwise its bills carry the compliance_missing payment hold. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingApComplianceRequirement","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"compliance_requirement":{"properties":{"commitment_id":{"type":["integer","null"]},"commitment_type":{"enum":["WorkOrderContract","PurchaseOrderContract",null],"type":["string","null"]},"kind":{"enum":["coi","w9","license","prequalification","stop_pay"],"type":"string"},"notes":{"type":["string","null"]},"vendor_id":{"type":["integer","null"]}},"required":["kind"],"type":"object"}},"required":["compliance_requirement"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApComplianceRequirement"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Require a compliance document","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/compliance_requirements/{id}":{"delete":{"description":"Needs ap_approve. Audited. Requires the accounting:write scope.","operationId":"deleteCompanyAccountingApComplianceRequirement","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Drop a compliance requirement","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/form_1099":{"get":{"description":"Payments to 1099 vendors by payment date: AP payments plus posted banking checks and withdrawals to 1099 vendors (expense-coded lines with reportable_1099; card charges are 1099-K and excluded), line-level reportable overrides, the 2026 $2,000 NEC threshold, backup withholding in box 4. Forms are grouped per payer entity and vendor. Requires the accounting:read scope. Corporations and exempt payees (W-9 tax_classification) get no NEC/MISC; owner-direct payments are excluded. explain names each source document.","operationId":"listCompanyAccountingApForm1099","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"","in":"query","name":"year","required":false,"schema":{"type":"integer"}},{"description":"Only this payer entity. Each entity is its own payer: forms are per (entity, vendor) with the threshold per payer.","in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApForm1099"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"}},"summary":"1099 review","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/form_1099/copy_b":{"get":{"description":"PDF statement for one vendor from one payer entity: the payer's full EIN and the recipient's truncated TIN, marked CORRECTED when the live amounts differ from what was filed. manage_vendor_banking; audited. Requires the accounting:read scope.","operationId":"listCompanyAccountingApForm1099CopyB","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"year","required":true,"schema":{"type":"integer"}},{"in":"query","name":"entity_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"vendor_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"PDF"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access or missing manage_vendor_banking"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No required 1099 for this vendor and payer"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"year, entity_id and vendor_id are required, or the payer entity lacks its tax identity"}},"summary":"1099 recipient Copy B","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/form_1099/iris":{"post":{"description":"Builds the IRIS Taxpayer Portal CSV upload (IRS Pub 5717 Rev. 9-2026) for one form type from the year's 1099 data (W-9 tax classification applied; owner-direct payments excluded). Pass the header row of the CSV template downloaded from the portal for that tax year and form; it is written back byte for byte and each column is filled by name. Returns are split into files of at most 250 (Pub 5717 §3.5.1). A missing payee TIN (tin_missing), an unknown required template column, or corrected: true (portal corrections go through Make a Correction, iris_correction_portal_only) is refused with 422. Payee TINs are decrypted, so it needs manage_vendor_banking; every export is audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingApForm1099Iri","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"iris":{"additionalProperties":false,"properties":{"corrected":{"description":"Refused: the portal CSV has no corrected-return column","type":"boolean"},"entity_id":{"description":"The payer entity; required when forms span several entities.","minimum":1,"type":["integer","null"]},"form":{"enum":["NEC","MISC"],"type":"string"},"issuer":{"additionalProperties":false,"description":"Overrides the entity tax identity (EIN, legal name, address, phone) for a one-entity export. Omitted, the issuer comes from the entity.","properties":{"address":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"name":{"type":"string"},"name2":{"type":"string"},"phone":{"type":"string"},"state":{"type":"string"},"tin":{"type":"string"},"tin_type":{"enum":["EIN","SSN"],"type":"string"},"zip":{"type":"string"}},"required":["tin","name","address","city","state","zip"],"type":"object"},"template":{"description":"The CSV template downloaded from the IRIS Taxpayer Portal for this tax year and form (only its first line, the header row, is used)","maxLength":20000,"type":"string"},"year":{"maximum":2100,"minimum":2022,"type":"integer"}},"required":["year","form","template"],"type":"object"}},"required":["iris"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"files":{"items":{"properties":{"csv":{"description":"CSV text: the template header row, then one row per return, CRLF line endings","type":"string"},"filename":{"type":"string"},"records":{"description":"Returns in this file (header row excluded), at most 250","type":"integer"}},"required":["filename","records","csv"],"type":"object"},"type":"array"},"form":{"enum":["NEC","MISC"],"type":"string"},"warnings":{"items":{"type":"string"},"type":"array"},"year":{"type":"integer"}},"required":["year","form","files","warnings"],"type":"object"}}},"description":"IRIS CSV files"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, no vendor needs this form, a payee TIN, name or address is missing, the template is missing, for another form or has an unknown required column, or a corrected return was requested"}},"summary":"Export 1099s as IRIS Taxpayer Portal CSV files","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/form_1099/pub1220":{"post":{"description":"Builds the FIRE file for one form type from the year's 1099 data (W-9 tax classification applied; owner-direct payments excluded). Payee TINs are decrypted, so it needs manage_vendor_banking; every export is audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingApForm1099Pub1220","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"pub1220":{"properties":{"corrected":{"description":"Only the forms whose amounts changed since they were filed, flagged G (one-step correction); refused when nothing changed.","type":"boolean"},"entity_id":{"description":"Only this payer entity; omitted, one issuer (A) record per entity with forms.","minimum":1,"type":["integer","null"]},"form":{"enum":["NEC","MISC"],"type":"string"},"issuer":{"description":"Overrides the entity tax identity (EIN, legal name, address, phone) for a one-entity export. Omitted, the issuer comes from the entity.","properties":{"address":{"maxLength":40,"type":"string"},"city":{"maxLength":40,"type":"string"},"name":{"maxLength":80,"type":"string"},"phone":{"maxLength":15,"type":"string"},"state":{"maxLength":2,"type":"string"},"tin":{"maxLength":11,"type":"string"},"zip":{"maxLength":10,"type":"string"}},"required":["tin","name","address","city","state","zip","phone"],"type":"object"},"test":{"type":"boolean"},"transmitter":{"properties":{"address":{"maxLength":40,"type":"string"},"city":{"maxLength":40,"type":"string"},"company_name":{"maxLength":80,"type":"string"},"contact_email":{"format":"email","maxLength":50,"type":"string"},"contact_name":{"maxLength":40,"type":"string"},"contact_phone":{"maxLength":15,"type":"string"},"name":{"maxLength":80,"type":"string"},"state":{"maxLength":2,"type":"string"},"tcc":{"maxLength":5,"type":"string"},"tin":{"maxLength":11,"type":"string"},"zip":{"maxLength":10,"type":"string"}},"required":["tin","tcc","name","company_name","address","city","state","zip","contact_name","contact_phone","contact_email"],"type":"object"},"year":{"type":"integer"}},"required":["year","form","transmitter"],"type":"object"}},"required":["pub1220"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"Pub 1220 fixed-width file (750-byte records)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, no vendor needs this form, or the file failed Pub 1220 checks (FIRE is closed for payment years 2026 and later)"}},"summary":"Export 1099s as an IRS Pub 1220 file","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/form_945":{"get":{"description":"Form 945 for one entity (each EIN files its own; entity_id is required). Line 2 is the backup withholding on posted AP payments dated in the year (the liability date is the payment date); line 4 is the debits to the backup withholding account outside reversals (deposits). The deposit schedule comes from line 3 of the second preceding year (computed from the same data, or pass lookback_liability): monthly if 50,000.00 or less, otherwise semiweekly, with the 100,000.00 next-day rule (26 CFR 31.6302-4). Under 2,500.00 for the year no deposits are listed (pay with the return). ledger_withheld is the account's withholding credits less reversals; a difference from line 2 is reported in warnings as withholding_account_mismatch. Requires the accounting:read scope.","operationId":"listCompanyAccountingApForm945","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"year","schema":{"type":"integer"}},{"in":"query","name":"entity_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"lookback_liability","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"deposits":{"items":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"due_date":{"format":"date","type":"string"},"liability_dates":{"items":{"format":"date","type":"string"},"type":"array"},"rule":{"enum":["monthly","semiweekly","next_day"],"type":"string"}},"type":"object"},"type":"array"},"entity_id":{"type":"integer"},"explain":{"type":"object"},"form_945a_required":{"type":"boolean"},"ledger_withheld":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"liability_by_date":{"items":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"date":{"format":"date","type":"string"}},"type":"object"},"type":"array"},"line_7":{"description":"Monthly summary, only for a monthly depositor for the whole year with line 3 of 2,500.00 or more.","properties":{"months":{"items":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"maxItems":12,"minItems":12,"type":"array"},"total":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"type":["object","null"]},"lines":{"description":"Form 945 line 1 (nonpayroll income tax withholding; 0.00 from AP), line 2 backup withholding, 3 = 1 + 2, 4 deposits, 5 balance due, 6 overpayment.","properties":{"1":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"2":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"3":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"4":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"5":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"6":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"type":"object"},"lookback_liability":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"may_pay_with_return":{"type":"boolean"},"schedule":{"enum":["monthly","semiweekly"],"type":"string"},"warnings":{"items":{"type":"string"},"type":"array"},"year":{"type":"integer"}},"required":["year","entity_id","lines","line_7","form_945a_required","schedule","lookback_liability","may_pay_with_return","liability_by_date","deposits","ledger_withheld","warnings","explain"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, no vendor needs this form, a payee TIN, name or address is missing, the template is missing, for another form or has an unknown required column, or a corrected return was requested"}},"summary":"Form 945 data","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/form_945/eftps":{"post":{"description":"EFTPS ACH-credit deposit records for the computed Form 945 deposits: tax type 09455, tax period end December 31, TXP addenda with the total. 422 entity_ein_missing when the entity has no EIN; 422 no_945_deposits when nothing is due (under 2,500.00: pay with the return). The entity EIN is decrypted, so it needs manage_vendor_banking; every export is audited (eftps_945_exported). Requires the accounting:write scope.","operationId":"createCompanyAccountingApForm945Eftp","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"form_945":{"additionalProperties":false,"properties":{"entity_id":{"type":"integer"},"lookback_liability":{"type":["string","null"]},"year":{"type":"integer"}},"required":["year","entity_id"],"type":"object"}},"required":["form_945"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"deposits":{"items":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"settlement_date":{"format":"date","type":"string"},"tax_form":{"enum":["945"],"type":"string"},"tax_period_end":{"format":"date","type":"string"},"tax_type_code":{"type":"string"},"txp":{"type":"string"}},"type":"object"},"type":"array"},"entity_id":{"type":"integer"},"year":{"type":"integer"}},"required":["year","entity_id","deposits"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, no vendor needs this form, a payee TIN, name or address is missing, the template is missing, for another form or has an unknown required column, or a corrected return was requested"}},"summary":"EFTPS 945 deposits","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/match_exceptions":{"get":{"description":"The exception workbench: bill lines (and whole bills) failing the PO, receipt and bill match, oldest first. status and type take comma-separated values (status defaults to open). min_age and max_age are whole days since detection, inclusive. Limited to the caller's entities; a project-scoped grant gets 403. Paginated (Total, Per-Page, Link headers). Requires the accounting:read scope.","operationId":"listCompanyAccountingApMatchExceptions","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"open, resolved, overridden (comma-separated)","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"qty_over, price_over, no_receipt, no_po, over_commitment (comma-separated)","in":"query","name":"type","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"vendor_id","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"entity_id","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"bill_id","required":false,"schema":{"type":"integer"}},{"description":"Days since detection, at least","in":"query","name":"min_age","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"Days since detection, at most","in":"query","name":"max_age","required":false,"schema":{"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApMatchException"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"List three-way match exceptions","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/ap/match_exceptions/{id}":{"get":{"description":"The exception with its PO line, the receipts on that line, other bills on it and the bill line, side by side. Requires the accounting:read scope.","operationId":"getCompanyAccountingApMatchException","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApMatchExceptionShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a match exception","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/match_exceptions/{id}/override":{"post":{"description":"Accepts an open exception with a reason (3-500 characters); all_on_bill overrides every open exception on the same bill. Needs ap_approve in the bill's entity; a maker of the bill (preparer, editor or contributor) gets 403 sod_maker_checker. Each overridden exception and the bill get an audit row with the reason. When no open exception is left the bill's match hold is released. 409 not_open when the exception is already resolved or overridden. Requires the accounting:write scope.","operationId":"overrideCompanyAccountingApMatchException","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"override":{"properties":{"all_on_bill":{"type":"boolean"},"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}},"required":["override"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApMatchExceptionShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Override a match exception","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payment_runs":{"get":{"description":"Paginated. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingApPaymentRuns","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApPaymentRun"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"}},"summary":"List payment runs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Needs ap_enter. Explicit payments (method, joint payees, owner-direct) or every unheld bill due by due_by. Held bills are listed and never paid; backup withholding (24%) applies to 1099 vendors with no TIN. Requires the accounting:write scope. The owner_direct method is refused (422 owner_direct_unavailable) until it posts through AR.","operationId":"createCompanyAccountingApPaymentRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"payment_run":{"properties":{"cash_account_id":{"type":["integer","null"]},"due_by":{"format":"date","type":"string"},"memo":{"type":["string","null"]},"pay_date":{"format":"date","type":"string"},"payments":{"items":{"properties":{"bills":{"items":{"properties":{"amount":{"type":"string"},"bill_id":{"type":"integer"}},"required":["bill_id"],"type":"object"},"type":"array"},"customer_id":{"type":["integer","null"]},"joint_payees":{"items":{"properties":{"amount":{"type":"string"},"name":{"type":"string"}},"required":["name","amount"],"type":"object"},"type":"array"},"method":{"type":"string"},"vendor_id":{"type":"integer"}},"required":["vendor_id","bills"],"type":"object"},"type":"array"},"vendor_ids":{"items":{"type":"integer"},"type":"array"}},"required":["pay_date"],"type":"object"}},"required":["payment_run"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApPaymentRunCreated"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Create a draft payment run","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payment_runs/{id}":{"delete":{"description":"Needs ap_enter. Requires the accounting:write scope.","operationId":"deleteCompanyAccountingApPaymentRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Delete a draft run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"get":{"description":"Payments with their bill applications. Requires the accounting:read scope.","operationId":"getCompanyAccountingApPaymentRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApPaymentRun"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a payment run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payment_runs/{id}/checks":{"get":{"description":"Needs release_payments. Generated on demand, never stored; a joint check prints both payees. Check numbers come from the shared check register; voided checks are left out. Contains the MICR line (routing and account number), so it requires the accounting:write scope. A released check missing from the register returns 409 check_not_registered. Audited.","operationId":"listCompanyAccountingApPaymentRunChecks","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"pdf returns printable checks (one Letter page per check: check on top, two stubs, the MICR line in font-mapped form for a MICR toner printer or overlay)","in":"query","name":"format","required":false,"schema":{"enum":["json","pdf"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApCheck"},"type":"array"}},"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A released check is not in the check register (check_not_registered)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Check print data","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payment_runs/{id}/nacha":{"get":{"description":"Needs release_payments. Vendor credits for the run's ACH payments, batched by SEC code from the vendor's bank_account_ownership (CCD+ to business accounts, PPD to consumer accounts), originating from the pay-from bank account's routing. Generated once (file id modifier A); the generation time, modifier and each payment's trace number are recorded and audited. A second generation is refused with 409 ach_already_generated: use POST to re-send. ACH payments pay the vendor bank details snapshotted at release; if the vendor profile changed since, 409 bank_changed_since_release (void the payment and pay it in a new run). An account blocked by an ACH return is refused (409 ach_account_blocked); an account whose prenote has not settled three banking days before the pay date is refused (409 ach_prenote_pending); with ach_prenote_required on, an account never prenoted is refused (409 ach_prenote_required). Requires the accounting:write scope. A file generated after the pay date carries the next Fed banking day as its effective entry date (X-Ach-Effective-Date, X-Ach-Warning). The pay-from bank is revalidated under lock at generation and resend: inactive or credit-card accounts return 422 not_a_bank_account; a bank assigned to a different payment entity returns 422 bank_entity_mismatch. Refusal leaves generation, trace and resend state unchanged.","operationId":"listCompanyAccountingApPaymentRunNacha","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"OK","headers":{"X-Ach-Effective-Date":{"description":"Batch effective entry date: the pay date, or the next Fed banking day when the pay date has passed.","schema":{"format":"date","type":"string"}},"X-Ach-Warning":{"description":"Present when a passed pay date was rolled forward to the next banking day.","schema":{"type":"string"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already generated (ach_already_generated)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"ACH (NACHA) file","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Explicit two-person re-send: resend.action=request records the request (202, no file); resend.action=confirm by an independent releaser returns the new file. Both require resend.previous_file_id_modifier equal to the current payment-run ach_file_id_modifier. Missing fields are 422; a stale modifier, request when one is already pending, or confirmation without a pending request is 409. Refresh GET payment_runs/{id} to inspect ach_resend_requested_by_id and ach_resend_reason before confirming. Reason-only legacy requests are no longer accepted. Needs release_payments and two people. The first call records the re-send request and its reason (202, no file). A second call by a different release_payments user, who is neither the requester nor the run preparer (403 sod_resend otherwise), regenerates the run's NACHA file with the next file id modifier (B, C…) so the bank sees a distinct file, records the new trace numbers and writes an ach_resent audit row with both reasons. At most 2 re-sends per run (409 ach_resend_limit). Refused (422) before the first generation. ACH payments pay the vendor bank details snapshotted at release; if the vendor profile changed since, 409 bank_changed_since_release (void the payment and pay it in a new run). Requires the accounting:write scope. A file generated after the pay date carries the next Fed banking day as its effective entry date (X-Ach-Effective-Date, X-Ach-Warning). The pay-from bank is revalidated under lock at generation and resend: inactive or credit-card accounts return 422 not_a_bank_account; a bank assigned to a different payment entity returns 422 bank_entity_mismatch. Refusal leaves generation, trace and resend state unchanged.","operationId":"nachaCompanyAccountingApPaymentRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"resend":{"additionalProperties":false,"properties":{"action":{"description":"Explicit workflow intent; requesting cannot confirm an existing request.","enum":["request","confirm"],"type":"string"},"previous_file_id_modifier":{"description":"Current ach_file_id_modifier from the payment run. Both requester and confirmer must acknowledge the file being replaced.","pattern":"^[A-Z0-9]$","type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason","action","previous_file_id_modifier"],"type":"object"}},"required":["resend"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"OK","headers":{"X-Ach-Effective-Date":{"description":"Batch effective entry date: the pay date, or the next Fed banking day when the pay date has passed.","schema":{"format":"date","type":"string"}},"X-Ach-Warning":{"description":"Present when a passed pay date was rolled forward to the next banking day.","schema":{"type":"string"}}}},"202":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"status":{"enum":["resend_requested"],"type":"string"}},"required":["status","message"],"type":"object"}}},"description":"Re-send requested; a second user must confirm it"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Another generation ran at the same time"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Re-send the ACH (NACHA) file","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payment_runs/{id}/positive_pay":{"get":{"description":"Needs release_payments. The run's checks from the shared check register (the same register banking positive pay reads): issued checks, plus a void record for a check voided after its issue record was sent; a void never sent is left out. Account number from the pay-from bank account. Marks the checks sent; audited. Requires the accounting:write scope.","operationId":"listCompanyAccountingApPaymentRunPositivePay","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Positive pay file (CSV)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payment_runs/{id}/reject":{"post":{"description":"Needs release_payments and every payment's entity. Spends the release votes recorded so far on a draft run (the run stays a draft for its preparer to fix or delete). The reason is required and audited (action rejected). Requires the accounting:write scope.","operationId":"rejectCompanyAccountingApPaymentRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reject":{"additionalProperties":false,"properties":{"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}},"required":["reject"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApPaymentRun"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Reject a payment run release","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payment_runs/{id}/release":{"post":{"description":"Needs release_payments. The releaser must not be the run's preparer nor have entered any bill in it (403 sod_release). Release is the payment_batch approval: with no matching approval rule one release posts the run; when a rule routes the batch (for example 2 of 3 named releasers), each call fills one slot of the current step (403 approver_role_required when the caller is not on it, 409 already_approved on a second vote) and the run stays draft until the route completes. The call that completes the route re-checks holds and open amounts, numbers checks and posts each payment (Dr AP / Cr cash, discounts, backup withholding). In small-team SoD mode (settings sod_mode) a maker may approve their own document by sending approve.reason; the event is audited as self_approved and listed by approvals/self_approved. Requires the accounting:write scope.","operationId":"releaseCompanyAccountingApPaymentRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"approve":{"additionalProperties":false,"properties":{"reason":{"description":"Required only to approve your own document in small-team SoD mode (422 self_approval_reason_required); the approval is flagged self_approved.","maxLength":500,"minLength":3,"type":"string"}},"type":"object"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApPaymentRun"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Release (approve) and post a payment run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payment_selection":{"get":{"description":"Open posted bills due by due_by with their holds, the amount payable now (pay-when-paid aware) and any early-pay discount on pay_date. Requires the accounting:read scope.","operationId":"listCompanyAccountingApPaymentSelection","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"","in":"query","name":"pay_date","required":false,"schema":{"format":"date","type":"string"}},{"description":"","in":"query","name":"due_by","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApPaymentCandidate"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"}},"summary":"Payment selection","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payments":{"get":{"description":"Filters: vendor_id, filters[status]. Paginated. Delta sync: updated_since and/or cursor return changes in ascending (updated_at, id) order with Next-Cursor. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingApPayments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"vendor_id","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"filters[status]","required":false,"schema":{"type":"string"}},{"description":"Delta sync: only rows created or changed at or after this time (ISO 8601 with offset). Switches the list to ascending (updated_at, id) order; page is ignored and Next-Cursor continues it. Re-read with a small overlap (a few seconds) and dedupe by id.","in":"query","name":"updated_since","schema":{"format":"date-time","type":"string"}},{"description":"Opaque keyset cursor from a previous response's Next-Cursor header; each page costs the same however deep it is.","in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApPayment"},"type":"array"}}},"description":"OK","headers":{"Next-Cursor":{"description":"Delta sync only: cursor for the next page, present while a full page came back","schema":{"type":"string"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"}},"summary":"List payments","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Needs ap_enter. One vendor payment against explicit bills, created as a single-payment draft run (the response is the run). A different user releases it with POST .../payment_runs/{id}/release, which numbers checks and posts. Holds, discounts and backup withholding apply as for runs. Requires the accounting:write scope.","operationId":"createCompanyAccountingApPayment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"payment":{"additionalProperties":false,"properties":{"bills":{"items":{"properties":{"amount":{"type":"string"},"bill_id":{"type":"integer"}},"required":["bill_id"],"type":"object"},"type":"array"},"cash_account_id":{"type":["integer","null"]},"customer_id":{"type":["integer","null"]},"joint_payees":{"items":{"properties":{"amount":{"type":"string"},"name":{"type":"string"}},"required":["name","amount"],"type":"object"},"type":"array"},"memo":{"type":["string","null"]},"method":{"type":"string"},"pay_date":{"format":"date","type":"string"},"vendor_id":{"type":"integer"}},"required":["pay_date","vendor_id","bills"],"type":"object"}},"required":["payment"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApPaymentRun"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Create one manual payment","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payments/{id}":{"get":{"description":" Requires the accounting:read scope.","operationId":"getCompanyAccountingApPayment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApPayment"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a payment","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payments/{id}/remittance":{"get":{"description":"The itemized advice (bills paid with invoice numbers, amounts applied, discounts, backup withholding and retainage still held; net equals the payment) and every send of it. Limited to the caller's entities. Requires the accounting:read scope.","operationId":"listCompanyAccountingApPaymentRemittance","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApRemittance"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Get a payment's remittance advice","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payments/{id}/remittance/send":{"post":{"description":"Needs ap_enter. Sends through the email transport (the outbox by default) to `to`, or to the vendor's remittance email and active portal users. Posted payments only. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingApPaymentRemittanceSend","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"remittance":{"properties":{"to":{"format":"email","type":"string"}},"required":[],"type":"object"}},"required":["remittance"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApRemittance"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Email a payment's remittance advice","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payments/{id}/virtual_card/issue":{"post":{"description":"Needs release_payments and step-up. Issues (again) the payment's card locked to the payment amount; the provider returns the same card for the same payment, so a retry never makes a second card. A card whose limit differs from the payment is canceled (issue_failed). 409 when already issued, settled or canceled. Requires the accounting:write scope.","operationId":"createCompanyAccountingApPaymentVirtualCardIssue","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApVirtualCard"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state guard)"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No usable card provider"}},"summary":"Retry a virtual card issue","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/payments/{id}/void":{"post":{"description":"Needs release_payments. Reversal dated in an open period; its bills reopen. A reconciled payment returns 409 reconciled. An ACH payment already sent in a NACHA file (trace number set) returns 422 ach_recall_unconfirmed unless confirm_ach_recalled is true; its bills then carry an ach_return_pending hold until an override records the bank return. Requires the accounting:write scope.","operationId":"voidCompanyAccountingApPayment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"void":{"properties":{"confirm_ach_recalled":{"description":"Required true to void an ACH payment that was already transmitted (the bank recalled or returned it).","type":"boolean"},"date":{"format":"date","type":"string"},"reason":{"type":"string"}},"required":["date","reason"],"type":"object"}},"required":["void"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApPayment"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Void a payment","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/receipts":{"get":{"description":"Filter by commitment_id. Limited to the caller's entities. Paginated. Requires the accounting:read scope.","operationId":"listCompanyAccountingApReceipts","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"commitment_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApReceipt"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"}},"summary":"List PO receipts","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Quantities at PO unit cost, posted in the PO project's entity. With receipt accrual posts Dr cost / Cr received-not-invoiced. Requires the accounting:write scope.","operationId":"createCompanyAccountingApReceipt","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"receipt":{"properties":{"commitment_id":{"type":"integer"},"entity_id":{"description":"Must match the project's assigned entity when it has one; defaults to it, else to the default entity.","type":["integer","null"]},"lines":{"items":{"properties":{"account_id":{"description":"Cost account the accrual debits (postable, not a control account). Defaults to the first material job cost account.","type":["integer","null"]},"commitment_line_item_id":{"type":"integer"},"quantity":{"description":"Greater than zero; with earlier receipts that are not void, at most the PO line quantity (422 over_received).","type":"string"}},"required":["commitment_line_item_id","quantity"],"type":"object"},"type":"array"},"receipt_date":{"format":"date","type":"string"}},"required":["commitment_id","receipt_date","lines"],"type":"object"}},"required":["receipt"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApReceipt"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (over_received, zero quantity, entity mismatch) or the ledger refused the change"}},"summary":"Receive against a purchase order","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/receipts/{id}/void":{"post":{"description":"Reverses its accrual on the given date (an open period); its quantities no longer count as received. Refused while posted bills have invoiced those quantities. Requires ap_approve and the accounting:write scope.","operationId":"voidCompanyAccountingApReceipt","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"void":{"properties":{"date":{"format":"date","type":"string"},"reason":{"type":"string"}},"required":["date","reason"],"type":"object"}},"required":["void"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApReceipt"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (receipt_invoiced: posted bills invoiced the quantities it received)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Void a PO receipt","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/retainage_releases/{id}/void":{"post":{"description":"Needs ap_approve. The path id is the retainage release. Reverses its entry on the given date (open AP period, on or after the release date), sets voided_at and puts the amount back in retainage held, so the bill can be voided. 409 release_paid once the released amount has been paid, 409 bill_in_draft_run while the bill is in a draft payment run. Requires the accounting:write scope.","operationId":"voidCompanyAccountingApRetainageRelease","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"void":{"properties":{"date":{"format":"date","type":"string"},"reason":{"type":"string"}},"required":["date","reason"],"type":"object"}},"required":["void"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBillShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Void a retainage release","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/settings":{"get":{"description":"Matching tolerances, over-commitment action, discount posting, approval bands, hold settings and the default pay-from cash account. Requires the accounting:read scope.","operationId":"listCompanyAccountingApSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApSettings"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"}},"summary":"AP settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Needs manage_coa. Changing a payment control (approval_bands, bank_change_hold_days, ach_company_id, ach_destination_routing) also needs manage_grants (an accounting owner); otherwise 403 control_setting. Resending a control's current value is not a change. Control changes are audited with before and after values. bank_change_hold_days is at least 3. cash_account_id must be the GL account of an active, non-card bank account; routing, account number and check numbers live on that bank account. Requires the accounting:write scope.","operationId":"updateCompanyAccountingApSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"ap_settings":{"properties":{"ach_prenote_required":{"type":"boolean"},"approval_bands":{"items":{"properties":{"approvals":{"type":"integer"},"final_role":{"type":["string","null"]},"min":{"type":"string"}},"required":["min","approvals"],"type":"object"},"type":"array"},"backup_withholding_policy":{"enum":["withhold","hold"],"type":"string"},"bank_change_hold_days":{"description":"Vendor bank-change cool-off in days; never below 3. Changing it needs manage_grants.","maximum":60,"minimum":3,"type":"integer"},"match_cost_type_tolerances":{"description":"Per cost type overrides of the price (match_tolerance_pct/amount) and quantity tolerances; a null or omitted field uses the company value.","items":{"properties":{"cost_type_id":{"type":"integer"},"price_amount":{"type":["string","null"]},"price_pct":{"type":["string","null"]},"qty":{"type":["string","null"]},"qty_pct":{"type":["string","null"]}},"required":["cost_type_id"],"type":"object"},"maxItems":100,"type":"array"},"match_qty_tolerance":{"description":"Three-way match quantity tolerance as an absolute quantity. Default 0 (no quantity tolerance).","type":"string"},"match_qty_tolerance_pct":{"description":"Three-way match quantity tolerance: percent of received-not-invoiced. Both this and match_qty_tolerance must hold (whichever is less). Default 0.","type":"string"},"match_receipt_policy":{"description":"When bill quantities are checked against receipts: receipt_accrual (default; only with receipt accrual and an RNI account), required (every unit-priced PO line) or off.","enum":["receipt_accrual","required","off"],"type":"string"},"match_require_po":{"description":"Job-coded bill lines with no purchase order or subcontract are no_po exceptions. Default false.","type":"boolean"}},"required":[],"type":"object"}},"required":["ap_settings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApSettings"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Update AP settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/tie_out":{"get":{"description":"AP open items and retainage held vs every accounts payable and retainage payable account (the same controls the ap_aging report and period close use), for one entity_id inside the grant (404 outside it) or every entity the grant allows. Reports differences; never repairs. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingApTieOut","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"","in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}},{"description":"One entity inside the caller's grant; default every entity the grant allows.","in":"query","name":"entity_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApTieOut"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"}},"summary":"AP subledger tie-out","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/tin_matching/export":{"post":{"description":"Builds the IRS e-Services bulk TIN Matching .txt file (Pub 2108 Section 11: TIN TYPE;TIN;NAME;ACCOUNT NUMBER, TIN type 1 = EIN, 2 = SSN, 3 = unknown, at most 100,000 pairs) for every 1099 vendor with a TIN. The account number field is the vendor id so the result file maps back. Vendors without a TIN are listed in skipped. TINs are decrypted, so it needs manage_vendor_banking; exports are rate-limited and audited (tin_match_exported). Requires the accounting:write scope.","operationId":"createCompanyAccountingApTinMatchingExport","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"filename":{"type":"string"},"records":{"type":"integer"},"skipped":{"items":{"properties":{"reason":{"enum":["no_tin"],"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"},"type":"array"},"text":{"type":"string"}},"required":["filename","records","text","skipped"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, no vendor needs this form, a payee TIN, name or address is missing, the template is missing, for another form or has an unknown required column, or a corrected return was requested"}},"summary":"Export an IRS bulk TIN Matching request file","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/tin_matching/import":{"post":{"description":"Reads the IRS result file (each request record with its indicator 0-8 appended) and stores the indicator on the vendor (tin_match_code). Codes 1 (missing or not 9 digits), 2 (not issued) and 3 (name/TIN mismatch) put the vendor's bills on a tin_mismatch payment hold; 0, 6, 7 and 8 are matches; 4 and 5 mean resubmit. A record whose TIN no longer ends like the vendor's TIN on file is skipped as stale_tin; an unknown account is skipped as unknown_vendor. Any unreadable line rejects the whole file with 422 invalid_tin_match_file. Needs manage_vendor_banking; each result is audited (tin_match_result). Requires the accounting:write scope.","operationId":"createCompanyAccountingApTinMatchingImport","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"tin_matching":{"additionalProperties":false,"properties":{"matched_at":{"format":"date","type":"string"},"text":{"type":"string"}},"required":["text","matched_at"],"type":"object"}},"required":["tin_matching"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"applied":{"items":{"properties":{"code":{"maximum":8,"minimum":0,"type":"integer"},"hold":{"type":"boolean"},"status":{"enum":["matched","mismatch","resubmit"],"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"},"type":"array"},"skipped":{"items":{"properties":{"account":{"type":"string"},"line":{"type":"integer"},"reason":{"enum":["unknown_vendor","stale_tin"],"type":"string"}},"type":"object"},"type":"array"}},"required":["applied","skipped"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, no vendor needs this form, a payee TIN, name or address is missing, the template is missing, for another form or has an unknown required column, or a corrected return was requested"}},"summary":"Import IRS bulk TIN Matching results","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendor_portal/bank_change_requests":{"get":{"description":"Needs manage_vendor_banking. Last four digits only. Filter status (pending_review, forwarded, rejected). Paginated. Requires the accounting:read scope.","operationId":"listCompanyAccountingApVendorPortalBankChangeRequests","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"status","required":false,"schema":{"enum":["pending_review","forwarded","rejected"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApBankChangeRequest"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"List portal bank change requests","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendor_portal/bank_change_requests/{id}/forward":{"post":{"description":"Needs manage_vendor_banking and step-up. Puts the vendor's numbers into the party profile's pending sensitive change with the caller as requester (the existing two-person bank change approval): a different manage_vendor_banking user must approve it with step-up (POST party_profiles/{id}/sensitive_change), the forwarder cannot. The vendor needs an accounting profile (409 no_profile). The request's sealed numbers are cleared. 409 not_pending. Audited. Requires the accounting:write scope.","operationId":"forwardCompanyAccountingApVendorPortalBankChangeRequest","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"review":{"properties":{"note":{"type":["string","null"]}},"required":[],"type":"object"}},"required":["review"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBankChangeRequest"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state guard)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Forward a bank change request for approval","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendor_portal/bank_change_requests/{id}/reject":{"post":{"description":"Needs manage_vendor_banking and a note. The sealed numbers are discarded. Audited. Requires the accounting:write scope.","operationId":"rejectCompanyAccountingApVendorPortalBankChangeRequest","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"review":{"properties":{"note":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["note"],"type":"object"}},"required":["review"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApBankChangeRequest"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state guard)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Reject a bank change request","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendor_portal/grants":{"get":{"description":"Active and revoked grants. Filter vendor_id. Paginated. Requires the accounting:read scope.","operationId":"listCompanyAccountingApVendorPortalGrants","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"vendor_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApPortalGrant"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"}},"summary":"List vendor portal users","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendor_portal/grants/{id}/revoke":{"post":{"description":"Needs ap_approve and a note. Every later portal request of that grant is refused. Audited. Requires the accounting:write scope.","operationId":"revokeCompanyAccountingApVendorPortalGrant","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"revoke":{"properties":{"note":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["note"],"type":"object"}},"required":["revoke"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApPortalGrant"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Revoke a vendor portal user's access","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendor_portal/invitations":{"get":{"description":"Filter vendor_id. Paginated. Requires the accounting:read scope.","operationId":"listCompanyAccountingApVendorPortalInvitations","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"vendor_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApPortalInvitation"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"}},"summary":"List vendor portal invitations","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Needs ap_approve; an admin role (may request bank changes) also needs manage_vendor_banking and step-up. The portal must be enabled (409 portal_disabled). The response carries the one-time secret (43 characters, single use, 7 days); it is stored only as a hash and never shown again. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingApVendorPortalInvitation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"invitation":{"properties":{"email":{"format":"email","type":"string"},"name":{"maxLength":200,"minLength":1,"type":"string"},"role":{"enum":["member","admin"],"type":"string"},"vendor_id":{"type":"integer"}},"required":["vendor_id","email","name"],"type":"object"}},"required":["invitation"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApPortalInvitationCreated"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state guard)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Invite a user to a vendor's portal","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendor_portal/invitations/{id}/revoke":{"post":{"description":"Needs ap_approve and a note. Audited. Requires the accounting:write scope.","operationId":"revokeCompanyAccountingApVendorPortalInvitation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"revoke":{"properties":{"note":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["note"],"type":"object"}},"required":["revoke"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApPortalInvitation"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Revoke a pending invitation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendor_portal/submissions":{"get":{"description":"COIs and lien waivers uploaded through the portal. Filter status (pending, accepted, rejected). Paginated. Requires the accounting:read scope.","operationId":"listCompanyAccountingApVendorPortalSubmissions","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"status","required":false,"schema":{"enum":["pending","accepted","rejected"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApComplianceSubmission"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"List portal compliance submissions","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendor_portal/submissions/{id}/accept":{"post":{"description":"Needs ap_enter. Creates the COI compliance record or the lien waiver from the vendor's statement (a waiver's project, payment and received date may be corrected), copies the file onto it and closes the submission. Until then it counts toward nothing. 409 not_pending. Audited. Requires the accounting:write scope.","operationId":"acceptCompanyAccountingApVendorPortalSubmission","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"review":{"properties":{"note":{"type":"string"},"payment_id":{"type":["integer","null"]},"project_id":{"type":["integer","null"]},"received_at":{"format":"date","type":"string"}},"required":[],"type":"object"}},"required":["review"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApComplianceSubmission"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state guard)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Accept a portal compliance submission","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendor_portal/submissions/{id}/reject":{"post":{"description":"Needs ap_enter and a note the vendor sees. 409 not_pending. Audited. Requires the accounting:write scope.","operationId":"rejectCompanyAccountingApVendorPortalSubmission","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"review":{"properties":{"note":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["note"],"type":"object"}},"required":["review"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApComplianceSubmission"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state guard)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Reject a portal compliance submission","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendors":{"get":{"description":"Vendors with an accounting profile: compliance status, open balance and retainage held. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingApVendors","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"search","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApVendor"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"}},"summary":"List AP vendors","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendors/{id}":{"get":{"description":"The path id is the core vendor id. Requires the accounting:read scope.","operationId":"getCompanyAccountingApVendor","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApVendorShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show an AP vendor","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendors/{id}/attachments":{"get":{"description":"Oldest first. Needs view_ledger and the parent's entity scope. Requires the accounting:read scope.","operationId":"listCompanyAccountingApVendorAttachments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctAttachment"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"List attachments on a vendor","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Multipart upload (one `file` part, allow-listed type, up to MAX_UPLOAD_BYTES). Allowed after posting: attachments are not ledger data. Writes an attachment_added audit event on the parent in the same transaction. Needs ap_enter and the parent's entity scope. Requires the accounting:write scope.","operationId":"createCompanyAccountingApVendorAttachment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctAttachment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused for a different request or still in progress"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Request body too large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing file, empty file, too large, or a type that is not allowed"}},"summary":"Attach a file to a vendor","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendors/{id}/automation":{"get":{"description":"The remittance advice email and the sender addresses that identify the vendor in the capture inbox. Requires the accounting:read scope.","operationId":"listCompanyAccountingApVendorAutomation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApVendorAutomation"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Get a vendor's remittance and capture settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Needs ap_enter. Audited. Requires the accounting:write scope.","operationId":"automationCompanyAccountingApVendor","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"vendor_automation":{"properties":{"remittance_email":{"format":"email","type":["string","null"]},"sender_addresses":{"items":{"type":"string"},"maxItems":50,"type":"array"}},"required":[],"type":"object"}},"required":["vendor_automation"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApVendorAutomation"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Update a vendor's remittance and capture settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendors/{id}/compliance":{"post":{"description":"COI, W-9, license, prequalification or stop-pay (stop-pay needs ap_approve). A newer COI clears an expired-COI hold. Requires the accounting:write scope.","operationId":"complianceCompanyAccountingApVendor","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"compliance":{"properties":{"effective_at":{"format":"date","type":["string","null"]},"expires_at":{"format":"date","type":["string","null"]},"kind":{"type":"string"},"notes":{"type":["string","null"]},"reference":{"type":["string","null"]}},"required":["kind"],"type":"object"}},"required":["compliance"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApCompliance"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Record a compliance document","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendors/{id}/compliance/{compliance_id}":{"patch":{"description":"Needs ap_approve. Requires the accounting:write scope.","operationId":"updateCompanyAccountingApVendorCompliance","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"compliance_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"compliance":{"properties":{"active":{"type":"boolean"}},"required":["active"],"type":"object"}},"required":["compliance"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApCompliance"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Lift or reinstate a compliance record","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendors/{id}/compliance/{compliance_id}/attachments":{"get":{"description":"Oldest first. Needs view_ledger and the parent's entity scope. Requires the accounting:read scope.","operationId":"listCompanyAccountingApVendorComplianceAttachments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"compliance_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctAttachment"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"List attachments on a vendor compliance record (COI, W-9, license)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Multipart upload (one `file` part, allow-listed type, up to MAX_UPLOAD_BYTES). Allowed after posting: attachments are not ledger data. Writes an attachment_added audit event on the parent in the same transaction. Needs ap_enter and the parent's entity scope. Requires the accounting:write scope.","operationId":"createCompanyAccountingApVendorComplianceAttachment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"compliance_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctAttachment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused for a different request or still in progress"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Request body too large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing file, empty file, too large, or a type that is not allowed"}},"summary":"Attach a file to a vendor compliance record (COI, W-9, license)","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendors/{id}/lien_waivers":{"post":{"description":"party is 'vendor' or a lower-tier party name; payment_no is the vendor's payment sequence on the project. Give payment_id (a posted AP payment to this vendor) for an unconditional waiver: the waiver then covers that payment only (a voided payment never shifts it), payment_no is derived when omitted, and a waiver whose amount is below the payment's net amount on the project is recorded but does not clear the lien-waiver hold. Requires the accounting:write scope.","operationId":"createCompanyAccountingApVendorLienWaiver","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"lien_waiver":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"kind":{"type":"string"},"party":{"type":"string"},"payment_id":{"description":"Posted AP payment the waiver covers","type":["integer","null"]},"payment_no":{"description":"Required unless payment_id is given","type":"integer"},"project_id":{"type":["integer","null"]},"received_at":{"format":"date","type":"string"},"scope":{"type":"string"},"through_date":{"format":"date","type":["string","null"]}},"required":["kind","scope","received_at"],"type":"object"}},"required":["lien_waiver"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApLienWaiver"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Record a lien waiver received","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/vendors/{id}/lien_waivers/{waiver_id}/attachments":{"get":{"description":"Oldest first. Needs view_ledger and the parent's entity scope. Requires the accounting:read scope.","operationId":"listCompanyAccountingApVendorLienWaiverAttachments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"waiver_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctAttachment"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"List attachments on a lien waiver","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Multipart upload (one `file` part, allow-listed type, up to MAX_UPLOAD_BYTES). Allowed after posting: attachments are not ledger data. Writes an attachment_added audit event on the parent in the same transaction. Needs ap_enter and the parent's entity scope. Requires the accounting:write scope.","operationId":"createCompanyAccountingApVendorLienWaiverAttachment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"waiver_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctAttachment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused for a different request or still in progress"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Request body too large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing file, empty file, too large, or a type that is not allowed"}},"summary":"Attach a file to a lien waiver","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ap/virtual_cards":{"get":{"description":"One single-use card per virtual card payment (last four digits only; card numbers are never stored), with issue and settlement state. Limited to the caller's entities. Filter status (comma-separated). Paginated. Requires the accounting:read scope.","operationId":"listCompanyAccountingApVirtualCards","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"status","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApVirtualCard"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"List virtual card payments","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/ap/virtual_cards/sync_settlements":{"post":{"description":"Needs bank_reconcile. Pulls the provider's settlements and posts each once (the settlement id is unique): a withdrawal on the funding bank account, Dr clearing / Cr bank, matched to the one unmatched imported statement line of that amount within 5 days when there is one. A settlement of a different amount, or of a canceled card, is recorded as settlement_mismatch and not posted. Only a fake provider exists (no network call; refused in production). Requires the accounting:write scope.","operationId":"createCompanyAccountingApVirtualCardsSyncSettlement","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"sync":{"type":"object"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"blocked":{"description":"Settlements the ledger refused (for example dated in a closed period). Nothing was recorded for them; the next sync retries them, and the other settlements still post.","type":"integer"},"errors":{"items":{"properties":{"message":{"type":"string"},"settlement_id":{"type":"string"}},"required":["settlement_id","message"],"type":"object"},"type":"array"},"matched":{"type":"integer"},"mismatched":{"type":"integer"},"settled":{"type":"integer"},"skipped":{"type":"integer"}},"required":["settled","matched","mismatched","skipped"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, step-up or MFA required, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No usable card provider"}},"summary":"Sync virtual card settlements","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/approval_delegations":{"get":{"description":"Delegations from or to the caller; every delegation with manage_grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingApprovalDelegations","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApprovalDelegation"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"}},"summary":"List approval delegations","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Lets to_user fill from_user's approval slots between starts_at and ends_at for the listed doc types, up to max_amount and within entity_ids (empty = all). The delegate needs the same approve flag and entity scope, never approves a document they or the delegator prepared, and the step records who they acted for. Delegating your own approvals needs each doc type's approve flag; from_user_id for someone else needs manage_grants and can't name yourself as to_user_id (403 self_delegation); a delegation someone created to themselves never fills a slot. Requires the accounting:write scope.","operationId":"createCompanyAccountingApprovalDelegation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"delegation":{"additionalProperties":false,"properties":{"doc_types":{"items":{"enum":["ap_bill","payment_batch","journal_entry"]},"minItems":1,"type":"array"},"ends_at":{"format":"date-time","type":"string"},"entity_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"from_user_id":{"minimum":1,"type":"integer"},"max_amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":["string","null"]},"reason":{"maxLength":500,"minLength":1,"type":"string"},"starts_at":{"format":"date-time","type":"string"},"to_user_id":{"minimum":1,"type":"integer"}},"required":["to_user_id","doc_types","starts_at","ends_at","reason"],"type":"object"}},"required":["delegation"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApprovalDelegation"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Create an approval delegation","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/approval_delegations/{id}":{"delete":{"description":"The delegator or manage_grants. Requires the accounting:write scope.","operationId":"deleteCompanyAccountingApprovalDelegation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"No content"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Revoke an approval delegation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/approval_rules":{"get":{"description":"Approval routing rules for ap_bill and payment_batch (WORKFLOWS §2), active first by priority. Requires the accounting:read scope.","operationId":"listCompanyAccountingApprovalRules","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ApprovalRule"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"}},"summary":"List approval rules","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Needs manage_grants. Among active rules for a doc type whose every non-empty condition matches (amount in [min_amount, max_amount), any entity, any line project, any vendor risk), the lowest priority routes the document; no match uses the AP approval bands (bills) or a single releaser (payment runs). Steps run in order; each step's approvers are grant:any (anyone with the doc type's approve flag), grant:<role>, project:<team role> (resolved from the project team when the route is snapshotted, leaving out the document's makers and members without the approve flag) or user:<id> (must hold the doc type's approve flag, else 422); quorum defaults to all of them (N-of-M otherwise) and shrinks to the approvers left after resolution. An equal priority among active rules of the doc type is 409 priority_taken. Rules are not edited in place: deactivate and create. Requires the accounting:write scope.","operationId":"createCompanyAccountingApprovalRule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"approval_rule":{"additionalProperties":false,"properties":{"doc_type":{"enum":["ap_bill","payment_batch","journal_entry"]},"entity_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"max_amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":["string","null"]},"min_amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":["string","null"]},"name":{"maxLength":120,"minLength":1,"type":"string"},"priority":{"maximum":10000,"minimum":0,"type":"integer"},"project_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"steps":{"items":{"additionalProperties":false,"properties":{"approvers":{"items":{"pattern":"^(grant:(any|owner|controller|accountant|ap_clerk)|project:[^:]{1,80}|user:\\d{1,10})$","type":"string"},"maxItems":10,"minItems":1,"type":"array"},"quorum":{"maximum":10,"minimum":1,"type":"integer"}},"required":["approvers"],"type":"object"},"maxItems":10,"minItems":1,"type":"array"},"vendor_risk":{"items":{"enum":["new_vendor","compliance_hold","bank_changed"]},"type":"array"}},"required":["doc_type","name","priority","steps"],"type":"object"}},"required":["approval_rule"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ApprovalRule"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (duplicate_suspected, match_exception, a payment hold, already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Create an approval rule","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/approval_rules/{id}":{"delete":{"description":"Needs manage_grants. Documents already routed keep the steps they snapshotted. Requires the accounting:write scope.","operationId":"deleteCompanyAccountingApprovalRule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"No content"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Deactivate an approval rule","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/approvals/escalation/history":{"get":{"description":"Every reminder and escalation of one approval item (all revisions), newest first, with recipients, re-routed steps and who was left out and why. Needs view_ledger and the item's entities in scope (404 otherwise); refused to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingApprovalsEscalationHistory","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"doc_type","required":true,"schema":{"enum":["ap_bill","payment_batch","journal_entry","bank_transfer","vendor_bank_change","budget","fx_revaluation"]}},{"in":"query","name":"doc_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Escalation"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access or a project-scoped grant"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Item not found or outside the viewer's scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid query"}},"summary":"Approval escalation history of an item","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/approvals/escalation/policies":{"get":{"description":"One policy per item kind. Needs view_ledger; refused to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingApprovalsEscalationPolicies","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_EscalationPolicy"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access or a project-scoped grant"}},"summary":"List approval escalation policies","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Create or replace the policy of one item kind (natural key: doc_type; 201 when created, 200 when replaced). target: next_role, principal, role:controller, role:owner or user:<id> (a user target must hold the kind's approve grant). Needs manage_grants and step-up. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingApprovalsEscalationPolicy","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"escalation_policy":{"additionalProperties":false,"properties":{"doc_type":{"enum":["ap_bill","payment_batch","journal_entry","bank_transfer","vendor_bank_change","budget","fx_revaluation"]},"escalate_after_days":{"maximum":60,"minimum":0,"type":"integer"},"is_active":{"type":"boolean"},"max_levels":{"maximum":3,"minimum":1,"type":"integer"},"reminder_every_days":{"maximum":60,"minimum":0,"type":"integer"},"target":{"pattern":"^(next_role|principal|role:(controller|owner)|user:[0-9]{1,10})$","type":"string"}},"required":["doc_type","reminder_every_days","escalate_after_days"],"type":"object"}},"required":["escalation_policy"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EscalationPolicy"}}},"description":"Replaced"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EscalationPolicy"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants or step-up, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Target user not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The target user cannot approve that kind"}},"summary":"Save an approval escalation policy","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/approvals/escalation/run":{"post":{"description":"The same run as the daily job, as of the company's today: due escalations (re-routing named steps to eligible targets) and due reminders. Idempotent: a reminder or escalation already sent is never sent again. Needs manage_grants. Requires the accounting:write scope.","operationId":"createCompanyAccountingApprovalsEscalationRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EscalationRun"}}},"description":"Run result"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants or read-only workspace"}},"summary":"Run reminders and escalation now","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/approvals/escalation/settings":{"get":{"description":"Whether reminders and escalation run, the business-day calendar and the policy of each item kind. Needs view_ledger; refused to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingApprovalsEscalationSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/accounting_EscalationSettings"},{"properties":{"policies":{"items":{"$ref":"#/components/schemas/accounting_EscalationPolicy"},"type":"array"}},"required":["policies"],"type":"object"}]}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access or a project-scoped grant"}},"summary":"Approval escalation settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"Turn reminders and escalation on or off and set the business days (ISO weekdays) and holidays. Needs manage_grants and step-up (routing is a control, like approval rules). Audited. Requires the accounting:write scope.","operationId":"replaceCompanyAccountingApprovalsEscalationSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"escalation_settings":{"additionalProperties":false,"properties":{"business_days":{"items":{"maximum":7,"minimum":1,"type":"integer"},"maxItems":7,"minItems":1,"type":"array"},"enabled":{"type":"boolean"},"holidays":{"items":{"format":"date","type":"string"},"maxItems":100,"type":"array"}},"required":["enabled","business_days","holidays"],"type":"object"}},"required":["escalation_settings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EscalationSettings"}}},"description":"Saved"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants or step-up, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body"}},"summary":"Save approval escalation settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/approvals/inbox":{"get":{"description":"The caller's open approval slots across journal entries, AP bills and payment runs (directly, or as the delegate of a user within an active delegation), plus pending vendor bank/TIN changes for manage_vendor_banking users, and the caller's own documents an approver returned in the last 30 days (returned). Only documents the approve call would accept are listed. Requires the accounting:read scope.","operationId":"listCompanyAccountingApprovalsInbox","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"properties":{"amount":{"type":["string","null"]},"delegate_of_id":{"description":"Set when the caller acts as this user's delegate.","type":["integer","null"]},"doc_id":{"type":"integer"},"doc_type":{"enum":["ap_bill","payment_batch","journal_entry","vendor_bank_change","period_reopen","bank_transfer","budget","fx_revaluation"]},"exception":{"description":"Why it can't be bulk approved (match exception, self-approval, bank change review).","type":["string","null"]},"label":{"type":"string"},"path":{"description":"In-app path below /companies/{company_id}/accounting.","type":"string"},"submitted_at":{"format":"date-time","type":["string","null"]}},"required":["doc_type","doc_id","label","path"],"type":"object"},"type":"array"},"returned":{"items":{"properties":{"doc_id":{"type":"integer"},"doc_type":{"enum":["ap_bill","payment_batch","journal_entry"]},"label":{"type":"string"},"path":{"type":"string"},"reason":{"type":"string"},"rejected_at":{"format":"date-time","type":"string"},"rejected_by_id":{"type":"integer"}},"type":"object"},"type":"array"}},"required":["items","returned"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Approvals inbox","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/approvals/overdue":{"get":{"description":"Approval items waiting at least their kind's escalation threshold in business days (the reminder cadence when the policy does not escalate; 3 without a policy), longest first, in the viewer's entity scope, with who they wait on and their escalation level. Needs view_ledger; refused to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingApprovalsOverdue","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_OverdueApproval"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access or a project-scoped grant"}},"summary":"Overdue approvals","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/approvals/self_approved":{"get":{"description":"Approvals a maker made on their own document in small-team SoD mode, with the reason (close-checklist review). Needs close_period (403 otherwise); entity-scoped grants get an empty list. Requires the accounting:read scope.","operationId":"listCompanyAccountingApprovalsSelfApproved","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"from","schema":{"format":"date","type":"string"}},{"in":"query","name":"to","schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"actor_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"item_id":{"type":"integer"},"item_type":{"type":"string"},"reason":{"type":["string","null"]},"summary":{"type":"string"}},"type":"object"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Self-approved documents","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/disputes":{"get":{"description":"Disputes in permitted entities, newest first; filter by status and customer_id. Requires the accounting:read scope.","operationId":"listCompanyAccountingArCollectionsDisputes","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"status","schema":{"enum":["open","resolved","withdrawn"],"type":"string"}},{"in":"query","name":"customer_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_CollDispute"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Invalid query parameter"}},"summary":"Disputes","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Reason code and amount disputed (open disputes cannot exceed the invoice total). Flags the invoice disputed: aging shows it in the Disputed column and dunning and finance charges skip it. Idempotent on request_key. Requires the accounting:write scope.","operationId":"createCompanyAccountingArCollectionsDispute","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollDisputeInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollDispute"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Conflict (state changed, duplicate or request key reuse)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Validation failed"}},"summary":"Open a dispute on a posted invoice (arEnter)","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/disputes/{id}":{"get":{"description":"One dispute in permitted entities. Requires the accounting:read scope.","operationId":"getCompanyAccountingArCollectionsDispute","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollDispute"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Invalid query parameter"}},"summary":"A dispute","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/disputes/{id}/resolve":{"post":{"description":"Closing the last open dispute on an invoice clears its disputed flag. Requires the accounting:write scope.","operationId":"resolveCompanyAccountingArCollectionsDispute","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollDisputeAction"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollDispute"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Conflict (state changed, duplicate or request key reuse)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Validation failed"}},"summary":"Resolve or withdraw a dispute (arEnter)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/payments":{"get":{"description":"Customer portal payments in permitted entities: pending until the provider confirms, then succeeded (receipt posted to the clearing account), failed, or settled at payout; held (nothing posted, the reason in failure_reason) when the provider's captured or paid-out figures, or the pending receipt's state, disagree with the books. Requires the accounting:read scope.","operationId":"listCompanyAccountingArCollectionsPayments","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"status","schema":{"enum":["pending","succeeded","failed","settled","held"],"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_CollPayment"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Invalid query parameter"}},"summary":"Online payments","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/payments/{id}":{"get":{"description":"One customer portal payment in permitted entities. Requires the accounting:read scope.","operationId":"getCompanyAccountingArCollectionsPayment","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollPayment"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Invalid query parameter"}},"summary":"An online payment","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/policies":{"get":{"description":"One reminder cadence per customer class, with steps relative to the due date. Requires the accounting:read scope.","operationId":"listCompanyAccountingArCollectionsPolicies","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_CollPolicy"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Invalid query parameter"}},"summary":"Dunning policies","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"One policy per customer class (409 otherwise). Steps: offset days relative to the due date (rolled forward to a business day), email subject and body templates ({{invoice_number}}, {{due_date}}, {{open_amount}}, {{days_past_due}}, {{customer_name}}, {{company_name}}), and escalation to the internal owner. Requires the accounting:write scope.","operationId":"createCompanyAccountingArCollectionsPolicy","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollPolicyInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollPolicy"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Conflict (state changed, duplicate or request key reuse)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Validation failed"}},"summary":"Create a dunning policy (arApprove)","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/policies/{id}":{"patch":{"description":"Steps keep their identity by offset, so a re-saved step never re-sends; dropped offsets are deactivated. Requires the accounting:write scope.","operationId":"updateCompanyAccountingArCollectionsPolicy","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollPolicyInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollPolicy"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Conflict (state changed, duplicate or request key reuse)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Validation failed"}},"summary":"Replace a dunning policy's cadence (arApprove)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/portal_access":{"get":{"description":"Links from customer portal grants to AR customers. Requires the accounting:read scope.","operationId":"listCompanyAccountingArCollectionsPortalAccess","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"customer_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_CollPortalAccess"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Invalid query parameter"}},"summary":"Customer portal billing links","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"The grant's principal then sees that customer's posted invoices on the grant's project, and may pay online when allow_payments is true. Needs a grant over every entity. One active link per grant. Requires the accounting:write scope.","operationId":"createCompanyAccountingArCollectionsPortalAccess","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollPortalAccessInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollPortalAccess"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Conflict (state changed, duplicate or request key reuse)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Validation failed"}},"summary":"Link a customer portal grant to an AR customer (arApprove)","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/portal_access/{id}/revoke":{"post":{"description":"The portal stops showing billing for the grant at once. Requires the accounting:write scope.","operationId":"revokeCompanyAccountingArCollectionsPortalAccess","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollReason"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollPortalAccess"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Conflict (state changed, duplicate or request key reuse)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Validation failed"}},"summary":"Revoke a billing link (arApprove)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/promises":{"get":{"description":"Promises in permitted entities; status kept or broken is recorded by the daily collections job from posted receipts. Requires the accounting:read scope.","operationId":"listCompanyAccountingArCollectionsPromises","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"status","schema":{"enum":["open","kept","broken","cancelled"],"type":"string"}},{"in":"query","name":"customer_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_CollPromise"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Invalid query parameter"}},"summary":"Promises to pay","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Date and amount, optionally for named invoices. While open it pauses dunning for those invoices (or the customer). Idempotent on request_key. Requires the accounting:write scope.","operationId":"createCompanyAccountingArCollectionsPromise","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollPromiseInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollPromise"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Conflict (state changed, duplicate or request key reuse)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Validation failed"}},"summary":"Record a promise to pay (arEnter)","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/promises/{id}/cancel":{"post":{"description":"A cancelled promise no longer pauses dunning and is left out of the kept rate. Requires the accounting:write scope.","operationId":"cancelCompanyAccountingArCollectionsPromise","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollReason"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollPromise"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Conflict (state changed, duplicate or request key reuse)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Validation failed"}},"summary":"Cancel an open promise (arEnter)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/run":{"post":{"description":"Records kept/broken promises and sends due dunning steps, exactly as the daily job: business days and outside quiet hours only, at most once per invoice and step. Requires the accounting:write scope.","operationId":"createCompanyAccountingArCollectionsRun","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollRun"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Conflict (state changed, duplicate or request key reuse)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Validation failed"}},"summary":"Run collections now (arEnter)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/settings":{"get":{"description":"Dunning calendar (quiet hours, business days, holidays), promise grace days and the online payment setup (provider, clearing, payout and fee accounts; surcharge and convenience fee, both off by default). Any AR reader. Requires the accounting:read scope.","operationId":"listCompanyAccountingArCollectionsSettings","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollSettings"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Invalid query parameter"}},"summary":"Collections and online payment settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Partial update. Online payments need clearing, payout and processor fee accounts; surcharges and convenience fees need a fee income account (their legality varies by jurisdiction and card network). revision guards concurrent edits (409). Requires the accounting:write scope.","operationId":"updateCompanyAccountingArCollectionsSettings","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollSettingsInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollSettings"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Conflict (state changed, duplicate or request key reuse)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Validation failed"}},"summary":"Update collections settings (arApprove)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/collections/worklist":{"get":{"description":"Customers with open current AR in permitted entities, ordered by score = Σ open × age weight × risk (deterministic; docs/accounting/COLLECTIONS-PORTAL.md). Disputed invoices are excluded from the score and shown separately. Paginated. Requires the accounting:read scope.","operationId":"listCompanyAccountingArCollectionsWorklist","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"as_of","schema":{"format":"date","type":"string"}},{"in":"query","name":"collector_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"entity_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_CollWorklistRow"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Invalid query parameter"}},"summary":"Prioritized collections worklist","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/ar/customers":{"get":{"description":"Active parties usable as AR customers (no accounting profile, or a profile marked customer), ordered by name. Paginated with Total and Link headers. Party names only; billing activity stays behind the entity-scoped customer detail. Refused (403) to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingArCustomers","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"maxLength":120,"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"has_profile":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"term_id":{"type":["integer","null"]}},"required":["id","name","has_profile","term_id"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Tenant, permission or entity access denied"}},"summary":"List AR customers","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/ar/customers/{id}":{"get":{"description":"Returns customer billing information scoped to the company and permitted invoice entities. This is current workflow information, not an as-of AR control reconciliation. Requires the accounting:read scope.","operationId":"getCompanyAccountingArCustomer","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArCustomer"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Tenant, permission or entity access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped record not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, duplicate source or request conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid input, references, configuration or posting period"}},"summary":"Customer open balances net of posted receipts and reversals; paginated invoice history","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/customers/{id}/collection_notes":{"get":{"description":"Newest first. Paginated (page/per_page; Total and Link headers). Latest 100 collection notes for the customer in permitted entities. Requires the accounting:read scope.","operationId":"listCompanyAccountingArCustomerCollectionNotes","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ArCollectionNote"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"}},"summary":"Latest 100 collection notes for the customer in permitted entities.","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Add a collection note (optional invoice and promise to pay). arEnter. Requires the accounting:write scope.","operationId":"createCompanyAccountingArCustomerCollectionNote","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArCollectionNoteInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArCollectionNote"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Add a collection note (optional invoice and promise to pay). arEnter.","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/customers/{id}/collections":{"get":{"description":"Profile (class, collector, hold, follow-up), days to pay (amount-weighted, last 365 days), disputes, promises (live status) and dunning history in permitted entities. Requires the accounting:read scope.","operationId":"listCompanyAccountingArCustomerCollections","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollCustomer"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Invalid query parameter"}},"summary":"A customer's collections view","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Customer class (selects the dunning policy), collector assignment, hold (pauses dunning; needs a reason) and follow-up date. Requires the accounting:write scope.","operationId":"updateCompanyAccountingArCustomerCollections","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollProfileInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollCustomer"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Scope or permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Not found in the caller's scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Conflict (state changed, duplicate or request key reuse)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CollError"}}},"description":"Validation failed"}},"summary":"Update a customer's collections profile (arEnter)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/customers/{id}/statement":{"get":{"description":"Customer statement: open posted invoices, unapplied cash and balance due, with the billing contact. Requires the accounting:read scope.","operationId":"listCompanyAccountingArCustomerStatement","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Statement date (default today): as-of open amounts, receipts and applications dated on or before it.","in":"query","name":"as_of","schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArStatement"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"}},"summary":"Customer statement: open posted invoices, unapplied cash and balance due, with the billing contact.","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/deposits":{"post":{"description":"Deposit posted receipts held in UNDEPOSITED_FUNDS to a bank account as one journal (Dr bank / Cr undeposited funds). arApprove; idempotent by request_key. A preparer or contributor of any deposited receipt cannot make the deposit (403, segregation of duties). Requires the accounting:write scope.","operationId":"createCompanyAccountingArDeposit","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArDepositInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArDeposit"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Deposit posted receipts held in UNDEPOSITED_FUNDS to a bank account as one journal (Dr bank / Cr undeposited funds). arApprove; idempotent by request_key.","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/gmp/status":{"get":{"description":"For each prime contract on the project with an approved GMP: mode (cost_of_work: applications; sov: progress contract certified through Payment Applications), original and revised GMP, approved changes, committed and actual cost and forecast at completion (job forecast; forecast_error when unavailable), reimbursable and disallowed cost, fee earned, billed to date (posted), retainage held, remaining GMP, contingency and allowance balances, projected savings and the contractor/owner split, last application. Project-scoped grants may read their projects. Requires the accounting:read scope.","operationId":"listCompanyAccountingArGmpStatus","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"contracts":{"items":{"type":"object"},"type":"array"},"project_id":{"type":"integer"}},"required":["project_id","contracts"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"}},"summary":"GMP status of a project","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/gmp_applications/{id}":{"get":{"description":"The application with its computed result and its invoice, if billed. Refused (403) to project-scoped grants. Requires the accounting:read scope.","operationId":"getCompanyAccountingArGmpApplication","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GmpApplication"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"}},"summary":"Get a GMP application","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Needs ar_enter. Draft or returned applications only, at the given revision (409 when stale). exclusions replaces the disallowed job cost entries of the period (entry id -> reason); stored is the cumulative materials presently stored. An edit with only revision refreshes the application from current job cost, terms, change orders and contingency transfers. Requires the accounting:write scope.","operationId":"updateCompanyAccountingArGmpApplication","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"exclusions":{"additionalProperties":{"maxLength":1000,"minLength":3,"type":"string"},"type":"object"},"final":{"type":"boolean"},"period_end":{"format":"date","type":"string"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"stored":{"items":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"cost_code_id":{"type":["integer","null"]},"description":{"type":"string"},"reference":{"type":["string","null"]}},"required":["cost_code_id","description","amount"],"type":"object"},"maxItems":200,"type":"array"}},"required":["revision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GmpApplication"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Stale revision, wrong state, or the sources behind the application changed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed"}},"summary":"Edit a GMP application","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/gmp_applications/{id}/bill":{"post":{"description":"Needs ar_enter. Drafts the AR invoice of a certified application on the contract (customer: the contract owner; entity: the application's): one line per component billed this period (cost of the work, stored materials, general conditions, markups, fee, shared savings), or one net line when a component nets down; lines carry the job and the billing ref gmp_app:{id}; retainage is the period's retainage spread pro rata. The invoice then follows the normal submit, approve and post workflow (Dr AR, Dr retainage receivable, Cr contract revenue). 409 when already billed with a live invoice or the previous application has none. Requires the accounting:write scope.","operationId":"billCompanyAccountingArGmpApplication","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"due_date":{"format":"date","type":"string"},"invoice_date":{"format":"date","type":"string"},"posting_date":{"format":"date","type":"string"},"revenue_account_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["invoice_date"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"application":{"$ref":"#/components/schemas/accounting_GmpApplication"},"invoice":{"$ref":"#/components/schemas/accounting_ArInvoice"}},"required":["application","invoice"],"type":"object"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Stale revision, wrong state, or the sources behind the application changed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed"}},"summary":"Bill a GMP application","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/gmp_applications/{id}/certify":{"post":{"description":"Needs ar_approve, by a user who neither prepared nor changed the application. Records the owner's or architect's reviewer and date. Recomputes from the frozen entries: the result must equal what was submitted and certified_amount the current payment due (409 otherwise). Claims its job cost entries (each entry once across applications) and locks the application. Requires the accounting:write scope.","operationId":"certifyCompanyAccountingArGmpApplication","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"certified_amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"note":{"maxLength":2000,"type":"string"},"reviewer_date":{"format":"date","type":"string"},"reviewer_name":{"maxLength":200,"minLength":2,"type":"string"},"reviewer_role":{"enum":["owner","architect","owner_representative","lender","other"],"type":"string"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["revision","reviewer_name","reviewer_role","reviewer_date","certified_amount"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GmpApplication"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Stale revision, wrong state, or the sources behind the application changed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed"}},"summary":"Certify a GMP application","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/gmp_applications/{id}/package":{"get":{"description":"The owner backup package as one PDF: summary, continuation by cost code, the period's cost register, labor report, disallowed costs, category limits, contingency and allowance position and usage log, stored materials, certification, then the period's AP invoice attachments (PDF pages, PNG/JPEG images). Requires the accounting:read scope.","operationId":"listCompanyAccountingArGmpApplicationPackage","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"}},"summary":"GMP application owner package","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/gmp_applications/{id}/register":{"get":{"description":"The cost detail register: job cost entries of the period (scope=period, default) or to date (scope=to_date), with source document (AP bill, payroll run, journal), cost code, type, amount and disallowed status; paged (page, per_page up to 5000). format=csv returns the to-date register as CSV. Requires the accounting:read scope.","operationId":"listCompanyAccountingArGmpApplicationRegister","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"scope","schema":{"enum":["period","to_date"],"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":5000,"minimum":1,"type":"integer"}},{"in":"query","name":"format","schema":{"enum":["json","csv"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"rows":{"items":{"type":"object"},"type":"array"},"total":{"type":"integer"}},"required":["total","rows"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"}},"summary":"GMP application cost register","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/ar/gmp_applications/{id}/return":{"post":{"description":"Needs ar_enter. Records that the owner/architect returned a submitted application, with the reason; it is edited and submitted again. Requires the accounting:write scope.","operationId":"returnCompanyAccountingArGmpApplication","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"reason":{"maxLength":1000,"minLength":3,"type":"string"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["revision","reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GmpApplication"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Stale revision, wrong state, or the sources behind the application changed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed"}},"summary":"Return a GMP application","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/gmp_applications/{id}/submit":{"post":{"description":"Needs ar_enter. Recomputes the application (422 on calc errors such as a net credit or overdrawn contingency), freezes the job cost entries it claims and a hash of its result, and sends it to the owner/architect. The previous application must be billed and the period ended. Requires the accounting:write scope.","operationId":"submitCompanyAccountingArGmpApplication","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["revision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GmpApplication"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Stale revision, wrong state, or the sources behind the application changed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed"}},"summary":"Submit a GMP application","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/gmp_applications/{id}/void":{"post":{"description":"Needs ar_enter. Voids a draft or returned application with a reason. Requires the accounting:write scope.","operationId":"voidCompanyAccountingArGmpApplication","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"reason":{"maxLength":1000,"minLength":3,"type":"string"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["revision","reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GmpApplication"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Stale revision, wrong state, or the sources behind the application changed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed"}},"summary":"Void a GMP application","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/gmp_applications/{id}/withdraw":{"post":{"description":"Needs ar_approve. A certified application whose invoice is cancelled or reversed (or that has none) returns to returned and releases its job cost claims; later applications must be voided or withdrawn first. Requires the accounting:write scope.","operationId":"withdrawCompanyAccountingArGmpApplication","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"reason":{"maxLength":1000,"minLength":3,"type":"string"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["revision","reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GmpApplication"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Stale revision, wrong state, or the sources behind the application changed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed"}},"summary":"Withdraw a GMP certification","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/gmp_draws/{id}/decision":{"post":{"description":"Needs ar_approve, not the proposer. Approves or rejects a proposed draw; an approval that would overdraw its contingency is 409. Requires the accounting:write scope.","operationId":"decisionCompanyAccountingArGmpDraw","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"decision":{"enum":["approved","rejected"],"type":"string"},"note":{"maxLength":1000,"type":"string"}},"required":["decision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"pattern":"^-?\\d{1,16}\\.\\d{2}$","type":"string"},"decided_at":{"format":"date-time","type":"string"},"decided_by_id":{"type":"integer"},"id":{"type":"integer"},"status":{"type":"string"}},"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Already decided or overdraws the contingency"}},"summary":"Decide a GMP draw","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/invoices":{"get":{"description":"Lists invoices within the caller entity scope. Requires an accounting view grant. Use returned revision values for subsequent writes. Requires the accounting:read scope.","operationId":"listCompanyAccountingArInvoices","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"customer_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"status","schema":{"enum":["draft","pending_approval","approved","posted","reversed","cancelled"],"type":"string"}},{"description":"Header or any line on this project","in":"query","name":"project_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Invoice date on or after","in":"query","name":"date_from","schema":{"format":"date","type":"string"}},{"description":"Invoice date on or before","in":"query","name":"date_to","schema":{"format":"date","type":"string"}},{"description":"Case-insensitive match on number, source reference or memo","in":"query","name":"q","schema":{"maxLength":200,"type":"string"}},{"description":"true: posted, unreversed invoices with open receivable due before as_of","in":"query","name":"overdue","schema":{"type":"boolean"}},{"description":"Overdue cutoff (default today)","in":"query","name":"as_of","schema":{"format":"date","type":"string"}},{"in":"query","name":"disputed","schema":{"type":"boolean"}},{"in":"query","name":"sort","schema":{"default":"date_desc","enum":["date_desc","date_asc","due_asc","due_desc","total_desc","total_asc","number_asc","number_desc"],"type":"string"}},{"description":"Delta sync: only rows created or changed at or after this time (ISO 8601 with offset). Switches the list to ascending (updated_at, id) order; page is ignored and Next-Cursor continues it. Re-read with a small overlap (a few seconds) and dedupe by id.","in":"query","name":"updated_since","schema":{"format":"date-time","type":"string"}},{"description":"Opaque keyset cursor from a previous response's Next-Cursor header; each page costs the same however deep it is.","in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ArInvoice"},"type":"array"}}},"description":"Success","headers":{"Link":{"schema":{"type":"string"}},"Next-Cursor":{"description":"Delta sync only: cursor for the next page, present while a full page came back","schema":{"type":"string"}},"Per-Page":{"schema":{"type":"string"}},"Total":{"schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Tenant, permission or entity access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped record not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, duplicate source or request conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid input, references, configuration or posting period"}},"summary":"List scoped invoices (default 100, maximum 100 per page)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Requires ar_enter. Creates a draft using request_key (UUID). A retry with the same key and identical payload returns 200 with the original invoice; the same key with different data returns 409. Optional correction links an unreplaced reversed invoice and preserves its entity/customer/currency; its posting date must be on or after the reversal. Amounts are exact decimal strings. A standard invoice with a line on a project whose prime contract bills this customer by a non-progress method is 409 (bill it through invoices/from_billing). A correction of a contract billing invoice is 409. Requires the accounting:write scope.","operationId":"createCompanyAccountingArInvoice","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArInvoice"}}},"description":"Replay of an earlier identical create"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArInvoice"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Tenant, permission or entity access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped record not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, duplicate source or request conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid input, references, configuration or posting period"}},"summary":"Create a draft; a retry with the same request key and payload returns the original invoice","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/invoices/from_billing":{"post":{"description":"Needs ar_enter. The prime contract's billing_method (tm, cost_plus, unit_price, gmp, milestone) must match billing.method; progress contracts bill by certified pay app (409). Caps, fees, markups, rates, retainage, unit items and the milestone schedule come only from the contract's approved billing terms (prime_contracts/{id}/billing_terms; 422 when none are approved); the request carries this period's facts. The calc in calc/billing.ts prices the period; its billed amounts become revenue lines with its retainage spread over them, and the draft follows submit, approve and post. NTE and GMP caps, the GMP settlement, the cost-plus fee billed before (fee cap and fixed fee) and each unit-price item's previous quantity read what AR already billed on the contract; fee_billed_before and previous_quantity only count when higher. A T&M ticket_id or cost-plus cost id already on a live (non-cancelled, unreversed) invoice of the contract is 409, as is a second GMP settlement. The resulting draft cannot be edited (cancel and bill again). A credit period is refused (enter a credit memo). Idempotent on request_key: same body replays (200), another body is 409. Requires the accounting:write scope.","operationId":"createCompanyAccountingArInvoicesFromBilling","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArBillingRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/accounting_ArInvoice"},{"properties":{"calc":{"properties":{"explain":{},"retainage":{"type":"string"}},"type":"object"}},"type":"object"}]}}},"description":"Replay of the same request"},"201":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/accounting_ArInvoice"},{"properties":{"calc":{"properties":{"explain":{},"retainage":{"type":"string"}},"type":"object"}},"type":"object"}]}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Draft an AR invoice from a non-progress billing","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/invoices/from_payment_application":{"post":{"description":"Requires ar_enter. Creates the draft AR invoice for an approved or paid prime-contract pay app, billed to the contract owner. The pay app is re-performed with the G702 calculator against retainage already billed for the contract and must reproduce its current payment due (line 8); posting debits AR_CONTROL line 8 and RETAINAGE_RECEIVABLE the change in line 5 and credits revenue the period billing. Retainage released on the pay app becomes release lines against the contract's earlier pay-app invoices. Earlier certified pay apps on the contract must already be billed and posted. A repeat call returns 200 with the same invoice. Billing again after the pay app's invoice is reversed creates a new draft linked as that invoice's correction; after a cancel, a new draft. A certified zero-billing pay app needs no invoice. A negative pay app bridges as a credit memo against the earlier pay-app invoices' open AR and retainage. A pay app on a contract whose billing_method is not progress is 409 (it bills through ar/invoices/from_billing). Requires the accounting:write scope.","operationId":"createCompanyAccountingArInvoicesFromPaymentApplication","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArPayAppBridge"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArInvoice"}}},"description":"The pay app was already billed; the existing invoice"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArInvoice"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Tenant, permission or entity access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped record not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, duplicate source or request conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid input, references, configuration or posting period"}},"summary":"Bill a certified owner pay app in AR (once per pay app)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/invoices/{id}":{"get":{"description":"Returns the scoped invoice, current revision, lines and reversal/correction metadata. An excluded or absent source returns 404. Requires the accounting:read scope.","operationId":"getCompanyAccountingArInvoice","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArInvoice"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Tenant, permission or entity access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped record not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, duplicate source or request conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid input, references, configuration or posting period"}},"summary":"Get scoped invoice","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Requires ar_enter. Replaces the current draft using top-level revision and a complete invoice object, including all lines; this is not an AP-style partial patch. A successful edit increments revision. A stale revision or non-draft state returns 409. Posted documents are corrected through reversal and a linked new draft. Pay-app and contract billing invoices (prime_contract_id set) are 409: cancel and bill again. A standard invoice with a line on a project whose prime contract bills this customer by a non-progress method is 409. Requires the accounting:write scope.","operationId":"updateCompanyAccountingArInvoice","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArInvoice"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Tenant, permission or entity access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped record not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, duplicate source or request conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid input, references, configuration or posting period"}},"summary":"Replace current draft revision; all editors are excluded from approval","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/invoices/{id}/attachments":{"get":{"description":"Oldest first. Needs view_ledger and the parent's entity scope. Requires the accounting:read scope.","operationId":"listCompanyAccountingArInvoiceAttachments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctAttachment"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"List attachments on a AR invoice","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Multipart upload (one `file` part, allow-listed type, up to MAX_UPLOAD_BYTES). Allowed after posting: attachments are not ledger data. Writes an attachment_added audit event on the parent in the same transaction. Needs ar_enter and the parent's entity scope. Requires the accounting:write scope.","operationId":"createCompanyAccountingArInvoiceAttachment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctAttachment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused for a different request or still in progress"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Request body too large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing file, empty file, too large, or a type that is not allowed"}},"summary":"Attach a file to a AR invoice","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/invoices/{id}/credit_applications":{"post":{"description":"Applies the credit memo's available on-account credit (on-account lines less earlier applications and posted refunds) to open receivable lines of the same entity, customer and currency. The credit memo's preparer or contributors cannot place it (403, segregation of duties). More than available or open is 409. Reversing the credit memo reverses its applications. Requires the accounting:write scope.","operationId":"createCompanyAccountingArInvoiceCreditApplication","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArCreditApplicationInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ArCreditApplication"},"type":"array"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Apply a posted on-account credit memo to open invoice lines (Dr AR control / Cr receivable line). arApprove; idempotent by request_key.","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/invoices/{id}/dispute":{"post":{"description":"Flag or clear a collections dispute on a posted invoice. Disputed invoices age in the Disputed column. arEnter. Requires the accounting:write scope.","operationId":"disputeCompanyAccountingArInvoice","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArDisputeInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArInvoice"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Flag or clear a collections dispute on a posted invoice. Disputed invoices age in the Disputed column. arEnter.","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/invoices/{id}/pdf":{"get":{"description":"Any accounting viewer in the invoice's entity. Requires the accounting:read scope.","operationId":"listCompanyAccountingArInvoicePdf","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"Invoice PDF"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"}},"summary":"Invoice PDF","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/invoices/{id}/reverse":{"post":{"description":"Requires ar_approve independent of preparer/contributors, current revision, UUID request_key, date and reason. Only posted invoices can be reversed. First reverse all active applied receipts; invoice reversal cannot precede those reversals or original posting. Reconciled bank lines block reversal. The date must be in an open period. Matching retries return the same reversal; changed key/date/reason conflicts. Create a linked correction separately. Requires the accounting:write scope.","operationId":"reverseCompanyAccountingArInvoice","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArReverseInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArReversal"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Append a source-owned reversal. Independent arApprove required. Identical retries return the original reversal.","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/invoices/{id}/send":{"post":{"description":"Commits an audit row (send_queued) and an outbox job in one transaction and returns 202 without contacting the email provider, so the company posting lock is never held on email latency. The job runner then emails the invoice with its PDF attached as the queuing user (AR read access is rechecked), retries a failed send with backoff, skips an invoice reversed in the meantime, and audits 'sent'. Requires the accounting:write scope.","operationId":"sendCompanyAccountingArInvoice","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"invoice_id":{"type":"integer"},"job_id":{"type":"integer"},"status":{"enum":["queued"],"type":"string"},"to":{"type":"string"}},"required":["invoice_id","to","job_id","status"],"type":"object"}}},"description":"Queued"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Queue a posted invoice for email to the customer's billing contact, with the invoice PDF attached.","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/invoices/{id}/transition":{"post":{"description":"Requires revision and action. submit: draft to pending_approval (ar_enter); return: pending_approval to draft with reason and incremented revision (ar_approve); approve: pending_approval to approved (ar_approve, independent of preparer and all contributors); post: approved to posted (ar_enter). Posting revalidates accounts and period. An identical post retry at the current posted revision returns the existing invoice; do not assume every transition is retryable. Requires the accounting:write scope.","operationId":"transitionCompanyAccountingArInvoice","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArTransition"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArInvoice"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Tenant, permission or entity access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped record not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, duplicate source or request conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid input, references, configuration or posting period"}},"summary":"Submit, return to draft, independently approve, or post an invoice","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/payment_applications/{id}/pdf":{"get":{"description":"Accounting viewers with view access to the project's pay apps. Application summary and continuation sheet with the industry form's math and column letters, neutral wording (no AIA form text). 409 before the pay app is certified; 422 for a commitment pay app. Requires the accounting:read scope.","operationId":"listCompanyAccountingArPaymentApplicationPdf","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"G702/G703 PDF"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"G702/G703 PDF of a certified owner pay app","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/prime_contracts/{id}/billing_method":{"put":{"description":"Needs ar_approve (not a project-scoped grant). progress bills by certified pay app; tm, cost_plus, unit_price, gmp and milestone bill through ar/invoices/from_billing. Once the contract has a non-cancelled AR invoice or a certified (approved or paid) pay app, a change is 409 unless conversion_reason is given. Audited with the reason and those counts. Requires the accounting:write scope.","operationId":"billingMethodCompanyAccountingArPrimeContract","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"billing_method":{"enum":["progress","tm","cost_plus","unit_price","gmp","milestone"],"type":"string"},"conversion_reason":{"description":"Why a contract already billed changes method.","maxLength":1000,"minLength":3,"nullable":true,"type":"string"}},"required":["billing_method"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"billing_method":{"enum":["progress","tm","cost_plus","unit_price","gmp","milestone"],"type":"string"},"id":{"type":"integer"}},"required":["id","billing_method"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"The contract is already billed and no conversion reason was given"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Set a prime contract's billing method","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/prime_contracts/{id}/billing_terms":{"get":{"description":"The approved billing terms and any proposed change waiting for approval. Refused (403) to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingArPrimeContractBillingTerms","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArContractBillingTerms"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, project-scoped grant, or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"}},"summary":"Get a prime contract's billing terms","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"Needs ar_enter (not a project-scoped grant). Stores the body as the proposed terms and increments revision; the approved terms stay in force until an ar_approve user other than the proposer approves (billing_terms/approve). Audited. Requires the accounting:write scope.","operationId":"replaceCompanyAccountingArPrimeContractBillingTerms","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArContractBillingTermsInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArContractBillingTerms"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, project-scoped grant, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed"}},"summary":"Propose a prime contract's billing terms","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/prime_contracts/{id}/billing_terms/approve":{"post":{"description":"Needs ar_approve, and the approver must not be the user who proposed the change (403, segregation of duties). revision must be the proposed revision (409 when it changed, or when nothing is proposed). The proposed terms become the terms billing uses. Audited with the before and after terms. Requires the accounting:write scope.","operationId":"createCompanyAccountingArPrimeContractBillingTermsApprove","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"revision":{"minimum":1,"type":"integer"}},"required":["revision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArContractBillingTerms"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, project-scoped grant, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Nothing proposed, or the proposed revision changed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed"}},"summary":"Approve a prime contract's proposed billing terms","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/prime_contracts/{id}/closeout":{"get":{"description":"Lists the contract's final retainage requirements and which are received or missing. Empty lists indicate no checklist when restricted_submittal_evidence is absent. Linked revision IDs and approval status require Submittals view on the project and submittals:read for scoped tokens. Refused (403) to project-scoped grants. Requires accounting:read.","operationId":"listCompanyAccountingArPrimeContractCloseout","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"missing":{"items":{"type":"string"},"type":"array"},"prime_contract_id":{"type":"integer"},"received":{"items":{"type":"string"},"type":"array"},"required":{"items":{"type":"string"},"type":"array"},"restricted_submittal_evidence":{"description":"When true, the response contains only manual checks because submittal evidence is restricted.","type":"boolean"}},"required":["prime_contract_id","required","received","missing"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"}},"summary":"Get a prime contract's closeout documents","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"Needs ar_approve and accounting:write. required lists at least one manual check or exact submittal:<revision ID> reference. received lists manual checks on file. Saving a checklist with new or existing references needs Submittals view and submittals:read for a scoped token. A final retainage release returns 422 at bridge, submit or post until every required item is complete. Audited.","operationId":"closeoutCompanyAccountingArPrimeContract","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"received":{"items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":50,"type":"array"},"required":{"items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":50,"minItems":1,"type":"array"}},"required":["required"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"missing":{"items":{"type":"string"},"type":"array"},"prime_contract_id":{"type":"integer"},"received":{"items":{"type":"string"},"type":"array"},"required":{"items":{"type":"string"},"type":"array"}},"required":["prime_contract_id","required","received","missing"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed or the ledger refused the change"}},"summary":"Set a prime contract's closeout documents","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/prime_contracts/{id}/gmp_applications":{"get":{"description":"Cost-of-work applications of a cost_plus prime contract with approved GMP terms, newest first. 409 when the contract is not a cost_plus GMP contract. Refused (403) to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingArPrimeContractGmpApplications","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"applications":{"items":{"type":"object"},"type":"array"},"contract":{"type":"object"},"terms_revision":{"type":["integer","null"]}},"required":["contract","applications"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not a cost_plus GMP contract"}},"summary":"List a GMP contract's applications","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Needs ar_enter. Starts the contract's next application (draft) for the period ending period_end from posted job cost of the contract's job and entity: every job cost entry through the period end that no earlier certified application claimed. The previous application must be billed; one open application per contract (a repeat is 409). Refused when the contract has invoices outside applications. final: fee and lump-sum general conditions fully earned and the contractor's savings share billed. Requires the accounting:write scope.","operationId":"createCompanyAccountingArPrimeContractGmpApplication","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"final":{"default":false,"type":"boolean"},"period_end":{"format":"date","type":"string"}},"required":["period_end"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GmpApplication"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Stale revision, wrong state, or the sources behind the application changed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed"}},"summary":"Start a GMP application","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/prime_contracts/{id}/gmp_closeout":{"get":{"description":"Final reconciliation from the last certified application: revised GMP, cost plus fee, savings and the contractor/owner split or the overrun absorbed, final price, billed to date (AR, posted and all live), final billing still due, retainage held, the closeout checklist and readiness flags. Refused (403) to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingArPrimeContractGmpCloseout","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"billed_posted":{"pattern":"^-?\\d{1,16}\\.\\d{2}$","type":"string"},"billed_to_date":{"pattern":"^-?\\d{1,16}\\.\\d{2}$","type":"string"},"closeout":{"type":"object"},"last_application":{"type":["object","null"]},"prime_contract_id":{"type":"integer"},"ready":{"type":"object"},"reconciliation":{"type":"object"}},"required":["prime_contract_id","reconciliation","ready"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"}},"summary":"GMP close-out reconciliation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/prime_contracts/{id}/gmp_draws":{"get":{"description":"The usage log of the GMP contract's contingency transfers and allowance adjustments. Requires the accounting:read scope.","operationId":"listCompanyAccountingArPrimeContractGmpDraws","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"draws":{"items":{"properties":{"allowance_key":{"type":["string","null"]},"amount":{"pattern":"^-?\\d{1,16}\\.\\d{2}$","type":"string"},"cost_code_id":{"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"decided_at":{"format":"date-time","type":["string","null"]},"decided_by_id":{"type":["integer","null"]},"decision_note":{"type":["string","null"]},"id":{"type":"integer"},"prime_contract_id":{"type":"integer"},"proposed_by_id":{"type":"integer"},"reason":{"type":"string"},"reference":{"type":["string","null"]},"source":{"enum":["contractor_contingency","owner_contingency","allowance"],"type":"string"},"status":{"enum":["proposed","approved","rejected"],"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"}},"summary":"List GMP contingency and allowance draws","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Needs ar_enter. A contingency transfer (contractor_contingency or owner_contingency, positive, to a cost code of the project) moves GMP budget to that code; an allowance adjustment (allowance_key of the GMP terms, signed) changes the allowance. Takes effect when another user approves it. Requires the accounting:write scope.","operationId":"createCompanyAccountingArPrimeContractGmpDraw","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"allowance_key":{"type":["string","null"]},"amount":{"pattern":"^-?\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"cost_code_id":{"type":["integer","null"]},"reason":{"maxLength":1000,"minLength":3,"type":"string"},"reference":{"maxLength":200,"type":"string"},"source":{"enum":["contractor_contingency","owner_contingency","allowance"],"type":"string"}},"required":["source","amount","reason"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"allowance_key":{"type":["string","null"]},"amount":{"pattern":"^-?\\d{1,16}\\.\\d{2}$","type":"string"},"cost_code_id":{"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"decided_at":{"format":"date-time","type":["string","null"]},"decided_by_id":{"type":["integer","null"]},"decision_note":{"type":["string","null"]},"id":{"type":"integer"},"prime_contract_id":{"type":"integer"},"proposed_by_id":{"type":"integer"},"reason":{"type":"string"},"reference":{"type":["string","null"]},"source":{"enum":["contractor_contingency","owner_contingency","allowance"],"type":"string"},"status":{"enum":["proposed","approved","rejected"],"type":"string"}},"type":"object"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"No accounting access, missing permission, segregation of duties, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Validation failed"}},"summary":"Propose a GMP contingency or allowance draw","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/receipts":{"get":{"description":"Lists scoped receipts, optionally filtered by customer_id, in pages of per_page (default 50). Pagination headers include Total, Per-Page and Link. Requires the accounting:read scope.","operationId":"listCompanyAccountingArReceipts","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"customer_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":50,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ArReceipt"},"type":"array"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Receipt history, 50 per page","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Requires ar_enter. Creates a draft with UUID request_key and exact decimal string amount. Allocations must sum exactly to the receipt; unapplied cash is not supported. Each allocation identifies invoice_id, invoice_revision, journal_line_id and current or retainage bucket from open_items. Matching-key matching-payload retries return the original; changed payload conflicts. There is no receipt PATCH: cancel an unposted receipt or reverse a posted receipt, then create a linked correction using a new request key and reference. Requires the accounting:write scope.","operationId":"createCompanyAccountingArReceipt","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArReceiptCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArReceipt"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Record a fully allocated draft; matching request-key retries return the original receipt","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/receipts/open_items":{"get":{"description":"Requires ar_enter and permitted entity_id/customer_id. Returns current open invoice journal lines with revision, bucket and exact open amount. These are current-state amounts only: no historical cutoff reconstruction or tie-out certification. Refresh before allocating; approval and posting revalidate available amounts. Requires the accounting:read scope.","operationId":"listCompanyAccountingArReceiptsOpenItems","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"entity_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"customer_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":25,"maximum":200,"minimum":1,"type":"integer"}},{"description":"Receipt currency (ISO 4217). Defaults to the entity's functional currency; a foreign currency lists the invoices billed in it and the cash accounts denominated in it.","in":"query","name":"currency","schema":{"pattern":"^[A-Za-z]{3}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArOpenItems"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Open original AR distributions for one customer/entity; pages over open invoices only, oldest due first","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/ar/receipts/{id}":{"get":{"description":"Returns a scoped receipt with allocations and reversal/correction links; excluded or absent receipts return 404. Requires the accounting:read scope.","operationId":"getCompanyAccountingArReceipt","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArReceipt"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Receipt detail and immutable applications","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/receipts/{id}/applications":{"post":{"description":"Apply a posted receipt's unapplied cash to open invoice lines, or transfer its allocations between lines. arApprove; idempotent by request_key. The receipt's preparer or contributors cannot apply or transfer its cash (403, segregation of duties). Requires the accounting:write scope.","operationId":"createCompanyAccountingArReceiptApplication","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArCashApplicationInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArCashApplication"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Apply a posted receipt's unapplied cash to open invoice lines, or transfer its allocations between lines. arApprove; idempotent by request_key.","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/receipts/{id}/attachments":{"get":{"description":"Oldest first. Needs view_ledger and the parent's entity scope. Requires the accounting:read scope.","operationId":"listCompanyAccountingArReceiptAttachments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctAttachment"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"List attachments on a AR receipt","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Multipart upload (one `file` part, allow-listed type, up to MAX_UPLOAD_BYTES). Allowed after posting: attachments are not ledger data. Writes an attachment_added audit event on the parent in the same transaction. Needs ar_enter and the parent's entity scope. Requires the accounting:write scope.","operationId":"createCompanyAccountingArReceiptAttachment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctAttachment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused for a different request or still in progress"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Request body too large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing file, empty file, too large, or a type that is not allowed"}},"summary":"Attach a file to a AR receipt","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/receipts/{id}/reverse":{"post":{"description":"Requires ar_approve independent of preparer/contributors, current revision, UUID request_key, date and reason. Reverses posted cash and restores invoice bucket availability. Reversal cannot precede posting and must use an open period; reconciled bank lines block it. Matching retries return the original reversal; changed request data conflicts. A replacement receipt must link the reversed receipt, preserve entity/customer/currency and not predate reversal. Requires the accounting:write scope.","operationId":"reverseCompanyAccountingArReceipt","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArReverseInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArReversal"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Append a source-owned reversal. Independent arApprove required. Identical retries return the original reversal.","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/receipts/{id}/transition":{"post":{"description":"Requires current revision. approve moves draft to approved and requires ar_approve independent of preparer/contributors. post requires ar_enter and approved state; it rechecks open amounts, invoice provenance and cash account before posting atomically. Retrying post on the same posted revision returns the existing receipt. cancel needs a reason: draft cancellation requires ar_enter; approved cancellation requires independent ar_approve. Posted receipts must be reversed. Requires the accounting:write scope.","operationId":"transitionCompanyAccountingArReceipt","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArReceiptTransition"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArReceipt"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Independently approve or post; balances are revalidated under the company lock","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/refunds":{"get":{"description":"Refunds in the caller's entities; project-scoped grants are refused. Requires the accounting:read scope.","operationId":"listCompanyAccountingArRefunds","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"customer_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ArRefund"},"type":"array"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"}},"summary":"Customer refunds, newest first (paginated).","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"The amount may not exceed the credit available now (409); drafts reserve nothing and are rechecked at posting. Posting is a separate independent step. Requires the accounting:write scope.","operationId":"createCompanyAccountingArRefund","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArRefundCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArRefund"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Draft a refund of customer credit: a posted receipt's unapplied cash or an on-account credit memo. arEnter; idempotent by request_key.","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/refunds/{id}":{"get":{"description":"Refund in the caller's entities. Requires the accounting:read scope.","operationId":"getCompanyAccountingArRefund","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArRefund"}}},"description":"Success"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"}},"summary":"Refund detail.","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/ar/refunds/{id}/transition":{"post":{"description":"post: an arApprove user other than the preparer (403 otherwise) approves and posts Dr CUSTOMER_DEPOSITS (receipt) or AR control (credit memo) / Cr the bank account, after rechecking the available credit (409). cancel: a draft, with a reason (arEnter). reverse: a posted refund, with a reason and date (arApprove, not the preparer); posts the reversing entry. A matching retry of a completed transition returns the refund. A receipt or credit memo with a posted refund cannot be reversed until the refund is. Requires the accounting:write scope.","operationId":"transitionCompanyAccountingArRefund","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArRefundTransition"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArRefund"}}},"description":"Success"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Malformed JSON request body"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scope or separation of duties denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Scoped source not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"State, revision, overapplication or idempotency conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ArError"}}},"description":"Invalid data, dates, account or closed period"}},"summary":"Post, cancel or reverse a customer refund.","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets":{"get":{"description":"The asset register with posted accumulated depreciation and net book value. Filter with `filters[status]` (active, disposed), `filters[equipment_id]`, or `search` (number, name, category). Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingAssets","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"active, disposed","in":"query","name":"filters[status]","schema":{"type":"string"}},{"description":"Equipment ids","in":"query","name":"filters[equipment_id]","schema":{"type":"string"}},{"description":"Number, name or category","in":"query","name":"search","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Page size","in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_FixedAsset"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List fixed assets","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Adds an asset (FA-#### numbering) with its book parameters (posting) and an optional MACRS tax book (memo). With `acquisition_offset_account_id` it also posts Dr asset / Cr that account on the acquisition date. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingAsset","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"fixed_asset":{"properties":{"accumulated_account_id":{"type":"integer"},"acquisition_date":{"format":"date","type":"string"},"acquisition_offset_account_id":{"type":["integer","null"]},"ads_recovery_years":{"oneOf":[{"type":"string"},{"type":"number"}]},"asset_account_id":{"type":"integer"},"bonus_pct":{"type":"integer"},"book_convention":{"enum":["full_month","next_month","mid_month","half_year"],"type":"string"},"book_life_months":{"type":"integer"},"book_method":{"enum":["SL","DDB","DB150","SYD","UOP"],"type":"string"},"business_use_pct":{"oneOf":[{"type":"string"},{"type":"number"}]},"catch_up_in_current_period":{"description":"Required (true) when the in-service date puts depreciation before the first open period and there is no opening baseline (opening_accumulated / opening_through): the next run books those months as current-period catch-up. Otherwise 422.","type":"boolean"},"category":{"type":["string","null"]},"class_id":{"description":"Asset class: its accounts, method, life, convention and tax class fill any omitted field.","type":["integer","null"]},"cost":{"oneOf":[{"type":"string"},{"type":"number"}]},"description":{"type":["string","null"]},"entity_id":{"type":["integer","null"]},"equipment_id":{"type":["integer","null"]},"expense_account_id":{"type":"integer"},"in_service_date":{"format":"date","type":"string"},"name":{"type":"string"},"opening_accumulated":{"oneOf":[{"type":"string"},{"type":"number"}]},"opening_through":{"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","type":["string","null"]},"salvage":{"oneOf":[{"type":"string"},{"type":"number"}]},"section_179":{"oneOf":[{"type":"string"},{"type":"number"}]},"tax_convention":{"enum":["HY","MQ"],"type":"string"},"tax_recovery_class":{"enum":["3","5","7","10","15","20","27.5","39",null],"type":["string","null"]},"tax_system":{"enum":["GDS","ADS"],"type":"string"},"total_units":{"description":"UOP: total estimated units (meter readings drive the schedule).","type":["string","null"]}},"required":["name","acquisition_date","in_service_date","cost"],"type":"object"}},"required":["fixed_asset"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FixedAssetShow"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict, including an Idempotency-Key reused for a different request or still in progress"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Add a fixed asset","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/capitalize":{"post":{"description":"Registers a line of a posted AP bill coded to a fixed_asset account as a fixed asset: cost, asset account, entity and acquisition date come from the bill, and no acquisition entry posts (the bill already debited the asset account), so the register ties to the GL. One live asset per line (409); the bill cannot be voided while the asset is live. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingAssetsCapitalize","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"fixed_asset":{"properties":{"accumulated_account_id":{"type":"integer"},"ads_recovery_years":{"oneOf":[{"type":"string"},{"type":"number"}]},"ap_bill_line_id":{"type":"integer"},"bonus_pct":{"type":"integer"},"book_convention":{"enum":["full_month","next_month","mid_month","half_year"],"type":"string"},"book_life_months":{"type":"integer"},"book_method":{"enum":["SL","DDB","DB150","SYD","UOP"],"type":"string"},"business_use_pct":{"oneOf":[{"type":"string"},{"type":"number"}]},"catch_up_in_current_period":{"description":"Required (true) when the in-service date (default: the bill's posting date) puts depreciation before the first open period: the next run books those months as current-period catch-up. Otherwise 422.","type":"boolean"},"category":{"type":["string","null"]},"class_id":{"description":"Asset class: its accounts, method, life, convention and tax class fill any omitted field.","type":["integer","null"]},"description":{"type":["string","null"]},"equipment_id":{"type":["integer","null"]},"expense_account_id":{"type":"integer"},"in_service_date":{"format":"date","type":"string"},"name":{"type":"string"},"salvage":{"oneOf":[{"type":"string"},{"type":"number"}]},"section_179":{"oneOf":[{"type":"string"},{"type":"number"}]},"tax_convention":{"enum":["HY","MQ"],"type":"string"},"tax_recovery_class":{"enum":["3","5","7","10","15","20","27.5","39",null],"type":["string","null"]},"tax_system":{"enum":["GDS","ADS"],"type":"string"},"total_units":{"description":"UOP: total estimated units (meter readings drive the schedule).","type":["string","null"]}},"required":["ap_bill_line_id"],"type":"object"}},"required":["fixed_asset"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FixedAssetShow"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Capitalize an AP bill line","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/classes":{"get":{"description":"Asset classes of the company, by name. Requires the accounting:read scope.","operationId":"listCompanyAccountingAssetsClasses","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AssetClass"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access or wrong company"}},"summary":"List asset classes","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Default accounts, method, life, convention and MACRS class for new assets (fixed_asset.class_id). Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingAssetsClass","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"asset_class":{"properties":{"accumulated_account_id":{"type":"integer"},"asset_account_id":{"type":"integer"},"book_convention":{"enum":["full_month","next_month","mid_month","half_year"],"type":"string"},"book_life_months":{"type":"integer"},"book_method":{"enum":["SL","DDB","DB150","SYD","UOP"],"type":"string"},"expense_account_id":{"type":"integer"},"name":{"type":"string"},"tax_recovery_class":{"type":["string","null"]}},"required":["name","asset_account_id","accumulated_account_id","expense_account_id","book_life_months"],"type":"object"}},"required":["asset_class"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AssetClass"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Add an asset class","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/depreciation_runs":{"get":{"description":"Posted book-depreciation runs, newest first. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingAssetsDepreciationRuns","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Page size","in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_DepreciationRun"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List depreciation runs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"For the period, each active asset posts its book schedule to date minus what is already posted (so a reversed run is caught up next time, and repeating a run posts only what is new). `preview: true` returns the items and posting preview (200). Otherwise posts one FA journal entry dated the period end (201); 422 when nothing is due or the period is closed. Needs post_journal. Requires the accounting:write scope. A project-scoped (project_manager_view) grant gets 403, preview included.","operationId":"createCompanyAccountingAssetsDepreciationRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"depreciation_run":{"properties":{"period_id":{"type":"integer"},"preview":{"type":"boolean"}},"required":["period_id"],"type":"object"}},"required":["depreciation_run"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_DepreciationPreview"}}},"description":"OK"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_DepreciationRunShow"}}},"description":"Posted"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Preview or post a depreciation run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/depreciation_runs/{id}":{"get":{"description":"The run with its journal lines (one debit and one credit per asset). Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"getCompanyAccountingAssetsDepreciationRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_DepreciationRunShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a depreciation run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/depreciation_runs/{id}/reverse":{"post":{"description":"Posts the mirror entry on `date` and marks the run's entry reversed; the next run catches the assets up again. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"reverseCompanyAccountingAssetsDepreciationRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reversal":{"properties":{"date":{"format":"date","type":"string"},"reason":{"type":["string","null"]}},"required":["date"],"type":"object"}},"required":["reversal"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_DepreciationRunShow"}}},"description":"Reversed"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Reverse a depreciation run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/equipment_logs":{"post":{"description":"Turns approved field equipment logs (status approved or unset, linked to an equipment unit) dated from..to into equipment usage: operating hours at the operating hourly rate, idle hours at the idle hourly rate, each posted as its own voidable job cost entry. A log and rate type posts once. preview lists what would post and what is skipped (no cost code, no rate, already posted) without posting (200); posting is all-or-nothing (201). Preview needs accounting access; posting needs post_journal. Audited. Requires the accounting:read scope.","operationId":"createCompanyAccountingAssetsEquipmentLog","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"equipment_logs":{"properties":{"from":{"format":"date","type":"string"},"preview":{"type":"boolean"},"project_id":{"type":["integer","null"]},"to":{"format":"date","type":"string"}},"required":["from","to"],"type":"object"}},"required":["equipment_logs"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"posted":{"items":{"properties":{"amount":{"type":"string"},"hours":{"type":"string"},"log_id":{"type":"integer"},"rate_type":{"type":"string"},"usage_id":{"type":["integer","null"]}},"required":["log_id","rate_type","hours","amount","usage_id"],"type":"object"},"type":"array"},"skipped":{"items":{"properties":{"log_id":{"type":"integer"},"rate_type":{"type":"string"},"reason":{"type":"string"}},"required":["log_id","rate_type","reason"],"type":"object"},"type":"array"},"total":{"type":"string"}},"required":["posted","skipped","total"],"type":"object"}}},"description":"Preview"},"201":{"content":{"application/json":{"schema":{"properties":{"posted":{"items":{"properties":{"amount":{"type":"string"},"hours":{"type":"string"},"log_id":{"type":"integer"},"rate_type":{"type":"string"},"usage_id":{"type":["integer","null"]}},"required":["log_id","rate_type","hours","amount","usage_id"],"type":"object"},"type":"array"},"skipped":{"items":{"properties":{"log_id":{"type":"integer"},"rate_type":{"type":"string"},"reason":{"type":"string"}},"required":["log_id","rate_type","reason"],"type":"object"},"type":"array"},"total":{"type":"string"}},"required":["posted","skipped","total"],"type":"object"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Post approved equipment logs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/equipment_rates":{"get":{"description":"Effective-dated internal rates by unit, type (operating, standby, idle) and unit of time. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingAssetsEquipmentRates","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"One equipment unit","in":"query","name":"equipment_id","schema":{"type":"integer"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Page size","in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_EquipmentRate"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List equipment internal rates","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Job cost account defaults to 5410 and the recovery (contra-cost) account to 5490. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingAssetsEquipmentRate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"equipment_rate":{"properties":{"effective_from":{"format":"date","type":"string"},"entity_id":{"description":"Owning entity; defaults to the unit's fixed asset entity, else the company default.","type":["integer","null"]},"equipment_id":{"type":"integer"},"job_cost_account_id":{"type":["integer","null"]},"rate":{"oneOf":[{"type":"string"},{"type":"number"}]},"rate_type":{"enum":["operating","standby","idle"],"type":"string"},"recovery_account_id":{"type":["integer","null"]},"source":{"enum":["cost_based","blue_book","fhwa","manual"],"type":"string"},"unit":{"enum":["hour","day","week","month"],"type":"string"}},"required":["equipment_id","rate","effective_from"],"type":"object"}},"required":["equipment_rate"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquipmentRate"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Add an equipment internal rate","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/equipment_recovery":{"get":{"description":"Unit P&L by equipment: internal-rate recovery from jobs vs actual unit cost (depreciation, fuel, repairs and other expense lines carrying the unit). Positive over_under = over-recovered. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingAssetsEquipmentRecovery","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Posting date on or after","in":"query","name":"from","schema":{"format":"date","type":"string"}},{"description":"Posting date on or before","in":"query","name":"to","schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_EquipmentRecovery"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"Equipment recovery vs cost","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/equipment_recovery/report":{"get":{"description":"Over/under-recovery per unit and equipment class for from..to, by month: actual cost (expense, cost-of-revenue and other-expense lines coded to the unit, e.g. depreciation, repairs, fuel, insurance, interest) vs recovery (the unit's lines on the rates' recovery accounts: usage charged to jobs and posted true-ups). The tie-out reconciles each recovery account's GL activity to the part attributed to units and each cost account's GL activity to the part coded to units. suggested_hourly_rate = cost / operating hours (advisory). Class = the unit's fixed-asset class, else its category, else Unclassified. Requires the accounting:read scope. A project-scoped grant gets 403; an entity-scoped grant sees its entities' lines.","operationId":"listCompanyAccountingAssetsEquipmentRecoveryReport","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"from","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"to","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"class_key","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquipmentRecoveryReport"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Equipment cost recovery report","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/equipment_trueups":{"get":{"description":"True-up runs, newest period first (200 at most). Requires the accounting:read scope. Needs a grant over every entity (a project- or entity-scoped grant gets 403).","operationId":"listCompanyAccountingAssetsEquipmentTrueups","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"period_id","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_EquipmentTrueup"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List equipment true-ups","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Prepares the true-up of one period and equipment class: each unit's cost - recovery is allocated to the jobs that used it in the period by their usage charges (policy jobs; a unit with no usage goes to overhead_account_id when given, else it is skipped) or to overhead_account_id (policy overhead), against the unit's recovery account. Returns the prepared run with the same evidence (200, unchanged) or supersedes it. 409 when a posted run already covers the period and class; 422 for a closed period or nothing to true up. A second user approves and posts. Needs post_journal and a grant over every entity. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingAssetsEquipmentTrueup","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"trueup":{"properties":{"class_key":{"type":"string"},"overhead_account_id":{"type":["integer","null"]},"period_id":{"type":"integer"},"policy":{"enum":["jobs","overhead"],"type":"string"}},"required":["period_id","class_key","policy"],"type":"object"}},"required":["trueup"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquipmentTrueupPrepared"}}},"description":"The prepared run with the same evidence"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquipmentTrueupPrepared"}}},"description":"Prepared"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Period not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already posted for this period and class"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, closed period or nothing to true up"}},"summary":"Prepare an equipment true-up","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/equipment_trueups/{id}":{"get":{"description":"Units, lines, status and approvals. Requires the accounting:read scope. Needs a grant over every entity.","operationId":"getCompanyAccountingAssetsEquipmentTrueup","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquipmentTrueup"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show an equipment true-up","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/equipment_trueups/{id}/decision":{"post":{"description":"approve (approve_journal, never the preparer: 403) recomputes the run and posts one balanced JC entry dated the period end (409 if costs or usage changed since preparation); cancel (post_journal) needs a reason. A repeat of the same decision returns the run. Audited. Requires the accounting:write scope.","operationId":"decisionCompanyAccountingAssetsEquipmentTrueup","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"decision":{"properties":{"action":{"enum":["approve","cancel"],"type":"string"},"reason":{"type":["string","null"]}},"required":["action"],"type":"object"}},"required":["decision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquipmentTrueup"}}},"description":"Decided"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not prepared, or the evidence moved"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the entry (closed period)"}},"summary":"Approve or cancel an equipment true-up","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/equipment_trueups/{id}/reverse":{"post":{"description":"Reverses the run's entry on date with a reason (approve_journal); the period and class can then be trued up again. Idempotent for the same date and reason. Audited. Requires the accounting:write scope.","operationId":"reverseCompanyAccountingAssetsEquipmentTrueup","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reversal":{"properties":{"date":{"format":"date","type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["date","reason"],"type":"object"}},"required":["reversal"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquipmentTrueup"}}},"description":"Reversed"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not posted, or already reversed differently"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or the ledger refused the reversal"}},"summary":"Reverse a posted equipment true-up","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/equipment_usages":{"get":{"description":"Usage charged to jobs, newest first. Requires the accounting:read scope. A project-scoped (project_manager_view) grant sees only usage on projects it is a member of.","operationId":"listCompanyAccountingAssetsEquipmentUsages","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Equipment unit","in":"query","name":"equipment_id","schema":{"type":"integer"}},{"description":"Project","in":"query","name":"project_id","schema":{"type":"integer"}},{"description":"On or after","in":"query","name":"from","schema":{"format":"date","type":"string"}},{"description":"On or before","in":"query","name":"to","schema":{"format":"date","type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Page size","in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_EquipmentUsage"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List equipment usage charges","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Prices the quantity at the rate effective on the date and posts Dr job cost (project, cost code, unit; writes the job cost subledger as equipment cost) / Cr equipment cost recovery (unit) in the JC journal (201). `preview: true` validates against the ledger and returns the lines without posting (200). Needs post_journal. Requires the accounting:write scope. A project-scoped (project_manager_view) grant gets 403, preview included.","operationId":"createCompanyAccountingAssetsEquipmentUsage","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"equipment_usage":{"properties":{"cost_code_id":{"type":"integer"},"date":{"format":"date","type":"string"},"entity_id":{"description":"Defaults to the project's forecast entity, else the rate's owning entity. Usage in an entity other than the unit's owner is refused (no intercompany yet).","type":["integer","null"]},"equipment_id":{"type":"integer"},"memo":{"type":["string","null"]},"preview":{"type":"boolean"},"project_id":{"type":"integer"},"quantity":{"oneOf":[{"type":"string"},{"type":"number"}]},"rate_type":{"enum":["operating","standby","idle"],"type":"string"},"unit":{"enum":["hour","day","week","month"],"type":"string"}},"required":["equipment_id","project_id","cost_code_id","date","quantity"],"type":"object"}},"required":["equipment_usage"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquipmentUsageResult"}}},"description":"OK"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquipmentUsageResult"}}},"description":"Posted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict, including an Idempotency-Key reused for a different request or still in progress"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Charge equipment usage to a job","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/equipment_usages/{id}/void":{"post":{"description":"Reverses the usage entry (and so its job cost rows) on `date` with a reason and marks the usage voided. Repeating with the same date and reason returns it unchanged; a different date or reason is 409. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"voidCompanyAccountingAssetsEquipmentUsage","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reversal":{"properties":{"date":{"format":"date","type":"string"},"reason":{"minLength":3,"type":"string"}},"required":["date","reason"],"type":"object"}},"required":["reversal"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquipmentUsage"}}},"description":"Reversed"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already voided with a different date or reason"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Void equipment usage","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/equipment_utilization":{"get":{"description":"Operating, idle and standby hours (hourly usage), utilization % (operating / all hours) and recovery per unit from posted usage, optionally within from..to. Requires the accounting:read scope.","operationId":"listCompanyAccountingAssetsEquipmentUtilization","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"from","schema":{"format":"date","type":"string"}},{"in":"query","name":"to","schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"equipment_id":{"type":"integer"},"idle_hours":{"type":"string"},"name":{"type":"string"},"operating_hours":{"type":"string"},"recovery":{"type":"string"},"standby_hours":{"type":"string"},"utilization_pct":{"type":"string"}},"required":["equipment_id","name","operating_hours","idle_hours","standby_hours","utilization_pct","recovery"],"type":"object"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access or wrong company"}},"summary":"Equipment utilization","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/import":{"post":{"description":"CSV columns: name, legacy_number, description, category, class, equipment_asset_number, asset_account, accumulated_account, expense_account, cost, salvage, method, life_months, convention, acquisition_date, in_service_date, opening_accumulated, depreciated_through, tax_class, total_units (headers case-insensitive; up to 2,000 rows). Without apply, a preview (200, or 422 with row errors). With apply, every row must validate; all are added in one transaction (201) and nothing posts (the GL balances come in through the opening trial balance); tie_out compares the GL fixed asset and accumulated depreciation accounts with the register for the entity as of as_of (default today). Preview needs accounting access; apply needs post_journal. Audited. An Idempotency-Key makes a retried apply replay the first response instead of importing twice. Requires the accounting:read scope.","operationId":"createCompanyAccountingAssetsImport","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"apply":{"type":"boolean"},"as_of":{"format":"date","type":"string"},"csv":{"type":"string"},"entity_id":{"type":["integer","null"]}},"required":["csv"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AssetImportResult"}}},"description":"Preview"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AssetImportResult"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict, including an Idempotency-Key reused for a different request or still in progress"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Import the fixed asset register","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/{id}":{"get":{"description":"The asset with its book schedule by fiscal year, tax (MACRS) schedule, book-vs-tax temporary differences, and every ledger line posted for it. Each schedule carries an `explain` trace. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"getCompanyAccountingAsset","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FixedAssetShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a fixed asset","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Descriptive and tax-book fields only; the book basis, life and method are locked. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingAsset","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"fixed_asset":{"properties":{"ads_recovery_years":{"oneOf":[{"type":"string"},{"type":"number"}]},"bonus_pct":{"type":"integer"},"business_use_pct":{"oneOf":[{"type":"string"},{"type":"number"}]},"category":{"type":["string","null"]},"description":{"type":["string","null"]},"equipment_id":{"type":["integer","null"]},"name":{"type":"string"},"section_179":{"oneOf":[{"type":"string"},{"type":"number"}]},"tax_convention":{"enum":["HY","MQ"],"type":"string"},"tax_recovery_class":{"enum":["3","5","7","10","15","20","27.5","39",null],"type":["string","null"]},"tax_system":{"enum":["GDS","ADS"],"type":"string"}},"required":[],"type":"object"}},"required":["fixed_asset"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FixedAssetShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Update a fixed asset","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/{id}/adjustments":{"post":{"description":"addition (Dr asset / Cr offset_account_id), impairment (Dr offset_account_id loss / Cr asset; at most net book value less salvage), transfer (to_entity_id, intercompany; and/or category) or partial_disposal (amount = cost removed, accumulated removed in proportion, proceeds and gain/loss). Depreciation must be posted through the month before `date` and not for `date`'s month or later (reverse those runs first); a partial disposal may not leave net book value below salvage; the book schedule then rebases from the adjustment month over the remaining life. Needs post_journal. Audited. Requires the accounting:write scope. estimate_change (ASC 250-10-45-17) posts no entry: the asset takes the new life, salvage or method and the schedule rebases from the adjustment month, holding accumulated depreciation through the month before.","operationId":"createCompanyAccountingAssetAdjustment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"adjustment":{"properties":{"amount":{"type":"string"},"book_life_months":{"description":"estimate_change: new total life in months from the in-service date.","maximum":1200,"minimum":1,"type":"integer"},"book_method":{"description":"estimate_change: new book method (not to or from UOP).","enum":["SL","DDB","DB150","SYD"],"type":"string"},"category":{"type":["string","null"]},"date":{"format":"date","type":"string"},"gain_account_id":{"type":["integer","null"]},"kind":{"enum":["addition","impairment","transfer","partial_disposal","estimate_change"],"type":"string"},"loss_account_id":{"type":["integer","null"]},"memo":{"type":["string","null"]},"offset_account_id":{"type":["integer","null"]},"proceeds":{"type":"string"},"proceeds_account_id":{"type":["integer","null"]},"salvage":{"description":"estimate_change: new salvage value (at most net book value).","type":"string"},"to_entity_id":{"type":["integer","null"]}},"required":["kind","date"],"type":"object"}},"required":["adjustment"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AssetAdjustment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict, including an Idempotency-Key reused for a different request or still in progress"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Post an asset adjustment","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/{id}/attachments":{"get":{"description":"Oldest first. Needs view_ledger and the parent's entity scope. Requires the accounting:read scope.","operationId":"listCompanyAccountingAssetAttachments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctAttachment"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"List attachments on a fixed asset","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Multipart upload (one `file` part, allow-listed type, up to MAX_UPLOAD_BYTES). Allowed after posting: attachments are not ledger data. Writes an attachment_added audit event on the parent in the same transaction. Needs post_journal and the parent's entity scope. Requires the accounting:write scope.","operationId":"createCompanyAccountingAssetAttachment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctAttachment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused for a different request or still in progress"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Request body too large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing file, empty file, too large, or a type that is not allowed"}},"summary":"Attach a file to a fixed asset","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/{id}/dispose":{"post":{"description":"With `preview: true` returns the plan without posting (200, read scope suffices). Otherwise posts catch-up depreciation through the month before disposal, then the disposal entry (remove cost and accumulated depreciation, record proceeds and selling costs, gain to 7200 or loss to 8200 unless accounts are given) and marks the asset disposed (201). Needs post_journal. Audited. Requires the accounting:write scope. A project-scoped (project_manager_view) grant gets 403, preview included.","operationId":"disposeCompanyAccountingAsset","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"disposal":{"properties":{"date":{"format":"date","type":"string"},"gain_account_id":{"type":["integer","null"]},"loss_account_id":{"type":["integer","null"]},"preview":{"type":"boolean"},"proceeds":{"oneOf":[{"type":"string"},{"type":"number"}]},"proceeds_account_id":{"type":["integer","null"]},"selling_costs":{"oneOf":[{"type":"string"},{"type":"number"}]}},"required":["date","proceeds"],"type":"object"}},"required":["disposal"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Disposal"}}},"description":"OK"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Disposal"}}},"description":"Posted"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Dispose of a fixed asset","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/{id}/meter_readings":{"post":{"description":"Units used in a month (YYYY-MM) for a units-of-production asset; replaces that month's reading. The next depreciation run catches up to base x cumulative units / total units. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingAssetMeterReading","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"meter_reading":{"properties":{"period":{"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","type":"string"},"units":{"type":"string"}},"required":["period","units"],"type":"object"}},"required":["meter_reading"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"asset_id":{"type":"integer"},"period":{"type":"string"},"units":{"type":"string"}},"required":["asset_id","period","units"],"type":"object"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Record a UOP meter reading","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/{id}/undo_disposal":{"post":{"description":"Reverses the disposal entry and its depreciation true-up on `date` with a reason, and returns the asset to active. Repeating with the same date and reason returns the asset unchanged. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"undoDisposalCompanyAccountingAsset","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reversal":{"properties":{"date":{"format":"date","type":"string"},"reason":{"minLength":3,"type":"string"}},"required":["date","reason"],"type":"object"}},"required":["reversal"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FixedAssetShow"}}},"description":"Reversed"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Undo a disposal","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/assets/{id}/void":{"post":{"description":"Reverses the acquisition entry (if any) on `date` with a reason and sets status voided. Refused (422) once depreciation or an adjustment has posted: dispose of the asset instead. Repeating with the same date and reason returns the asset unchanged; a different one is 409. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"voidCompanyAccountingAsset","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reversal":{"properties":{"date":{"format":"date","type":"string"},"reason":{"minLength":3,"type":"string"}},"required":["date","reason"],"type":"object"}},"required":["reversal"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FixedAssetShow"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Void an asset added in error","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/attachments/{id}":{"get":{"description":"Returns the stored bytes as application/octet-stream with Content-Disposition: attachment (never rendered inline). Access is re-checked against the parent record. Requires the accounting:read scope.","operationId":"getCompanyAccountingAttachment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"File bytes"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Download an attachment","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts":{"get":{"description":"Bank, savings, money market, cash and credit card registers, each tied to one GL account. Bank numbers are masked. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingBankingAccounts","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter by active","in":"query","name":"active","required":false,"schema":{"enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_BankAccount"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List bank and card accounts","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Links an existing GL account (bank/cash, or credit_card for cards) or creates one (`create_gl_account`). Needs manage_coa; bank numbers need manage_vendor_banking. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingBankingAccount","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bank_account":{"properties":{"account_number":{"description":"4–17 digits; needs manage_vendor_banking; encrypted at rest","type":["string","null"]},"create_gl_account":{"type":"boolean"},"csv_mapping":{"anyOf":[{"properties":{"amount":{"type":["string","integer"]},"balance":{"type":["string","integer"]},"check_number":{"type":["string","integer"]},"credit":{"type":["string","integer"]},"date":{"type":["string","integer"]},"date_format":{"enum":["YYYYMMDD","MMDDYYYY","MMDDYY","YYMMDD","MM/DD/YYYY","YYYY-MM-DD"],"type":"string"},"debit":{"type":["string","integer"]},"delimiter":{"type":"string"},"description":{"type":["string","integer"]},"has_header":{"type":"boolean"},"reference":{"type":["string","integer"]},"sign":{"enum":["deposit_positive","withdrawal_positive"],"type":"string"},"skip_rows":{"type":"integer"}},"required":["date","description"],"type":"object"},{"type":"null"}]},"currency":{"description":"ISO 4217 code. Must equal the company base currency (AcctSettings.baseCurrency); any other value is refused with 422 until multi-currency exists. Defaults to the base currency.","type":"string"},"entity_id":{"type":["integer","null"]},"gl_account_id":{"type":["integer","null"]},"institution":{"type":["string","null"]},"is_active":{"type":"boolean"},"kind":{"enum":["checking","savings","money_market","credit_card","cash"],"type":"string"},"low_balance_threshold":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"match_window_days":{"type":"integer"},"name":{"type":"string"},"next_check_number":{"type":["integer","null"]},"positive_pay_options":{"description":"Positive pay layout: CSV (format csv or omitted: columns, dateFormat, header, statusCodes) or fixed-width (format fixed with template: recordLength, dateFormat, statusCodes, detail/header/trailer fields of source, start, length, align, pad, value).","type":["object","null"]},"receipt_required_over":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"routing_number":{"description":"9 digits; needs manage_vendor_banking","type":["string","null"]}},"required":["name","kind"],"type":"object"}},"required":["bank_account"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankAccount"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Create a bank account","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}":{"get":{"description":"One bank account with masked numbers. Requires the accounting:read scope.","operationId":"getCompanyAccountingBankingAccount","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankAccount"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"Show a bank account","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Name, institution, controls, CSV mapping, check numbering. Account and routing numbers need manage_vendor_banking and are not applied: they become pending_bank_change (audited bank_change_requested) until a second manage_vendor_banking user approves them via POST .../bank_change. entity_id can't change once the account's GL account has journal lines (422). Requires the accounting:write scope.","operationId":"updateCompanyAccountingBankingAccount","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bank_account":{"properties":{"account_number":{"description":"4–17 digits; needs manage_vendor_banking; encrypted at rest","type":["string","null"]},"create_gl_account":{"type":"boolean"},"csv_mapping":{"anyOf":[{"properties":{"amount":{"type":["string","integer"]},"balance":{"type":["string","integer"]},"check_number":{"type":["string","integer"]},"credit":{"type":["string","integer"]},"date":{"type":["string","integer"]},"date_format":{"enum":["YYYYMMDD","MMDDYYYY","MMDDYY","YYMMDD","MM/DD/YYYY","YYYY-MM-DD"],"type":"string"},"debit":{"type":["string","integer"]},"delimiter":{"type":"string"},"description":{"type":["string","integer"]},"has_header":{"type":"boolean"},"reference":{"type":["string","integer"]},"sign":{"enum":["deposit_positive","withdrawal_positive"],"type":"string"},"skip_rows":{"type":"integer"}},"required":["date","description"],"type":"object"},{"type":"null"}]},"currency":{"description":"ISO 4217 code. Must equal the company base currency (AcctSettings.baseCurrency); any other value is refused with 422 until multi-currency exists. Defaults to the base currency.","type":"string"},"entity_id":{"type":["integer","null"]},"gl_account_id":{"type":["integer","null"]},"institution":{"type":["string","null"]},"is_active":{"type":"boolean"},"kind":{"enum":["checking","savings","money_market","credit_card","cash"],"type":"string"},"low_balance_threshold":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"match_window_days":{"type":"integer"},"name":{"type":"string"},"next_check_number":{"type":["integer","null"]},"positive_pay_options":{"description":"Positive pay layout: CSV (format csv or omitted: columns, dateFormat, header, statusCodes) or fixed-width (format fixed with template: recordLength, dateFormat, statusCodes, detail/header/trailer fields of source, start, length, align, pad, value).","type":["object","null"]},"receipt_required_over":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"routing_number":{"description":"9 digits; needs manage_vendor_banking","type":["string","null"]}},"type":"object"}},"required":["bank_account"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankAccount"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Update a bank account","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}/activity_preview":{"post":{"description":"Requires accounting:read token scope, manageIntegrations and bankReconcile, accounting MFA and whole-account entity access. Mapping is a transient operator assertion. Source polarity is preserved, never interpreted as statement direction. No provider calls, imports, matches, receipts, jobs or postings. Supported settlement exponents: USD/CAD/EUR/GBP=2, JPY=0, KWD=3; other currencies excluded. No local duplicate identity inferred.","operationId":"activityPreviewCompanyAccountingBankingAccount","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"currency":{"pattern":"^[A-Z]{3}$","type":"string"},"entity_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"external_entity_id":{"maxLength":200,"minLength":1,"type":"string"},"sandbox_confirmed":{"enum":[true],"type":"boolean"},"source_page":{"description":"One selected sandbox transaction response JSON page, at most 256 KiB UTF-8 and 100 data rows. entity_amount and merchant_amount are currency/value integer minor-unit objects.","maxLength":262144,"type":"string"}},"required":["sandbox_confirmed","external_entity_id","entity_id","currency","source_page"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"account":{"properties":{"company_id":{"type":"integer"},"currency":{"type":"string"},"entity_id":{"type":"integer"},"gl_account_id":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"actions_available":{"enum":[false],"type":"boolean"},"counts":{"properties":{"conflict":{"type":"integer"},"duplicate":{"type":"integer"},"evidence_only":{"type":"integer"},"excluded":{"type":"integer"},"rows":{"type":"integer"}},"type":"object"},"existing_record_identity":{"enum":["not_established"],"type":"string"},"external_entity_id":{"type":"string"},"has_more":{"type":"boolean"},"rows":{"items":{"properties":{"external_id":{"nullable":true,"type":"string"},"merchant":{"nullable":true,"type":"string"},"merchant_amount":{"nullable":true,"properties":{"currency":{"type":"string"},"signed_major_units":{"nullable":true,"type":"string"},"signed_minor_units":{"type":"string"}},"required":["currency","signed_minor_units","signed_major_units"],"type":"object"},"reasons":{"items":{"type":"string"},"type":"array"},"row":{"type":"integer"},"settlement":{"nullable":true,"properties":{"currency":{"type":"string"},"signed_major_units":{"nullable":true,"type":"string"},"signed_minor_units":{"type":"string"}},"required":["currency","signed_minor_units","signed_major_units"],"type":"object"},"settlement_date":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"status":{"enum":["evidence_only","excluded","duplicate","conflict"],"type":"string"}},"required":["row","external_id","state","settlement_date","merchant","settlement","merchant_amount","status","reasons"],"type":"object"},"maxItems":100,"type":"array"},"statement_direction":{"enum":["unverified"],"type":"string"}},"required":["account","external_entity_id","rows","counts","has_more","statement_direction","existing_record_identity","actions_available"],"type":"object"}}},"description":"Transient evidence; private, no-store"},"400":{"description":"Malformed JSON request"},"401":{"description":"Authentication required"},"403":{"description":"Scope or authority denied"},"404":{"description":"Account outside access"},"409":{"description":"Target account changed"},"413":{"description":"Request above 512 KiB or response page above 256 KiB"},"415":{"description":"JSON Content-Type required"},"422":{"description":"Invalid mapping, input, page or target account"}},"summary":"Inspect one sandbox card activity response without persistence","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}/bank_change":{"post":{"description":"A manage_vendor_banking user other than the requester applies or discards pending_bank_change. change_hash must match the change reviewed (409 stale_change otherwise). Audited as bank_changed or bank_change_rejected. Requires the accounting:write scope.","operationId":"bankChangeCompanyAccountingBankingAccount","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"change_hash":{"pattern":"^[0-9a-f]{64}$","type":"string"},"decision":{"enum":["approve","reject"],"type":"string"}},"required":["decision","change_hash"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankAccount"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No access, missing manage_vendor_banking, or you requested this change"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The pending change was replaced after review"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error, or no pending change"}},"summary":"Approve or reject a pending bank number change","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}/inbox":{"get":{"description":"Statement lines with one suggestion each: a match (source match; confidence high = amount + reference/payee/check number agree, medium = unique amount or a combination, low = several candidates) or a bank rule. Each book item is offered to one line only. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingBankingAccountInbox","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Default unmatched","in":"query","name":"status","required":false,"schema":{"enum":["unmatched","matched","ignored","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Inbox"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Matching inbox","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}/inbox/accept_high":{"post":{"description":"Matches every high-confidence suggestion on the account (book lines become cleared, not reconciled). Needs bank_reconcile. Requires the accounting:write scope.","operationId":"createCompanyAccountingBankingAccountInboxAcceptHigh","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcceptHighResult"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"Accept all High matches","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}/outstanding":{"get":{"description":"Deposits in transit and outstanding payments as of a date, with the proof book balance = reconciled and void + outstanding (difference 0.00). The item lists are paginated (Total counts both lists); totals always cover every outstanding line. Requires the accounting:read scope.","operationId":"listCompanyAccountingBankingAccountOutstanding","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Default today","in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}},{"description":"Page (1-based)","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Items per page","in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Outstanding"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Per-Page":{"description":"Items per page","schema":{"type":"integer"}},"Total":{"description":"Total number of items","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Outstanding items","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}/positive_pay":{"post":{"description":"CSV issue file of checks not yet sent plus voids of checks the bank already has. Generated on demand, never stored; marks the checks sent unless dry_run. A dry run returns counts and totals only (content is empty: the file carries the decrypted account number). Pending checks are not included until released. Needs release_payments; audited. Requires the accounting:write scope.","operationId":"positivePayCompanyAccountingBankingAccount","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"positive_pay":{"properties":{"dry_run":{"type":"boolean"}},"type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PositivePayFile"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Generate a positive pay file","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}/positive_pay/batches":{"get":{"description":"Positive pay files sent from this account (banking and AP run files), newest first: counts and totals only. Needs release_payments. Requires the accounting:read scope.","operationId":"listCompanyAccountingBankingAccountPositivePayBatches","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_PositivePayBatch"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"List positive pay batches","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}/positive_pay/batches/{batch_id}/regenerate":{"post":{"description":"Rebuilds a sent batch (for a lost download): the same checks with the status each was sent with, under the original file name. Marks nothing. A batch holds only the rows it marked first (an AP run file that repeated rows an earlier file sent regenerates without them), and the current account number and file options are used. Needs release_payments; audited as positive_pay_regenerated. Requires the accounting:write scope.","operationId":"regenerateCompanyAccountingBankingAccountPositivePayBatch","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"batch_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PositivePayRegenerated"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Regenerate a positive pay batch","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}/receipt_capture":{"get":{"description":"Read only. Requires accounting:read token scope, bankReconcile and whole-account access; project-scoped grants refused. Non-void card charges strictly above the current Decimal account threshold with no submission history. Legacy assertions do not exclude work. Scoped ascending line-ID cursor; no counts. Final common authorization/state snapshot; 409 if changed. No import, matching or financial writes.","operationId":"listCompanyAccountingBankingAccountReceiptCapture","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"after","schema":{"default":0,"maximum":2147483647,"minimum":0,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":25,"maximum":25,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"account":{"properties":{"company_id":{"type":"integer"},"currency":{"type":"string"},"entity_id":{"nullable":true,"type":"integer"},"gl_account_id":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"},"receipt_required_over":{"nullable":true,"type":"string"}},"type":"object"},"items":{"items":{"properties":{"amount":{"type":"string"},"href":{"type":"string"},"legacy_has_receipt":{"type":"boolean"},"line_id":{"type":"integer"},"line_no":{"type":"integer"},"payee":{"nullable":true,"type":"string"},"transaction_date":{"format":"date","type":"string"},"transaction_id":{"type":"integer"},"transaction_number":{"type":"string"},"transaction_status":{"type":"string"}},"required":["line_id","line_no","transaction_id","transaction_number","transaction_status","amount","href","transaction_date","payee","legacy_has_receipt"],"type":"object"},"maxItems":25,"type":"array"},"next_after":{"nullable":true,"type":"integer"},"per_page":{"maximum":25,"type":"integer"}},"required":["account","items","per_page","next_after"],"type":"object"}}},"description":"Current scoped capture work; private, no-store","headers":{"Cache-Control":{"schema":{"type":"string"}}}},"401":{"description":"Authentication required"},"403":{"description":"Scope/authority denied"},"404":{"description":"Account outside access"},"409":{"description":"Work changed; reload"},"422":{"description":"Invalid query or inactive/non-card account"}},"summary":"First receipt submissions needed for existing native card charge lines","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}/reconciliations":{"get":{"description":"Sessions for the account, latest statement first. Paginated. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingBankingAccountReconciliations","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Page (1-based)","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Items per page","in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Reconciliation"},"type":"array"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Per-Page":{"description":"Items per page","schema":{"type":"integer"}},"Total":{"description":"Total number of items","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"List reconciliations","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Beginning balance = the sum of reconciled lines; lines already cleared on or before the statement date are pre-ticked. One session in progress per account; the date must follow the last finished one. Needs bank_reconcile. Requires the accounting:write scope.","operationId":"createCompanyAccountingBankingAccountReconciliation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reconciliation":{"properties":{"statement_date":{"format":"date","type":"string"},"statement_ending_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["statement_date","statement_ending_balance"],"type":"object"}},"required":["reconciliation"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ReconciliationShow"}}},"description":"Started"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Start a reconciliation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}/register":{"get":{"description":"Posted lines on the account's GL account, newest first, with a running balance and the reconcile state (n new, c cleared, y reconciled and locked, v void). Paginated. Requires the accounting:read scope.","operationId":"listCompanyAccountingBankingAccountRegister","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"From date","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"To date","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"Page (1-based)","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Items per page","in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_RegisterLine"},"type":"array"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Per-Page":{"description":"Items per page","schema":{"type":"integer"}},"Total":{"description":"Total number of items","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Account register","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}/reveal":{"post":{"description":"Full account and routing numbers. manage_vendor_banking only; writes a pii_revealed audit event. Not cached. Requires the accounting:write scope.","operationId":"revealCompanyAccountingBankingAccount","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RevealedNumbers"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"Reveal bank numbers","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/accounts/{id}/statement_imports":{"get":{"description":"Statement files imported into this account, newest first. Paginated (default 100 per page). Requires the accounting:read scope.","operationId":"listCompanyAccountingBankingAccountStatementImports","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Page (1-based)","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Items per page","in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_StatementImport"},"type":"array"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Per-Page":{"description":"Items per page","schema":{"type":"integer"}},"Total":{"description":"Total number of items","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"List statement imports","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Parses CSV (with a column mapping), OFX/QFX, BAI2 or camt.053 through the shared statement parsers. The same file can't be imported twice (409); lines already imported (bank id, else a line hash) are skipped and counted. Needs bank_reconcile. Requires the accounting:write scope.","operationId":"createCompanyAccountingBankingAccountStatementImport","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"statement_import":{"properties":{"content":{"type":"string"},"csv_mapping":{"properties":{"amount":{"type":["string","integer"]},"balance":{"type":["string","integer"]},"check_number":{"type":["string","integer"]},"credit":{"type":["string","integer"]},"date":{"type":["string","integer"]},"date_format":{"enum":["YYYYMMDD","MMDDYYYY","MMDDYY","YYMMDD","MM/DD/YYYY","YYYY-MM-DD"],"type":"string"},"debit":{"type":["string","integer"]},"delimiter":{"type":"string"},"description":{"type":["string","integer"]},"has_header":{"type":"boolean"},"reference":{"type":["string","integer"]},"sign":{"enum":["deposit_positive","withdrawal_positive"],"type":"string"},"skip_rows":{"type":"integer"}},"required":["date","description"],"type":"object"},"file_name":{"type":["string","null"]},"format":{"enum":["csv","ofx","qfx","bai2","camt053"],"type":"string"},"positive_pay_options":{"description":"Positive pay layout: CSV (format csv or omitted: columns, dateFormat, header, statusCodes) or fixed-width (format fixed with template: recordLength, dateFormat, statusCodes, detail/header/trailer fields of source, start, length, align, pad, value).","type":["object","null"]},"save_mapping":{"type":"boolean"}},"required":["format","content"],"type":"object"}},"required":["statement_import"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_StatementImport"}}},"description":"Imported"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Import a statement","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/cash_forecast":{"get":{"description":"Weekly projection of the cash (non-card) accounts: opening book balance plus postdated cash lines, recurring journals touching cash, and (unless trend=false) the trailing 13-week run rate excluding transfers. Each flow names its source. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingBankingCashForecast","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Default today","in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}},{"description":"1–52, default 13","in":"query","name":"weeks","required":false,"schema":{"type":"integer"}},{"description":"Include run rate","in":"query","name":"trend","required":false,"schema":{"enum":["true","false"],"type":"string"}},{"description":"Include open AP bills (due date), draft payment runs (pay date), open AR (due date plus ar_lag_days) and payroll (unposted runs and each pay group's next regular runs); default true","in":"query","name":"open_items","required":false,"schema":{"enum":["true","false"],"type":"string"}},{"description":"Days after the due date AR is expected to collect; default 0","in":"query","name":"ar_lag_days","required":false,"schema":{"maximum":365,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CashForecast"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Cash forecast","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/cash_position":{"get":{"description":"Per account: book, reconciled and cleared balances, outstanding items, last reconciliation and statement, lines to match; totals for cash and cards owed. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingBankingCashPosition","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Default today","in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CashPosition"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Cash position","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/checks/{id}/stop":{"post":{"description":"Marks an issued check in the register (banking, AP or payroll) as stopped; the next positive pay file sends it to the bank with the stop status. The books do not change: void or reissue the check to move the money. release_payments; audited. Requires the accounting:write scope.","operationId":"stopCompanyAccountingBankingCheck","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"stop":{"additionalProperties":false,"properties":{"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}},"required":["stop"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"description":"Null for a payroll check (net pay stays with payroll).","pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"bank_account_id":{"type":"integer"},"check_number":{"type":"string"},"id":{"type":"integer"},"payee":{"description":"Null for a payroll check.","type":["string","null"]},"status":{"enum":["stop"],"type":"string"}},"required":["id","check_number","bank_account_id","status","amount","payee"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Check not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The check is not issued, or validation failed"}},"summary":"Stop payment on a check","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/feeds":{"get":{"description":"Connections in the grant's entity scope (a connection without an entity is visible to all-entity grants only). `enabled` is false when feeds are not configured on this server. Entity-wide: a project-scoped grant gets 403. Requires the accounting:read scope.","operationId":"listCompanyAccountingBankingFeeds","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"connections":{"items":{"$ref":"#/components/schemas/accounting_BankFeedConnection"},"type":"array"},"enabled":{"type":"boolean"}},"required":["enabled","connections"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (project-scoped grants are refused), wrong company, or read-only workspace"}},"summary":"List live bank feed connections","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Exchanges the provider Link public token and stores the connection; the access token is encrypted, bound to the row and never returned. Needs manage_integrations and bank_reconcile. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingBankingFeed","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"entity_id":{"type":["integer","null"]},"institution_name":{"type":["string","null"]},"public_token":{"type":"string"}},"required":["public_token"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankFeedConnection"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (project-scoped grants are refused), wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, already linked or already fed, or the start date reaches reconciled history)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Live bank feeds are not configured on this server (PLAID_CLIENT_ID, PLAID_SECRET, PLAID_ENV), or encryption is not configured"}},"summary":"Link a bank (exchange a Link public token)","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/feeds/link_token":{"post":{"description":"A provider Link token for a new connection, or update mode (reconnect after login_required, or add accounts) with `connection_id`. Needs manage_integrations and bank_reconcile. Requires the accounting:write scope.","operationId":"createCompanyAccountingBankingFeedsLinkToken","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"connection_id":{"type":"integer"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"expires_at":{"format":"date-time","type":"string"},"link_token":{"type":"string"}},"required":["link_token","expires_at"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (project-scoped grants are refused), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, already linked or already fed, or the start date reaches reconciled history)"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Live bank feeds are not configured on this server (PLAID_CLIENT_ID, PLAID_SECRET, PLAID_ENV), or encryption is not configured"}},"summary":"Create a bank Link token","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/feeds/{id}":{"delete":{"description":"Removes the Item at the provider (best effort), forgets the token and cursor, sets status disconnected and unmaps its bank accounts. Statement lines stay. Needs manage_integrations and bank_reconcile. Audited. Requires the accounting:write scope.","operationId":"deleteCompanyAccountingBankingFeed","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankFeedConnection"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (project-scoped grants are refused), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"Disconnect a live bank feed","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"get":{"description":"Entity-wide: a project-scoped grant gets 403. Requires the accounting:read scope.","operationId":"getCompanyAccountingBankingFeed","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankFeedConnection"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (project-scoped grants are refused), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"Show a live bank feed connection","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/feeds/{id}/accounts":{"patch":{"description":"Map, remap or unmap (bank_account_id null) each provider account. start_date is the first day the feed owns (default: the day after the account's latest statement line, else 30 days ago); it may not be on or before the last finished reconciliation (409). A bank account fed by another connection is refused (409); one outside the connection's entity is 404. Mapping queues a sync. Needs manage_integrations and bank_reconcile. Audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingBankingFeedAccounts","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"mappings":{"items":{"additionalProperties":false,"properties":{"bank_account_id":{"type":["integer","null"]},"feed_account_id":{"type":"string"},"start_date":{"format":"date","type":"string"}},"required":["feed_account_id","bank_account_id"],"type":"object"},"type":"array"}},"required":["mappings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankFeedConnection"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (project-scoped grants are refused), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, already linked or already fed, or the start date reaches reconciled history)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Map feed accounts to bank accounts","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/feeds/{id}/sync":{"post":{"description":"Queues a sync job (one per connection per minute; never syncs inline). New posted transactions become statement lines in the matching inbox; pending ones are skipped. Needs bank_reconcile. Requires the accounting:write scope.","operationId":"syncCompanyAccountingBankingFeed","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"job_id":{"type":"integer"}},"required":["job_id"],"type":"object"}}},"description":"Accepted"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (project-scoped grants are refused), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, already linked or already fed, or the start date reaches reconciled history)"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Live bank feeds are not configured on this server (PLAID_CLIENT_ID, PLAID_SECRET, PLAID_ENV), or encryption is not configured"}},"summary":"Sync a live bank feed now","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/receipt_reviews":{"get":{"description":"Requires accounting:read and live bankReconcile. Excludes project-scoped grants and inaccessible, shared or mixed-entity accounts according to the existing bank artifact policy. Scope and independence precede keyset pagination. Includes stale pending submissions for explicit rejection; never mutates financial state. No total count is exposed.","operationId":"listCompanyAccountingBankingReceiptReviews","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Exclusive submission ID cursor from next_after.","in":"query","name":"after","schema":{"default":0,"maximum":2147483647,"minimum":0,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":25,"maximum":50,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"properties":{"amount":{"nullable":true,"pattern":"^[0-9]+\\.[0-9]{2}$","type":"string"},"attachment":{"nullable":true,"properties":{"download_url":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name","download_url"],"type":"object"},"bank_account_name":{"type":"string"},"currency":{"type":"string"},"evidence_type":{"enum":["receipt","exception"],"type":"string"},"line_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"line_no":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"review_url":{"description":"Exact submission anchor on the existing authorized transaction detail.","type":"string"},"status":{"enum":["pending","stale"],"type":"string"},"submission_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"submitted_at":{"format":"date-time","type":"string"},"transaction_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"transaction_number":{"type":"string"}},"required":["submission_id","transaction_id","transaction_number","line_id","line_no","amount","currency","bank_account_name","submitted_at","evidence_type","status","review_url","attachment"],"type":"object"},"maxItems":50,"type":"array"},"next_after":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"per_page":{"maximum":50,"minimum":1,"type":"integer"}},"required":["items","per_page","next_after"],"type":"object"}}},"description":"Scoped queue page, oldest submission ID first."},"403":{"description":"Accounting read scope, bankReconcile or entity-wide authority missing."},"409":{"description":"Eligibility changed while loading; reload the queue."},"422":{"description":"Invalid cursor or page size."}},"summary":"List pending independent card receipt reviews","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/reconciliations/{id}":{"delete":{"description":"Drops the ticks; matched lines stay cleared. Requires the accounting:write scope. Also the recovery path for a session with invalid ledger links: those links are dropped without changing the lines they point at, and the audit entry lists them.","operationId":"deleteCompanyAccountingBankingReconciliation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Cancelled"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"}},"summary":"Cancel an in-progress reconciliation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"get":{"description":"The session with its lines (in progress: every candidate with a cleared flag; finished: the locked items) and totals with an explain trace. Requires the accounting:read scope.","operationId":"getCompanyAccountingBankingReconciliation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ReconciliationShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The session links a line that is not a valid bank ledger line for it (another account or tenant, dated after the statement, not posted, or in the wrong reconcile state). Cancel an in-progress session (DELETE) or undo a finished one to recover."}},"summary":"Show a reconciliation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"clear / unclear journal line ids (n ↔ c) and the statement ending balance, while in progress. Requires the accounting:write scope.","operationId":"updateCompanyAccountingBankingReconciliation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reconciliation":{"properties":{"clear":{"items":{"type":"integer"},"type":"array"},"statement_ending_balance":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"unclear":{"items":{"type":"integer"},"type":"array"}},"type":"object"}},"required":["reconciliation"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ReconciliationShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock). A 409 also means the session links an invalid bank ledger line (another account or tenant, dated after the statement, not posted, or in the wrong reconcile state); cancel it (DELETE) to recover."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Tick lines / change the statement balance","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/reconciliations/{id}/finish":{"post":{"description":"Only at a difference of 0.00, or with adjustment_reason, which posts an adjustment entry (to adjustment_account_id or SUSPENSE). The adjustment is refused (422) above settings.recon_adjustment_limit, or, when that is null, at or above require_approval_above (any difference when both are null): record the difference as a bank transaction, which a second person approves at or above the threshold, clear it, then finish. Every ticked line becomes reconciled (y) and is locked; the database refuses any later change to it outside an undo. Requires the accounting:write scope.","operationId":"finishCompanyAccountingBankingReconciliation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"finish":{"properties":{"adjustment_account_id":{"type":["integer","null"]},"adjustment_reason":{"type":"string"}},"type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ReconciliationShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock). A 409 also means the session links an invalid bank ledger line (another account or tenant, dated after the statement, not posted, or in the wrong reconcile state); cancel it (DELETE) to recover."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Finish a reconciliation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/reconciliations/{id}/review":{"post":{"description":"Independent sign-off of a finished reconciliation by a user with close_period or approve_journal who did not finish it (403 for the finisher). Sets reviewed_by_id and reviewed_at and is audited. 409 when the session is not finished or is already reviewed. Close readiness blocks (reconciliation_unreviewed) on a finished, unreviewed reconciliation dated in the period. No request body. Requires the accounting:write scope.","operationId":"reviewCompanyAccountingBankingReconciliation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ReconciliationShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not finished, already reviewed, or changed concurrently"}},"summary":"Review a finished reconciliation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/reconciliations/{id}/undo":{"post":{"description":"Controller only (close_period), latest finished session only. Reconciled lines go back to cleared. Audited. Requires the accounting:write scope.","operationId":"undoCompanyAccountingBankingReconciliation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"undo":{"properties":{"reason":{"type":"string"}},"required":["reason"],"type":"object"}},"required":["undo"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ReconciliationShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock). A 409 also means the session links an invalid bank ledger line (another account or tenant, dated after the statement, not posted, or in the wrong reconcile state); undo still succeeds for a finished session and drops those links, naming them in the audit entry."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Undo a reconciliation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/rules":{"get":{"description":"Rules in priority order. Requires the accounting:read scope.","operationId":"listCompanyAccountingBankingRules","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_BankRule"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List bank rules","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Text match (case-insensitive) plus direction and amount band, coding to a postable non-control account. Needs bank_reconcile. Requires the accounting:write scope.","operationId":"createCompanyAccountingBankingRule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bank_rule":{"properties":{"account_id":{"type":"integer"},"amount_max":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"amount_min":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"bank_account_id":{"type":["integer","null"]},"cost_code_id":{"type":["integer","null"]},"cost_type_id":{"type":["integer","null"]},"description_contains":{"type":"string"},"direction":{"enum":["in","out","any"],"type":"string"},"is_active":{"type":"boolean"},"memo":{"type":["string","null"]},"name":{"type":"string"},"priority":{"type":"integer"},"project_id":{"type":["integer","null"]},"vendor_id":{"type":["integer","null"]}},"required":["name","description_contains","account_id"],"type":"object"}},"required":["bank_rule"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankRule"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Create a bank rule","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/rules/{id}":{"delete":{"description":"Lines it matched keep their match. Requires the accounting:write scope.","operationId":"deleteCompanyAccountingBankingRule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"Delete a bank rule","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Any rule field. Requires the accounting:write scope.","operationId":"updateCompanyAccountingBankingRule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bank_rule":{"properties":{"account_id":{"type":"integer"},"amount_max":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"amount_min":{"pattern":"^-?\\d+\\.\\d{2}$","type":["string","null"]},"bank_account_id":{"type":["integer","null"]},"cost_code_id":{"type":["integer","null"]},"cost_type_id":{"type":["integer","null"]},"description_contains":{"type":"string"},"direction":{"enum":["in","out","any"],"type":"string"},"is_active":{"type":"boolean"},"memo":{"type":["string","null"]},"name":{"type":"string"},"priority":{"type":"integer"},"project_id":{"type":["integer","null"]},"vendor_id":{"type":["integer","null"]}},"type":"object"}},"required":["bank_rule"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankRule"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Update a bank rule","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/statement_lines/{id}/create_transaction":{"post":{"description":"Records the document the bank line represents (deposit/withdrawal, or card charge/credit), posts it, matches it, and optionally saves a bank rule from the coding. At or above the journal approval threshold the document is held as pending_approval and the line stays unmatched until a second person approves it (approval matches it); creating again from that line is refused with 409. A single line defaults to the full amount. Requires the accounting:write scope.","operationId":"createTransactionCompanyAccountingBankingStatementLine","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"create":{"properties":{"lines":{"items":{"properties":{"account_id":{"type":"integer"},"amount":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cost_code_id":{"type":["integer","null"]},"cost_type_id":{"type":["integer","null"]},"customer_id":{"type":["integer","null"]},"equipment_id":{"type":["integer","null"]},"has_receipt":{"type":"boolean"},"memo":{"type":["string","null"]},"project_id":{"type":["integer","null"]},"reportable_1099":{"description":"Checks and withdrawals to a 1099 vendor: false keeps the line off the 1099. Default true.","type":"boolean"},"vendor_id":{"type":["integer","null"]}},"required":["account_id"],"type":"object"},"type":"array"},"memo":{"type":["string","null"]},"payee":{"type":["string","null"]},"rule_id":{"type":["integer","null"]},"save_rule":{"properties":{"description_contains":{"type":"string"},"name":{"type":"string"}},"required":["name","description_contains"],"type":"object"}},"required":["lines"],"type":"object"}},"required":["create"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankTransaction"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Create from a statement line","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/statement_lines/{id}/feed_note/clear":{"post":{"description":"Clears the note the live feed left on a matched line it changed or removed. Needs bank_reconcile. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingBankingStatementLineFeedNoteClear","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_StatementLine"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (project-scoped grants are refused), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"Mark a bank feed note reviewed","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/statement_lines/{id}/ignore":{"post":{"description":"Moves an unmatched line out of the inbox. Requires the accounting:write scope.","operationId":"ignoreCompanyAccountingBankingStatementLine","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_StatementLine"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"}},"summary":"Ignore a statement line","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/statement_lines/{id}/match":{"post":{"description":"Matches one or more book lines (posted, on the account, not reconciled or void, not matched elsewhere) whose total equals the bank amount to the cent. Book lines become cleared. Needs bank_reconcile. Requires the accounting:write scope.","operationId":"matchCompanyAccountingBankingStatementLine","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"match":{"properties":{"journal_line_ids":{"items":{"type":"integer"},"type":"array"}},"required":["journal_line_ids"],"type":"object"}},"required":["match"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_StatementLine"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Match a statement line","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/statement_lines/{id}/restore":{"post":{"description":"Puts the line back in the inbox. Requires the accounting:write scope.","operationId":"restoreCompanyAccountingBankingStatementLine","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_StatementLine"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"}},"summary":"Restore an ignored statement line","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/statement_lines/{id}/unmatch":{"post":{"description":"Refused with 409 when a matched book line is reconciled (the lock). Requires the accounting:write scope.","operationId":"unmatchCompanyAccountingBankingStatementLine","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_StatementLine"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"}},"summary":"Unmatch a statement line","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/transactions":{"get":{"description":"Deposits, checks, withdrawals, transfers and card charges/credits. Filters: filters[bank_account_id], filters[kind], filters[status]; from/to; search (number, payee, memo, check #). Paginated. Delta sync: updated_since and/or cursor return changes in ascending (updated_at, id) order with Next-Cursor. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingBankingTransactions","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"From date","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"To date","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"Search","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Page (1-based)","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Items per page","in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"Delta sync: only rows created or changed at or after this time (ISO 8601 with offset). Switches the list to ascending (updated_at, id) order; page is ignored and Next-Cursor continues it. Re-read with a small overlap (a few seconds) and dedupe by id.","in":"query","name":"updated_since","schema":{"format":"date-time","type":"string"}},{"description":"Opaque keyset cursor from a previous response's Next-Cursor header; each page costs the same however deep it is.","in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_BankTransaction"},"type":"array"}}},"description":"OK","headers":{"Next-Cursor":{"description":"Delta sync only: cursor for the next page, present while a full page came back","schema":{"type":"string"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"List cash documents","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Posts one CM journal entry (idempotent on the document id), or holds the document as pending_approval with no posting until a second person approves it (POST .../approve): checks always (release by a different release_payments user), deposits, withdrawals and card documents at or above the journal approval threshold. Transfers between the company's own accounts follow the transfer policy (settings transfer_approval_cross_entity, default true, and transfer_approval_above, null = require_approval_above when set): a transfer between entities or at or above the amount is held for release by a different release_payments user; others post at once. Checks take the account's next check number unless one is given, need a payee, and need release_payments; the others need bank_reconcile. Coding lines must total the amount and can't use control accounts or other bank registers. Requires the accounting:write scope.","operationId":"createCompanyAccountingBankingTransaction","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bank_transaction":{"properties":{"amount":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"bank_account_id":{"type":"integer"},"check_number":{"type":["string","null"]},"date":{"format":"date","type":"string"},"kind":{"enum":["deposit","check","withdrawal","transfer","card_charge","card_credit"],"type":"string"},"lines":{"items":{"properties":{"account_id":{"type":"integer"},"amount":{"description":"Decimal string, 2 dp","pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"cost_code_id":{"type":["integer","null"]},"cost_type_id":{"type":["integer","null"]},"customer_id":{"type":["integer","null"]},"equipment_id":{"type":["integer","null"]},"has_receipt":{"type":"boolean"},"memo":{"type":["string","null"]},"project_id":{"type":["integer","null"]},"reportable_1099":{"description":"Checks and withdrawals to a 1099 vendor: false keeps the line off the 1099. Default true.","type":"boolean"},"vendor_id":{"type":["integer","null"]}},"required":["account_id","amount"],"type":"object"},"type":"array"},"memo":{"type":["string","null"]},"payee":{"type":["string","null"]},"payee_vendor_id":{"type":["integer","null"]},"reference":{"type":["string","null"]},"to_bank_account_id":{"type":["integer","null"]}},"required":["bank_account_id","kind","date","amount"],"type":"object"}},"required":["bank_transaction"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankTransaction"}}},"description":"Posted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Record and post a cash document","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/transactions/{id}":{"get":{"description":"One document with its coding lines; card charges flag receipt_missing above the account's threshold. Requires the accounting:read scope.","operationId":"getCompanyAccountingBankingTransaction","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankTransaction"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"Show a cash document","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/transactions/{id}/approve":{"post":{"description":"Posts a cash document that is waiting for a second person (status pending_approval): a check or transfer needs release_payments, any other kind approve_journal. Refused with 403 for the user who created it (segregation of duties) and 409 when it is not pending. Checks are always held for release; deposits, withdrawals and card documents are held at or above the journal approval threshold (settings.require_approval_above; null holds every one). Approval registers the check for positive pay and matches the statement line it was created from. Requires the accounting:write scope.","operationId":"approveCompanyAccountingBankingTransaction","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankTransaction"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Release or approve a pending cash document","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/transactions/{id}/attachments":{"get":{"description":"Oldest first. Needs view_ledger and the parent's entity scope. Requires the accounting:read scope.","operationId":"listCompanyAccountingBankingTransactionAttachments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctAttachment"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"List attachments on a bank transaction","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Multipart upload (one `file` part, allow-listed type, up to MAX_UPLOAD_BYTES). Allowed after posting: attachments are not ledger data. Writes an attachment_added audit event on the parent in the same transaction. Needs bank_reconcile and the parent's entity scope. Requires the accounting:write scope.","operationId":"createCompanyAccountingBankingTransactionAttachment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctAttachment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused for a different request or still in progress"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Request body too large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing file, empty file, too large, or a type that is not allowed"}},"summary":"Attach a file to a bank transaction","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/transactions/{id}/check_print":{"post":{"description":"MICR line, amount in words and stub for a check. Decrypts the bank numbers: release_payments only, audited, not cached. Requires the accounting:write scope.","operationId":"checkPrintCompanyAccountingBankingTransaction","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CheckPrint"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Check print data","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/transactions/{id}/receipt_evidence":{"get":{"description":"Read only. Requires accounting:read token scope and view access to the card account. Lists the card charge lines with their latest submission status and full submission history; never mutates financial state.","operationId":"listCompanyAccountingBankingTransactionReceiptEvidence","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"lines":{"items":{"properties":{"amount":{"pattern":"^[0-9]+\\.[0-9]{2}$","type":"string"},"history":{"items":{"properties":{"attachment_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"decision":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"outcome":{"enum":["verified","exception_approved","rejected"],"type":"string"},"reason":{"type":"string"},"reviewed_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["outcome","reason","reviewed_by_id","created_at"],"type":"object"},"exception_reason":{"nullable":true,"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"reviewer_is_independent":{"description":"Relationship eligibility only; review also requires live bankReconcile, entity scope and accounting:write token scope.","type":"boolean"},"submitted_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","attachment_id","exception_reason","submitted_by_id","created_at","reviewer_is_independent","decision"],"type":"object"},"type":"array"},"legacy_has_receipt":{"description":"Unverified legacy assertion; independent of reviewed evidence.","type":"boolean"},"line_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"line_no":{"maximum":2147483647,"minimum":1,"type":"integer"},"receipt_required":{"type":"boolean"},"status":{"enum":["unsubmitted","pending","verified","exception_approved","rejected","stale"],"type":"string"}},"required":["line_id","line_no","amount","legacy_has_receipt","status","receipt_required","history"],"type":"object"},"type":"array"},"transaction_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["transaction_id","attachments","lines"],"type":"object"}}},"description":"Success"},"403":{"description":"Token scope, grant or independence refused."},"404":{"description":"Source, account, line or attachment not accessible."},"409":{"description":"Stale evidence, pending submission or conflicting retry."},"422":{"description":"Invalid input or non-card transaction."}},"summary":"Read retained receipt evidence under bank-account scope","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Requires accounting:write token scope and bankReconcile on the card account. Attaches an uploaded receipt (or an exception reason) to one card charge line for independent review. request_key in the body makes retries safe: the same key and evidence returns the first submission, a different payload under the same key is refused (409). Creates no posting and does not change approval, void or reconciliation state.","operationId":"receiptEvidenceCompanyAccountingBankingTransaction","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Exactly one of attachment_id or exception_reason must be non-null. Attachment must belong to this transaction and company.","properties":{"attachment_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"exception_reason":{"maxLength":2000,"minLength":10,"nullable":true,"type":"string"},"line_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"request_key":{"description":"Same actor and exact payload replay the prior submission; reused with a different payload returns 409.","format":"uuid","type":"string"}},"required":["request_key","line_id","attachment_id","exception_reason"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"submission_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["submission_id"],"type":"object"}}},"description":"Success"},"403":{"description":"Token scope, grant or independence refused."},"404":{"description":"Source, account, line or attachment not accessible."},"409":{"description":"Stale evidence, pending submission or conflicting retry."},"422":{"description":"Invalid input or non-card transaction."}},"summary":"Submit line evidence for independent review","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/transactions/{id}/receipt_evidence/review":{"post":{"description":"Requires accounting:write token scope and bankReconcile on the card account. The reviewer must be independent of the charge creator, the submitter and the uploader. Decisions are immutable: an exact retry returns the recorded decision, anything else is refused (409). Creates no posting.","operationId":"createCompanyAccountingBankingTransactionReceiptEvidenceReview","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"outcome":{"enum":["verified","exception_approved","rejected"],"type":"string"},"reason":{"maxLength":2000,"minLength":3,"type":"string"},"submission_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["submission_id","outcome","reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"decision_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"outcome":{"enum":["verified","exception_approved","rejected"],"type":"string"}},"required":["decision_id","outcome"],"type":"object"}}},"description":"Success"},"403":{"description":"Token scope, grant or independence refused."},"404":{"description":"Source, account, line or attachment not accessible."},"409":{"description":"Stale evidence, pending submission or conflicting retry."},"422":{"description":"Invalid input or non-card transaction."}},"summary":"Record immutable independent review; exact reviewer/outcome/reason retries replay","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/banking/transactions/{id}/void":{"post":{"description":"Posts the reversing entry on the void date (an open period; a check from a closed month voids in the current one) and flags both bank lines void. Refused with 409 when the bank line is reconciled (the lock) or matched to a statement line. Requires the accounting:write scope. A pending_approval document is voided without any posting (withdrawn or rejected).","operationId":"voidCompanyAccountingBankingTransaction","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"void":{"properties":{"date":{"format":"date","type":"string"},"reason":{"type":"string"}},"required":["date","reason"],"type":"object"}},"required":["void"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BankTransaction"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (state, duplicate, or the reconciliation lock)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error"}},"summary":"Void a cash document","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/budgets":{"get":{"description":"Every budget version, newest fiscal year first. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingBudgets","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Budget"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List GL budgets","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"CSV with a header row `account,period,amount` and optional `entity` (entity code) and `department` (department name, case-insensitive; the company departments journal lines carry). Accounts are postable income-statement accounts by number; period is YYYY-MM inside the fiscal year when it exists; amounts have at most two decimals and are positive for revenue and expense alike. Every bad row is reported at once (422). Importing the same fiscal year and name again creates the next version. Compare on the income statement with `compare=budget&budget_id=`. Needs close_period and unrestricted entity access; audited. Honors Idempotency-Key. Requires the accounting:write scope.","operationId":"createCompanyAccountingBudget","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"budget":{"properties":{"csv":{"maxLength":2000000,"type":"string"},"fiscal_year":{"maximum":2100,"minimum":1990,"type":"integer"},"name":{"maxLength":100,"type":"string"}},"required":["fiscal_year","name","csv"],"type":"object"}},"required":["budget"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Budget"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Import a GL budget from CSV","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/budgets/variance":{"get":{"description":"Budget vs actual by account over whole months of one version: the approved (or locked) version of the fiscal year by default (latest approval), or budget_id. Income-statement rows compare the months' posted activity (closing entries left out) with the budget months; balance-sheet rows compare the posted balance at the last month's end with that month's budget balance. variance = actual − budget; variance_pct = variance ÷ |budget| × 100; favorable for revenue above budget and cost or expense below it. scenario_id compares against the scenario overlay of the version. An entity-scoped grant sees its entities only. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingBudgetsVariance","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"budget_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"fiscal_year","required":false,"schema":{"type":"integer"}},{"in":"query","name":"from","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}$","type":"string"}},{"in":"query","name":"to","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}$","type":"string"}},{"in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"scenario_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BudgetVariance"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Budget vs actual","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/budgets/versions":{"post":{"description":"A new draft version of the fiscal year and name (the next version number): blank, copied from another version (copy_from.kind version, optionally through a scenario overlay: the source version is not changed), or from a fiscal year's posted actuals (copy_from.kind actuals: income-statement activity by month, closing entries left out, or with accounts=all also balance-sheet month-end balances; factor_pct uplifts every amount). Month k of the source year lands on month k of the new year. Needs close_period and unrestricted entity access; audited. Honors Idempotency-Key. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"createCompanyAccountingBudgetsVersion","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"budget":{"properties":{"copy_from":{"oneOf":[{"properties":{"kind":{"const":"blank"}},"required":["kind"],"type":"object"},{"properties":{"budget_id":{"minimum":1,"type":"integer"},"kind":{"const":"version"},"scenario_id":{"minimum":1,"type":["integer","null"]}},"required":["kind","budget_id"],"type":"object"},{"properties":{"accounts":{"enum":["pl","all"]},"by_entity":{"type":"boolean"},"by_project":{"type":"boolean"},"factor_pct":{"type":["string","number"]},"fiscal_year":{"maximum":2100,"minimum":1990,"type":"integer"},"kind":{"const":"actuals"}},"required":["kind","fiscal_year"],"type":"object"}]},"description":{"type":["string","null"]},"fiscal_year":{"maximum":2100,"minimum":1990,"type":"integer"},"name":{"maxLength":100,"minLength":1,"type":"string"}},"required":["fiscal_year","name"],"type":"object"}},"required":["budget"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BudgetVersion"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Create a budget version","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/budgets/{id}":{"delete":{"description":"Needs close_period and unrestricted entity access; audited. Requires the accounting:write scope.","operationId":"deleteCompanyAccountingBudget","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Delete a GL budget version","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"get":{"description":"Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"getCompanyAccountingBudget","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Budget"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a GL budget with its lines","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/budgets/{id}/approve":{"post":{"description":"Approve a submitted version. Maker-checker: a user who created, edited or submitted the version is refused (403), also by a database trigger. The approved version is the default for budget vs actual and the income statement comparison. Needs approve_journal and unrestricted entity access; audited. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"approveCompanyAccountingBudget","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BudgetVersion"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict with the record's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Approve a budget version","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/budgets/{id}/cells":{"put":{"description":"Set cells of a draft version: each replaces every line on the same account, dimensions and month; amount 0 removes the cell. Accounts are postable accounts of any type (balance-sheet cells are month-end balances), periods are months of the version's fiscal year, a cost code needs its project. A submitted, approved or locked version is refused (409 budget_immutable). Needs close_period and unrestricted entity access; the editor joins the version's makers; audited. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"replaceCompanyAccountingBudgetCells","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"cells":{"items":{"properties":{"account_id":{"minimum":1,"type":"integer"},"amount":{"type":["string","number"]},"cost_code_id":{"minimum":1,"type":["integer","null"]},"department_id":{"minimum":1,"type":["integer","null"]},"dimension_value_id":{"minimum":1,"type":["integer","null"]},"entity_id":{"minimum":1,"type":["integer","null"]},"period":{"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","type":"string"},"project_id":{"minimum":1,"type":["integer","null"]}},"required":["account_id","period","amount"],"type":"object"},"maxItems":5000,"minItems":1,"type":"array"}},"required":["cells"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"net_change":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"updated":{"type":"integer"}},"required":["updated","net_change"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict with the record's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Set budget cells","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/budgets/{id}/grid":{"get":{"description":"The version as rows (account plus entity, department, project and cost code) by fiscal month, with the net income budget per month. editable is true only for a draft. Filters: account_id, project_id, entity_id. An entity-scoped grant sees its entities' lines. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingBudgetGrid","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"account_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BudgetGrid"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Budget grid","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/budgets/{id}/lock":{"post":{"description":"Lock an approved version: it can never change or be deleted (a trigger refuses any write). Needs close_period and unrestricted entity access; audited. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"lockCompanyAccountingBudget","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BudgetVersion"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict with the record's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Lock a budget version","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/budgets/{id}/return":{"post":{"description":"Send a submitted version back to draft with a reason. Needs approve_journal and unrestricted entity access; audited. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"returnCompanyAccountingBudget","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reason":{"maxLength":500,"minLength":1,"type":"string"}},"required":["reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BudgetVersion"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict with the record's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Return a budget version","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/budgets/{id}/spread":{"post":{"description":"Spread annual_amount over the fiscal year's months on one line of a draft: even, prior_year (the prior fiscal year's posted monthly activity on the same account and dimensions as weights; a negative month weighs zero; no activity is 422) or custom (twelve percents summing to 100). Each month takes the amount × weight ÷ Σ weights truncated to cents and the leftover cents go to the largest remainders, earlier months first, so the months add back exactly. Needs close_period; audited. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"spreadCompanyAccountingBudget","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"spread":{"properties":{"account_id":{"minimum":1,"type":"integer"},"annual_amount":{"type":["string","number"]},"cost_code_id":{"minimum":1,"type":["integer","null"]},"department_id":{"minimum":1,"type":["integer","null"]},"dimension_value_id":{"minimum":1,"type":["integer","null"]},"entity_id":{"minimum":1,"type":["integer","null"]},"method":{"enum":["even","prior_year","custom"]},"percents":{"items":{"type":["string","number"]},"maxItems":12,"minItems":12,"type":"array"},"project_id":{"minimum":1,"type":["integer","null"]}},"required":["account_id","annual_amount","method"],"type":"object"}},"required":["spread"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"months":{"items":{"properties":{"amount":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"period":{"type":"string"}},"required":["period","amount"],"type":"object"},"type":"array"}},"required":["months"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict with the record's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Spread a budget line","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/budgets/{id}/submit":{"post":{"description":"Submit a draft with lines for approval; the submitter joins the makers. Needs close_period and unrestricted entity access; audited. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"submitCompanyAccountingBudget","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BudgetVersion"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict with the record's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Submit a budget version","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/cecl_allowance":{"post":{"description":"Computes expected credit losses (ASC 326-20) from settings.cecl_policy loss rates on aged AR, disputed AR, retainage receivable and contract assets for one entity, and posts the difference to the allowance (ALLOWANCE_DOUBTFUL) against credit loss expense (BAD_DEBT_EXPENSE). Idempotent per entity and date; 422 when no policy or role account is set. Needs post_journal. Requires accounting:write.","operationId":"createCompanyAccountingCeclAllowance","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"as_of":{"format":"date","type":"string"},"entity_id":{"minimum":1,"type":"integer"}},"required":["entity_id","as_of"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"adjustment":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"entry":{"additionalProperties":true,"description":"The posted journal entry (JournalEntry fields), or null when nothing needed posting","type":["object","null"]}},"required":["entry","adjustment"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, entity outside the grant, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or refused"}},"summary":"Post the CECL allowance adjustment","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/alert_tests":{"get":{"description":"Alert delivery evidence, newest first: each requested test alert with one attempt per channel and recipient (email through the finance alert recipient path and the configured transport; a signed webhook test delivery per active subscription receiving accounting events, with its live outcome). Needs close_period; refused to project-scoped grants. Requires the accounting:read scope. See docs/accounting/INTERFACE-FAILURE-VERIFICATION.md.","operationId":"listCompanyAccountingCloseAlertTests","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AlertTest"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing close_period (or a project-scoped grant), wrong company, or read-only workspace"}},"summary":"Alert delivery tests","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Queues a test alert (job accounting_alert_test) to the finance alert recipients, by the same recipient resolution and email transport real finance alerts use, and, when the requester is a company administrator, a signed webhook.test delivery to each active subscription receiving accounting events. Idempotent on request_key: a repeat returns the existing test. Nobody is mailed twice by one test, even when its job is retried. Needs close_period; refused to project-scoped grants. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingCloseAlertTest","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"request_key":{"pattern":"^[A-Za-z0-9_-]{1,100}$","type":"string"}},"required":["request_key"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AlertTest"}}},"description":"Queued (or the existing test for this request_key)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing close_period (or a project-scoped grant), wrong company, accounting:read token, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid request_key"}},"summary":"Send a test alert","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/cockpit":{"get":{"description":"Progress by status and category, the critical path (longest chain of unfinished dependent tasks), overdue tasks, who is blocking whom, the reconciliation summary and what the period close would refuse now. entity_id omitted: the all-entities task list. Needs view_ledger; refused to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingCloseCockpit","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"The period","in":"query","name":"period_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Entity scope (omit for all entities)","in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CloseCockpit"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"period_id missing"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Period or entity not found"}},"summary":"Close cockpit","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/cockpit/generate":{"post":{"description":"Creates the scope's tasks for the period from a template (default: the settings' default); keys already present are kept. Needs close_period (all entities: unrestricted entity access). Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingCloseCockpitGenerate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"generate":{"additionalProperties":false,"properties":{"entity_id":{"minimum":1,"type":["integer","null"]},"period_id":{"minimum":1,"type":"integer"},"template_id":{"minimum":1,"type":["integer","null"]}},"required":["period_id"],"type":"object"}},"required":["generate"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CloseGenerateResult"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Period, entity or template not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No template given and no default set"}},"summary":"Generate close tasks","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/cockpit/sync":{"post":{"description":"Re-evaluates every evidence task of the scope (subledger tie-outs, module close readiness, depreciation, allocation, WIP and elimination runs, reconciliations): passing evidence completes the task (reviewed, auto-completed); a completed task whose evidence fails goes stale (not started, with the reason). Then auto-reconciles the scope's reconciliations. Needs close_period. Audited per change. Requires the accounting:write scope.","operationId":"createCompanyAccountingCloseCockpitSync","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"sync":{"additionalProperties":false,"properties":{"entity_id":{"minimum":1,"type":["integer","null"]},"period_id":{"minimum":1,"type":"integer"}},"required":["period_id"],"type":"object"}},"required":["sync"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CloseSyncResult"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Period or entity not found"}},"summary":"Refresh close evidence","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/flux":{"get":{"description":"Rows of one period for one entity (entity_id) or every entity the grant reaches, with the three comparisons, the threshold that applied, whether an explanation is required and the explanation state (none, explained, reviewed or stale). Needs view_ledger; refused to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingCloseFlux","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"period_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FluxAnalysis"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"period_id missing"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, a project-scoped grant, outside the entity scope or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Period or entity not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The adjusting period has no flux analysis"}},"summary":"Flux analysis of a period","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/flux/explanations":{"post":{"description":"Write or rewrite the explanation of one row (period, entity, account and, for a split account, dimension value). Needs post_journal and the entity in scope; the caller becomes the preparer. One explanation per row (natural key), so a repeat updates it; rewriting a reviewed explanation makes the review stale. The same text over moved figures confirms them for a fresh review. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingCloseFluxExplanation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"flux_explanation":{"additionalProperties":false,"properties":{"account_id":{"minimum":1,"type":"integer"},"dimension_value_id":{"minimum":1,"type":["integer","null"]},"entity_id":{"minimum":1,"type":"integer"},"explanation":{"maxLength":4000,"minLength":10,"type":"string"},"period_id":{"minimum":1,"type":"integer"}},"required":["period_id","entity_id","account_id","explanation"],"type":"object"}},"required":["flux_explanation"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FluxExplanation"}}},"description":"Saved"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing post_journal, outside the entity scope, project-scoped or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Period or entity not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body, or (explanations) no flux figures for that row"}},"summary":"Explain a flux row","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/flux/explanations/{id}":{"get":{"description":"The explanation with its live row (figures, comparisons, status and stale reason). Needs view_ledger and the entity in scope. Requires the accounting:read scope.","operationId":"getCompanyAccountingCloseFluxExplanation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/accounting_FluxExplanation"},{"properties":{"row":{"oneOf":[{"$ref":"#/components/schemas/accounting_FluxRow"},{"type":"null"}]}},"required":["row"],"type":"object"}]}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, outside the entity scope or project-scoped"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"Show a flux explanation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/flux/explanations/{id}/review":{"post":{"description":"Sign as reviewer: needs close_period and the entity in scope; the preparer is refused (403). Refused (409) when the figures or balance moved since the explanation was written (the preparer confirms it first) or when the review is already current. The reviewer signs a hash of the explanation, the figures and the cumulative posted debit and credit. Audited. Requires the accounting:write scope.","operationId":"reviewCompanyAccountingCloseFluxExplanation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"review":{"additionalProperties":false,"properties":{"note":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["note"],"type":"object"}},"required":["review"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FluxExplanation"}}},"description":"Reviewed"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing close_period, the preparer, outside the entity scope or project-scoped"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Figures moved since the explanation, already reviewed, or changed concurrently"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body, or (explanations) no flux figures for that row"}},"summary":"Review a flux explanation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/flux/settings":{"get":{"description":"Default thresholds, threshold mode, materiality floor and which comparisons apply. Needs view_ledger; refused to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingCloseFluxSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FluxSettings"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access or a project-scoped grant"}},"summary":"Flux settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"Owner or controller with close_period and unrestricted entity access. threshold_mode both: a variance needs an explanation when it reaches the amount AND the percent threshold; either: one of them. A variance below materiality_floor never does. Audited. Requires the accounting:write scope.","operationId":"replaceCompanyAccountingCloseFluxSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"flux_settings":{"additionalProperties":false,"properties":{"compare_budget":{"type":"boolean"},"compare_prior_period":{"type":"boolean"},"compare_prior_year":{"type":"boolean"},"default_amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"default_percent":{"pattern":"^\\d{1,5}(\\.\\d{1,4})?$","type":"string"},"materiality_floor":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"threshold_mode":{"enum":["both","either"]}},"required":["default_amount","default_percent","threshold_mode","materiality_floor","compare_prior_period","compare_prior_year","compare_budget"],"type":"object"}},"required":["flux_settings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FluxSettings"}}},"description":"Saved"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing close_period, not an owner or controller, entity-restricted, project-scoped or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body, or (explanations) no flux figures for that row"}},"summary":"Save flux settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/flux/thresholds":{"get":{"description":"Threshold overrides per account type or account. An account's own threshold wins over its type's; with neither, the settings' defaults apply. Needs view_ledger; refused to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingCloseFluxThresholds","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_FluxThreshold"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access or a project-scoped grant"}},"summary":"List flux thresholds","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"For exactly one of account_type or account_id. Owner or controller with close_period and unrestricted entity access; a second threshold for the same type or account is 409. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingCloseFluxThreshold","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"flux_threshold":{"additionalProperties":false,"properties":{"account_id":{"minimum":1,"type":["integer","null"]},"account_type":{"type":["string","null"]},"amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"is_active":{"type":"boolean"},"percent":{"pattern":"^\\d{1,5}(\\.\\d{1,4})?$","type":"string"}},"required":["amount","percent"],"type":"object"}},"required":["flux_threshold"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FluxThreshold"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing close_period, not an owner or controller, entity-restricted or project-scoped"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Account not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A threshold for the type or account exists"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body, or (explanations) no flux figures for that row"}},"summary":"Create a flux threshold","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/flux/thresholds/{id}":{"patch":{"description":"Change the amount, percent or active flag. Owner or controller with close_period and unrestricted entity access. Audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingCloseFluxThreshold","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"flux_threshold":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"is_active":{"type":"boolean"},"percent":{"pattern":"^\\d{1,5}(\\.\\d{1,4})?$","type":"string"}},"type":"object"}},"required":["flux_threshold"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FluxThreshold"}}},"description":"Updated"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing close_period, not an owner or controller, entity-restricted or project-scoped"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body, or (explanations) no flux figures for that row"}},"summary":"Update a flux threshold","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/rec_rules":{"get":{"description":"Needs view_ledger; refused to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingCloseRecRules","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_RecRule"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"}},"summary":"List reconciliation rules","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Which balance sheet accounts need a reconciliation (by account type or list, optionally per entity), the supporting source (auto picks the subledger tie-out by account type: AP, AR, retainage, payroll liabilities, fixed assets, WIP, bank; else manual schedule lines) and the materiality (absolute and percent of the GL balance) and risk that set the review level (high risk, or medium and material: two reviewers) and frequency (low risk and immaterial: quarterly). Owner or controller with close_period. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingCloseRecRule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"rec_rule":{"additionalProperties":false,"properties":{"account_ids":{"items":{"minimum":1,"type":"integer"},"maxItems":500,"type":"array"},"account_types":{"items":{"enum":["bank","cash","accounts_receivable","retainage_receivable","contract_asset","other_current_asset","inventory","fixed_asset","accumulated_depreciation","other_asset","accounts_payable","retainage_payable","contract_liability","credit_card","payroll_liability","sales_tax_payable","other_current_liability","long_term_liability","equity","retained_earnings"],"type":"string"},"maxItems":30,"type":"array"},"entity_ids":{"items":{"minimum":1,"type":"integer"},"maxItems":100,"type":"array"},"is_active":{"type":"boolean"},"materiality_abs":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"materiality_pct":{"pattern":"^\\d{1,3}(\\.\\d{1,4})?$","type":"string"},"name":{"maxLength":120,"minLength":3,"type":"string"},"risk_rating":{"enum":["low","medium","high"],"type":"string"},"source":{"enum":["auto","tie_out","manual"],"type":"string"},"tie_out_key":{"enum":["ap","ap_retainage","ar","ar_retainage","payroll","assets","cash_reconciliation","job_cost","wip","wip_revenue","prepaids",null],"type":["string","null"]}},"required":["name","source","materiality_abs","materiality_pct","risk_rating"],"type":"object"}},"required":["rec_rule"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RecRule"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid rule"}},"summary":"Create a reconciliation rule","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/rec_rules/{id}":{"patch":{"description":"Name, active flag, materiality or risk. Existing reconciliations keep the parameters they were generated with. Owner or controller with close_period. Audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingCloseRecRule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"rec_rule":{"additionalProperties":false,"properties":{"is_active":{"type":"boolean"},"materiality_abs":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"materiality_pct":{"type":"string"},"name":{"maxLength":120,"minLength":3,"type":"string"},"risk_rating":{"enum":["low","medium","high"],"type":"string"}},"required":[],"type":"object"}},"required":["rec_rule"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RecRule"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid change"}},"summary":"Update a reconciliation rule","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/reconciliations":{"get":{"description":"The period's reconciliations in the grant's entity scope, each with its live GL balance (period balance snapshots), supporting balance (subledger tie-out or schedule lines), open reconciling items, unexplained difference, staleness and item aging. Needs view_ledger; refused to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingCloseReconciliations","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"The period","in":"query","name":"period_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"One entity","in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"status","required":false,"schema":{"enum":["not_started","in_progress","prepared","reviewed"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AccountRec"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"period_id missing or unknown status"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Period not found"}},"summary":"List account reconciliations","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/reconciliations/generate":{"post":{"description":"Creates the period's due reconciliations (rules x accounts x entities with posted activity, due by frequency), carries open reconciling items and schedule lines forward from the latest earlier reconciliation with their original dates, then auto-reconciles those whose tie-out passes with nothing unexplained. Needs close_period. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingCloseReconciliationsGenerate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"generate":{"additionalProperties":false,"properties":{"entity_id":{"minimum":1,"type":["integer","null"]},"period_id":{"minimum":1,"type":"integer"}},"required":["period_id"],"type":"object"}},"required":["generate"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RecGenerateResult"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Period or entity not found"}},"summary":"Generate account reconciliations","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/reconciliations/{id}":{"get":{"description":"Needs view_ledger and the reconciliation's entity scope. Requires the accounting:read scope.","operationId":"getCompanyAccountingCloseReconciliation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AccountRec"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show an account reconciliation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/reconciliations/{id}/attachments":{"get":{"description":"Oldest first. Needs view_ledger and the reconciliation's entity scope; refused to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingCloseReconciliationAttachments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctAttachment"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"List attachments on an account reconciliation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Multipart upload (one `file` part, allow-listed type, up to MAX_UPLOAD_BYTES): statements, schedules and other support. Writes an attachment_added audit event on the reconciliation. Needs post_journal and the reconciliation's entity scope. Requires the accounting:write scope.","operationId":"createCompanyAccountingCloseReconciliationAttachment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctAttachment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused for a different request or still in progress"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Request body too large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing file, empty file, too large, or a type that is not allowed"}},"summary":"Attach a workpaper to an account reconciliation","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/reconciliations/{id}/items":{"post":{"description":"A reconciling item explains GL vs support (signed, in the account's normal-balance direction; carried forward while open); a schedule line is the support of a manual reconciliation. Refused (409) while the reconciliation is signed. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingCloseReconciliationItem","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item":{"additionalProperties":false,"properties":{"amount":{"pattern":"^-?\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"description":{"maxLength":500,"minLength":3,"type":"string"},"item_date":{"format":"date","type":"string"},"kind":{"enum":["reconciling_item","schedule_line"],"type":"string"},"reference":{"maxLength":120,"type":["string","null"]}},"required":["kind","description","amount","item_date"],"type":"object"}},"required":["item"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RecItem"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Signed reconciliation, or Idempotency-Key reused"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid item, or a schedule line on a tie-out reconciliation"}},"summary":"Add a reconciling item or schedule line","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/reconciliations/{id}/items/{item_id}":{"patch":{"description":"Edit the description, amount or reference, or clear (resolve) the item: a cleared item stops explaining the difference and is not carried forward. Refused (409) while signed. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingCloseReconciliationItem","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item":{"additionalProperties":false,"properties":{"amount":{"pattern":"^-?\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"cleared":{"type":"boolean"},"description":{"maxLength":500,"minLength":3,"type":"string"},"reference":{"maxLength":120,"type":["string","null"]}},"required":[],"type":"object"}},"required":["item"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RecItem"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Signed reconciliation"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid change"}},"summary":"Update or clear a reconciliation item","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/reconciliations/{id}/prepare":{"post":{"description":"Sign as preparer (post_journal): the unexplained difference must be within the tolerance (the lesser of the absolute materiality and the percentage of the GL balance). Snapshots the cumulative posted debit and credit, support and items. A signed reconciliation that went stale may be prepared again. Audited. Requires the accounting:write scope.","operationId":"prepareCompanyAccountingCloseReconciliation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"prepare":{"additionalProperties":false,"properties":{"note":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["note"],"type":"object"}},"required":["prepare"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AccountRec"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not in a state that allows this, changed concurrently, or stale since preparation"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid request, unavailable support, or an unexplained difference over tolerance"}},"summary":"Prepare an account reconciliation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/reconciliations/{id}/review":{"post":{"description":"Sign as reviewer: needs close_period; the preparer is refused (403); a two-level reconciliation needs a second reviewer who is neither the preparer nor the first reviewer. Refused (409) if the GL or support moved since preparation. Audited. Requires the accounting:write scope.","operationId":"reviewCompanyAccountingCloseReconciliation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"review":{"additionalProperties":false,"properties":{"note":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["note"],"type":"object"}},"required":["review"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AccountRec"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not in a state that allows this, changed concurrently, or stale since preparation"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid request, unavailable support, or an unexplained difference over tolerance"}},"summary":"Review an account reconciliation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/reconciliations/{id}/unsign":{"post":{"description":"Withdraws every sign-off (back to in_progress) with a reason. Needs close_period. Audited. Requires the accounting:write scope.","operationId":"unsignCompanyAccountingCloseReconciliation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"unsign":{"additionalProperties":false,"properties":{"reason":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}},"required":["unsign"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AccountRec"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not in a state that allows this, changed concurrently, or stale since preparation"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid request, unavailable support, or an unexplained difference over tolerance"}},"summary":"Unsign an account reconciliation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/settings":{"get":{"description":"Whether the period close requires the cockpit tasks and account reconciliations to be reviewed, and the default template. Needs view_ledger; refused to project-scoped grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingCloseSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CloseSettings"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"}},"summary":"Close cockpit settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"Owner or controller with close_period and unrestricted entity access. With require_tasks the period close (prepare, approve and close) is refused while a required task of the scope is not reviewed; with require_recs a GL or whole-period close is refused while a due reconciliation is missing, not fully reviewed or stale; with require_flux a GL or whole-period close is refused while a flux variance above threshold is unexplained, unreviewed or stale. Audited. Requires the accounting:write scope.","operationId":"replaceCompanyAccountingCloseSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"settings":{"additionalProperties":false,"properties":{"default_template_id":{"minimum":1,"type":["integer","null"]},"require_flux":{"description":"GL and whole-period close need every flux variance above threshold explained, reviewed and current (oas-flux.json). Omitted on PUT = unchanged.","type":"boolean"},"require_recs":{"type":"boolean"},"require_tasks":{"type":"boolean"}},"required":["require_tasks","require_recs"],"type":"object"}},"required":["settings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CloseSettings"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid settings or an unknown template"}},"summary":"Save close cockpit settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/tasks/{id}":{"get":{"description":"Needs view_ledger and the task's entity scope. Requires the accounting:read scope.","operationId":"getCompanyAccountingCloseTask","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CloseTask"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a close task","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/tasks/{id}/prepare":{"post":{"description":"Sign as preparer: needs post_journal, the task's owner or a close_period user, and every dependency reviewed. Evidence tasks complete from evidence only (422). Audited. Requires the accounting:write scope.","operationId":"prepareCompanyAccountingCloseTask","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"prepare":{"additionalProperties":false,"properties":{"note":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["note"],"type":"object"}},"required":["prepare"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CloseTask"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The task is not in a state that allows this"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid request or unreviewed dependencies"}},"summary":"Prepare a close task","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/tasks/{id}/review":{"post":{"description":"Sign as reviewer: needs close_period; the preparer is refused (403, segregation of duties); a designated reviewer is required unless the reviewer is an owner or controller. Audited. Requires the accounting:write scope.","operationId":"reviewCompanyAccountingCloseTask","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"review":{"additionalProperties":false,"properties":{"note":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["note"],"type":"object"}},"required":["review"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CloseTask"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The task is not in a state that allows this"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid request or unreviewed dependencies"}},"summary":"Review a close task","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/tasks/{id}/start":{"post":{"description":"not_started to in_progress. Needs post_journal; the task's owner or a close_period user. Audited. Requires the accounting:write scope.","operationId":"startCompanyAccountingCloseTask","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CloseTask"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The task is not in a state that allows this"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid request or unreviewed dependencies"}},"summary":"Start a close task","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/tasks/{id}/unsign":{"post":{"description":"Withdraws the preparation and review (back to in_progress) with a reason; tasks depending on it lose their sign-off too. Needs close_period. Audited. Requires the accounting:write scope.","operationId":"unsignCompanyAccountingCloseTask","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"unsign":{"additionalProperties":false,"properties":{"reason":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}},"required":["unsign"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CloseTask"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The task is not in a state that allows this"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid request or unreviewed dependencies"}},"summary":"Unsign a close task","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/templates":{"get":{"description":"Every close template with its tasks. Needs view_ledger. Requires the accounting:read scope.","operationId":"listCompanyAccountingCloseTemplates","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_CloseTemplate"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"}},"summary":"List close templates","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Tasks with owner, reviewer, due day offset (business days after the period end), dependencies (acyclic, by key), a category, the module close the task gates and optional system evidence that completes it. Owner or controller with close_period. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingCloseTemplate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"revision":{"minimum":0,"type":"integer"},"template":{"additionalProperties":false,"properties":{"description":{"maxLength":2000,"type":["string","null"]},"is_active":{"type":"boolean"},"name":{"maxLength":120,"minLength":3,"type":"string"},"tasks":{"items":{"additionalProperties":false,"properties":{"category":{"enum":["subledger_close","accruals","reconciliations","reporting","review","other"],"type":"string"},"close_module":{"enum":["ap","ar","payroll","jc","cm","gl",null],"type":["string","null"]},"depends_on":{"items":{"pattern":"^[a-z0-9_-]{1,64}$","type":"string"},"maxItems":20,"type":"array"},"due_day_offset":{"maximum":60,"minimum":-10,"type":"integer"},"evidence":{"enum":["tie_out:ap","tie_out:ap_retainage","tie_out:ar","tie_out:ar_retainage","tie_out:payroll","tie_out:assets","tie_out:cash_reconciliation","tie_out:job_cost","tie_out:wip","tie_out:wip_revenue","tie_out:prepaids","readiness:ap","readiness:ar","readiness:payroll","readiness:jc","readiness:cm","readiness:gl","run:depreciation","run:allocation","run:wip","run:eliminations","run:prepaid_amortization","recs:complete",null],"type":["string","null"]},"instructions":{"maxLength":2000,"type":["string","null"]},"key":{"pattern":"^[a-z0-9_-]{1,64}$","type":"string"},"owner_id":{"minimum":1,"type":["integer","null"]},"required":{"type":"boolean"},"reviewer_id":{"minimum":1,"type":["integer","null"]},"title":{"maxLength":200,"minLength":3,"type":"string"}},"required":["key","title","category","due_day_offset"],"type":"object"},"maxItems":150,"minItems":1,"type":"array"}},"required":["name","tasks"],"type":"object"}},"required":["template"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CloseTemplate"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A template with this name exists, or the Idempotency-Key was reused"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid tasks, unknown or cyclic dependencies, or an owner outside the company"}},"summary":"Create a close template","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/close/templates/{id}":{"get":{"description":"Needs view_ledger. Requires the accounting:read scope.","operationId":"getCompanyAccountingCloseTemplate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CloseTemplate"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a close template","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"Replaces the name, description and tasks; `revision` refuses a stale edit (409). Tasks already generated for periods keep their copy. Owner or controller with close_period. Audited. Requires the accounting:write scope.","operationId":"replaceCompanyAccountingCloseTemplate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"revision":{"minimum":0,"type":"integer"},"template":{"additionalProperties":false,"properties":{"description":{"maxLength":2000,"type":["string","null"]},"is_active":{"type":"boolean"},"name":{"maxLength":120,"minLength":3,"type":"string"},"tasks":{"items":{"additionalProperties":false,"properties":{"category":{"enum":["subledger_close","accruals","reconciliations","reporting","review","other"],"type":"string"},"close_module":{"enum":["ap","ar","payroll","jc","cm","gl",null],"type":["string","null"]},"depends_on":{"items":{"pattern":"^[a-z0-9_-]{1,64}$","type":"string"},"maxItems":20,"type":"array"},"due_day_offset":{"maximum":60,"minimum":-10,"type":"integer"},"evidence":{"enum":["tie_out:ap","tie_out:ap_retainage","tie_out:ar","tie_out:ar_retainage","tie_out:payroll","tie_out:assets","tie_out:cash_reconciliation","tie_out:job_cost","tie_out:wip","tie_out:wip_revenue","tie_out:prepaids","readiness:ap","readiness:ar","readiness:payroll","readiness:jc","readiness:cm","readiness:gl","run:depreciation","run:allocation","run:wip","run:eliminations","run:prepaid_amortization","recs:complete",null],"type":["string","null"]},"instructions":{"maxLength":2000,"type":["string","null"]},"key":{"pattern":"^[a-z0-9_-]{1,64}$","type":"string"},"owner_id":{"minimum":1,"type":["integer","null"]},"required":{"type":"boolean"},"reviewer_id":{"minimum":1,"type":["integer","null"]},"title":{"maxLength":200,"minLength":3,"type":"string"}},"required":["key","title","category","due_day_offset"],"type":"object"},"maxItems":150,"minItems":1,"type":"array"}},"required":["name","tasks"],"type":"object"}},"required":["template"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CloseTemplate"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (or a project-scoped grant), outside the entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The template changed, or the name is taken"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid tasks"}},"summary":"Replace a close template","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/compliance/policy_areas":{"get":{"description":"Every policy area that needs qualified review, the policy version in force, the credentials that may sign it, and for each jurisdiction it is encoded for: current, awaiting_evidence, expired, outdated (signed for an older version), revoked or not_reviewed, as of the company's business date. A jurisdiction that is not listed is unsupported, not exempt. Needs view_ledger. Requires accounting:read.","operationId":"listCompanyAccountingCompliancePolicyAreas","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PolicyAreaStatusList"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"}},"summary":"Policy areas and their qualified sign-off status","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/compliance/reviewers":{"get":{"description":"Every registration, revoked ones included, oldest first. Needs view_ledger. Requires accounting:read.","operationId":"listCompanyAccountingComplianceReviewers","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_QualifiedReviewer"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"}},"summary":"List registered qualified reviewers","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Registers an active company member as a qualified reviewer: credential type, number, issuer and jurisdiction, the policy areas they may sign (each must accept the credential type) and the validity window. Nobody may register themselves. Immutable once written except one revocation; audited. Needs manage_grants with company-wide access and step-up (a token needs accounting:step_up). Honors Idempotency-Key. Requires accounting:write.","operationId":"createCompanyAccountingComplianceReviewer","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"reviewer":{"$ref":"#/components/schemas/accounting_QualifiedReviewerInput"}},"required":["reviewer"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_QualifiedReviewer"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants, entity-restricted grant, step-up required, self-registration or a read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The member is not in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused with a different body or caller, or still running"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Inactive member, a credential an area does not accept, or an ended window"}},"summary":"Register a qualified reviewer","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/compliance/reviewers/{id}/revoke":{"post":{"description":"Records the one permitted revocation with an audited reason; the reviewer can sign nothing afterwards. Earlier sign-offs stand until revoked themselves. A repeat is 409. Needs manage_grants with company-wide access and step-up. Requires accounting:write.","operationId":"revokeCompanyAccountingComplianceReviewer","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RevokeInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_QualifiedReviewer"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants, entity-restricted grant, step-up required or a read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already revoked"}},"summary":"Revoke a qualified reviewer registration","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/compliance/signoffs":{"get":{"description":"Newest first, each with its computed status and evidence count. Paginated (Total, Per-Page, Link). Needs view_ledger. Requires accounting:read.","operationId":"listCompanyAccountingComplianceSignoffs","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Only this policy area key","in":"query","name":"area","schema":{"type":"string"}},{"description":"Only this jurisdiction","in":"query","name":"jurisdiction","schema":{"type":"string"}},{"description":"Page","in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"description":"Page size","in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_PolicySignoff"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"}},"summary":"List qualified sign-offs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Only a reviewer registered for the area on the signing date, with a credential the area accepts, may sign; for a jurisdiction the area is encoded for and the policy version in force (409 otherwise). Signed on or up to 90 days before the business date; expires after it is signed and no later than the area's maximum validity. With exceptions, describe them. The record is immutable (one revocation aside) and audited; reviewer identity and credential are copied onto it. It counts as current once evidence is attached. Needs view_ledger and an active registration. Honors Idempotency-Key. Requires accounting:write.","operationId":"createCompanyAccountingComplianceSignoff","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"signoff":{"$ref":"#/components/schemas/accounting_PolicySignoffInput"}},"required":["signoff"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PolicySignoff"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, not a registered reviewer for the area on that date, or a read-only token"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not the policy version in force, or an Idempotency-Key conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unsupported jurisdiction, future or too-old signing date, expiry out of range, or exceptions not described"}},"summary":"Record a qualified sign-off","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/compliance/signoffs/{id}":{"get":{"description":"The sign-off with its computed status and evidence count. Needs view_ledger. Requires accounting:read.","operationId":"getCompanyAccountingComplianceSignoff","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PolicySignoff"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a qualified sign-off","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/compliance/signoffs/{id}/attachments":{"get":{"description":"Oldest first. Needs view_ledger. Requires the accounting:read scope.","operationId":"listCompanyAccountingComplianceSignoffAttachments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctAttachment"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"List evidence on a qualified sign-off","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Multipart upload (one `file` part, allow-listed type, up to MAX_UPLOAD_BYTES): the review memo, workpapers or engagement letter. Only the reviewer who signed may attach, and not after revocation. Writes an attachment_added audit event on the sign-off. Needs view_ledger. Requires the accounting:write scope.","operationId":"createCompanyAccountingComplianceSignoffAttachment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctAttachment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, not the signing reviewer, or a read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The sign-off is revoked"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No file, an empty file, a disallowed type or too large"}},"summary":"Attach evidence to a qualified sign-off","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/compliance/signoffs/{id}/revoke":{"post":{"description":"Records the one permitted revocation with an audited reason; the area falls back to its other sign-offs or shows revoked. A repeat is 409. Needs manage_grants with company-wide access and step-up. Requires accounting:write.","operationId":"revokeCompanyAccountingComplianceSignoff","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RevokeInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PolicySignoff"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants, entity-restricted grant, step-up required or a read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already revoked"}},"summary":"Revoke a qualified sign-off","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/equity_method/runs":{"get":{"description":"Runs newest first. Requires the accounting:read scope.","operationId":"listCompanyAccountingConsolidationEquityMethodRuns","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter: investee","in":"query","name":"investee_entity_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter: period","in":"query","name":"period_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_EquityRun"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"List equity-method runs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"The investor's share of the investee's net income and OCI for a period (ASC 323-10-35), segment by segment through ownership changes, losses limited to the carrying amount with the excess suspended. An investee kept elsewhere takes a reported net income with its source. The same evidence returns the prepared run (200); a revision posts only the change since earlier posted revisions. Needs post_journal over every entity. Requires the accounting:write scope.","operationId":"createCompanyAccountingConsolidationEquityMethodRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"run":{"additionalProperties":false,"properties":{"investee_entity_id":{"minimum":1,"type":"integer"},"investee_net_income":{"pattern":"^-?\\d{1,14}(\\.\\d{1,2})?$","type":"string"},"investee_oci":{"pattern":"^-?\\d{1,14}(\\.\\d{1,2})?$","type":"string"},"period_id":{"minimum":1,"type":"integer"},"source_note":{"maxLength":500,"minLength":1,"type":"string"}},"required":["investee_entity_id","period_id"],"type":"object"}},"required":["run"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquityRun"}}},"description":"The existing record (unchanged)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquityRun"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Prepare an equity-method run","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/equity_method/runs/{id}":{"get":{"description":"One run. Requires the accounting:read scope.","operationId":"getCompanyAccountingConsolidationEquityMethodRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquityRun"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Get an equity-method run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/equity_method/runs/{id}/decision":{"post":{"description":"approve (approve_journal, never the preparer): recomputes the evidence (409 if anything moved) and posts the investor's entry (investment against equity in earnings and, for OCI, the CTA account). cancel (post_journal, with a reason). A repeat of a finished decision returns the run. Requires the accounting:write scope.","operationId":"decisionCompanyAccountingConsolidationEquityMethodRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"decision":{"additionalProperties":false,"properties":{"action":{"enum":["approve","cancel"],"type":"string"},"reason":{"description":"Required to cancel","maxLength":500,"minLength":1,"type":"string"}},"required":["action"],"type":"object"}},"required":["decision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EquityRun"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Approve or cancel an equity-method run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/disputes":{"get":{"description":"Newest first. Requires the accounting:read scope.","operationId":"listCompanyAccountingConsolidationIcDisputes","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter: status","in":"query","name":"status","required":false,"schema":{"enum":["open","adjustment_pending","resolved","withdrawn"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Dispute"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"List intercompany disputes","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"On a pair and currency whose difference on as_of exceeds the tolerance; the active dispute on the same pair and currency is returned instead (200). Needs post_journal over every entity. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingConsolidationIcDispute","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"dispute":{"additionalProperties":false,"properties":{"as_of":{"format":"date","type":"string"},"currency":{"pattern":"^[A-Za-z]{3}$","type":"string"},"entity_a_id":{"minimum":1,"type":"integer"},"entity_b_id":{"minimum":1,"type":"integer"},"note":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["entity_a_id","entity_b_id","currency","as_of"],"type":"object"}},"required":["dispute"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Dispute"}}},"description":"The existing record (unchanged)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Dispute"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Raise an intercompany dispute","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/disputes/{id}":{"get":{"description":"One dispute with its history (raised, assigned, comments, adjustment proposed, approved or rejected, resolved, withdrawn). Requires the accounting:read scope.","operationId":"getCompanyAccountingConsolidationIcDispute","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Dispute"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Get an intercompany dispute","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/disputes/{id}/adjustment":{"post":{"description":"Proposes the entry in the responsible entity that brings the pair's difference to zero on posting_date: its intercompany account (due-from or due-to by direction, naming the other entity) against offset_account_id. The dispute waits for a second user's decision. Needs post_journal. Requires the accounting:write scope.","operationId":"adjustmentCompanyAccountingConsolidationIcDispute","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"adjustment":{"additionalProperties":false,"properties":{"memo":{"maxLength":500,"minLength":1,"type":"string"},"offset_account_id":{"minimum":1,"type":"integer"},"posting_date":{"format":"date","type":"string"}},"required":["posting_date","offset_account_id"],"type":"object"}},"required":["adjustment"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Dispute"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Propose the adjusting entry","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/disputes/{id}/assign":{"post":{"description":"Assigns an open dispute to a user with accounting access and the entity (one of the pair) that must correct it. The same assignment again changes nothing. Needs post_journal. Requires the accounting:write scope.","operationId":"assignCompanyAccountingConsolidationIcDispute","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"assignment":{"additionalProperties":false,"properties":{"assignee_user_id":{"minimum":1,"type":"integer"},"note":{"maxLength":2000,"minLength":1,"type":"string"},"responsible_entity_id":{"minimum":1,"type":"integer"}},"required":["assignee_user_id","responsible_entity_id"],"type":"object"}},"required":["assignment"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Dispute"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Assign an intercompany dispute","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/disputes/{id}/comments":{"post":{"description":"Adds a comment to the dispute's history. Needs post_journal. Requires the accounting:write scope.","operationId":"createCompanyAccountingConsolidationIcDisputeComment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"comment":{"additionalProperties":false,"properties":{"body":{"maxLength":4000,"minLength":1,"type":"string"}},"required":["body"],"type":"object"}},"required":["comment"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Dispute"}}},"description":"The existing record (unchanged)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Dispute"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Comment on an intercompany dispute","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/disputes/{id}/decision":{"post":{"description":"approve (approve_journal, never the proposer): re-checks the difference (409 if it moved), posts the entry and resolves the dispute. reject (post_journal, with a reason) reopens it. Requires the accounting:write scope.","operationId":"decisionCompanyAccountingConsolidationIcDispute","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"decision":{"additionalProperties":false,"properties":{"action":{"enum":["approve","reject"],"type":"string"},"reason":{"description":"Required to reject","maxLength":500,"minLength":1,"type":"string"}},"required":["action"],"type":"object"}},"required":["decision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Dispute"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Approve or reject the adjusting entry","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/disputes/{id}/resolve":{"post":{"description":"resolve: allowed once the pair's difference today is within the tolerance (422 otherwise); withdraw: closes it with the note. Needs post_journal. Requires the accounting:write scope.","operationId":"resolveCompanyAccountingConsolidationIcDispute","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"resolution":{"additionalProperties":false,"properties":{"action":{"enum":["resolve","withdraw"],"type":"string"},"note":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["action","note"],"type":"object"}},"required":["resolution"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Dispute"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Resolve or withdraw an intercompany dispute","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/settlements":{"get":{"description":"Newest first. Requires the accounting:read scope.","operationId":"listCompanyAccountingConsolidationIcSettlements","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Settlement"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"List intercompany settlement runs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"cash: every matched pair in the base currency is cleared through the entities' cash accounts; netting: each entity's balances against one counterparty are offset into one account. Pairs that do not match, lack a cash account or are in a foreign currency are skipped (listed). The same evidence returns the prepared run (200). Needs post_journal over every entity. Requires the accounting:write scope.","operationId":"createCompanyAccountingConsolidationIcSettlement","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"settlement":{"additionalProperties":false,"properties":{"as_of":{"format":"date","type":"string"},"cash_accounts":{"items":{"additionalProperties":false,"properties":{"account_id":{"minimum":1,"type":"integer"},"entity_id":{"minimum":1,"type":"integer"}},"required":["entity_id","account_id"],"type":"object"},"maxItems":200,"type":"array"},"mode":{"enum":["cash","netting"],"type":"string"},"pairs":{"items":{"additionalProperties":false,"properties":{"entity_a_id":{"minimum":1,"type":"integer"},"entity_b_id":{"minimum":1,"type":"integer"}},"required":["entity_a_id","entity_b_id"],"type":"object"},"maxItems":500,"type":"array"}},"required":["as_of","mode"],"type":"object"}},"required":["settlement"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Settlement"}}},"description":"The existing record (unchanged)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Settlement"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Prepare an intercompany settlement","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/settlements/{id}":{"get":{"description":"One run with its lines and settled pairs. Requires the accounting:read scope.","operationId":"getCompanyAccountingConsolidationIcSettlement","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Settlement"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Get an intercompany settlement run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/settlements/{id}/decision":{"post":{"description":"approve (approve_journal, never the preparer): recomputes (409 if balances moved) and posts one IC entry per entity, keyed by run and line so a retry posts nothing twice. cancel (post_journal, with a reason). Requires the accounting:write scope.","operationId":"decisionCompanyAccountingConsolidationIcSettlement","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"decision":{"additionalProperties":false,"properties":{"action":{"enum":["approve","cancel"],"type":"string"},"reason":{"description":"Required to cancel","maxLength":500,"minLength":1,"type":"string"}},"required":["action"],"type":"object"}},"required":["decision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Settlement"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Approve or cancel an intercompany settlement","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/transfers":{"get":{"description":"Equipment and inventory sold between group entities, with profit, recognized and deferred amounts as of as_of. Requires the accounting:read scope.","operationId":"listCompanyAccountingConsolidationIcTransfers","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Date for the status amounts (default: today)","in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}},{"description":"Include voided transfers","in":"query","name":"include_voided","required":false,"schema":{"enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Transfer"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"List intercompany asset transfers","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Consolidation defers the seller's profit (sale amount less carrying amount) and recognizes it as the buyer depreciates the equipment (useful life from the depreciation start month) or sells the inventory on. Both entities report in the base currency. The identical active transfer is returned (200). Refused in a closed period. Needs post_journal over every entity. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingConsolidationIcTransfer","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"transfer":{"additionalProperties":false,"properties":{"buyer_asset_account_id":{"minimum":1,"type":"integer"},"buyer_entity_id":{"minimum":1,"type":"integer"},"buyer_expense_account_id":{"minimum":1,"type":"integer"},"depreciation_start":{"format":"date","type":["string","null"]},"kind":{"enum":["fixed_asset","inventory"],"type":"string"},"memo":{"maxLength":500,"minLength":1,"type":["string","null"]},"sale_amount":{"pattern":"^-?\\d{1,14}(\\.\\d{1,2})?$","type":"string"},"seller_cost":{"pattern":"^-?\\d{1,14}(\\.\\d{1,2})?$","type":"string"},"seller_cost_account_id":{"minimum":1,"type":["integer","null"]},"seller_entity_id":{"minimum":1,"type":"integer"},"seller_gain_account_id":{"minimum":1,"type":"integer"},"transfer_date":{"format":"date","type":"string"},"useful_life_months":{"maximum":600,"minimum":1,"type":["integer","null"]}},"required":["kind","seller_entity_id","buyer_entity_id","transfer_date","sale_amount","seller_cost","seller_gain_account_id","buyer_asset_account_id","buyer_expense_account_id"],"type":"object"}},"required":["transfer"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Transfer"}}},"description":"The existing record (unchanged)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Transfer"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Register an intercompany asset transfer","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/transfers/{id}":{"get":{"description":"One transfer with its events and status amounts as of as_of. Requires the accounting:read scope.","operationId":"getCompanyAccountingConsolidationIcTransfer","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Date for the status amounts (default: today)","in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Transfer"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Get an intercompany asset transfer","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/transfers/{id}/events":{"post":{"description":"sold (inventory): percent of the transferred goods sold to a third party on event_date; disposed: the buyer disposed of the asset, recognizing what remains. Refused in a closed period. Needs post_journal. Requires the accounting:write scope.","operationId":"createCompanyAccountingConsolidationIcTransferEvent","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"event":{"additionalProperties":false,"properties":{"event_date":{"format":"date","type":"string"},"kind":{"enum":["sold","disposed"],"type":"string"},"note":{"maxLength":1000,"minLength":1,"type":"string"},"percent":{"description":"Percent 0-100, up to four decimals","pattern":"^\\d{1,3}(\\.\\d{1,4})?$","type":"string"}},"required":["kind","event_date"],"type":"object"}},"required":["event"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Transfer"}}},"description":"The existing record (unchanged)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Transfer"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Record a sale on or a disposal","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ic/transfers/{id}/void":{"post":{"description":"Marks it void with a reason (kept; append-only). Refused in a closed period. Needs post_journal. Requires the accounting:write scope.","operationId":"voidCompanyAccountingConsolidationIcTransfer","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"void":{"additionalProperties":false,"properties":{"reason":{"maxLength":500,"minLength":1,"type":"string"}},"required":["reason"],"type":"object"}},"required":["void"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Transfer"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Void an intercompany asset transfer","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ownership":{"get":{"description":"Effective-dated, append-only ownership versions (parent, child, ownership and voting percent, method: full, equity, cost or none), oldest first per child. Needs a grant over every entity. Requires the accounting:read scope.","operationId":"listCompanyAccountingConsolidationOwnership","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter: child entity","in":"query","name":"child_entity_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Include voided versions","in":"query","name":"include_voided","required":false,"schema":{"enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Ownership"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"List ownership versions","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Adds a version effective from effective_from; the relationship in force on a date is the child's latest version on or before it. Full consolidation needs a voting majority or a stated control basis; the equity method needs the investment and equity-in-earnings accounts. Refused (422) when it would change a closed period or form a cycle; the identical version again returns it (200); a different version on the same day is 409. Needs manage_coa over every entity. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingConsolidationOwnership","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"ownership":{"additionalProperties":false,"properties":{"child_entity_id":{"minimum":1,"type":"integer"},"control_basis":{"maxLength":500,"minLength":1,"type":["string","null"]},"earnings_account_id":{"minimum":1,"type":["integer","null"]},"effective_from":{"format":"date","type":"string"},"investment_account_id":{"minimum":1,"type":["integer","null"]},"method":{"enum":["full","equity","cost","none"],"type":"string"},"note":{"maxLength":1000,"minLength":1,"type":["string","null"]},"ownership_pct":{"description":"Percent 0-100, up to four decimals","pattern":"^\\d{1,3}(\\.\\d{1,4})?$","type":"string"},"parent_entity_id":{"minimum":1,"type":"integer"},"voting_pct":{"description":"Voting percent (default: the ownership percent)","pattern":"^\\d{1,3}(\\.\\d{1,4})?$","type":"string"}},"required":["parent_entity_id","child_entity_id","ownership_pct","method","effective_from"],"type":"object"}},"required":["ownership"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Ownership"}}},"description":"The existing record (unchanged)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Ownership"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Record an ownership version","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ownership/{id}":{"get":{"description":"One ownership version, voided or not. Requires the accounting:read scope.","operationId":"getCompanyAccountingConsolidationOwnership","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Ownership"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Get an ownership version","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/ownership/{id}/void":{"post":{"description":"Marks the version void with a reason (the row is kept; history is append-only). Refused when it would change a closed period. Voiding again returns it. Needs manage_coa over every entity. Audited. Requires the accounting:write scope.","operationId":"voidCompanyAccountingConsolidationOwnership","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"void":{"additionalProperties":false,"properties":{"reason":{"maxLength":500,"minLength":1,"type":"string"}},"required":["reason"],"type":"object"}},"required":["void"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Ownership"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Void an ownership version","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/settings":{"get":{"description":"The intercompany matching tolerance. Requires the accounting:read scope.","operationId":"listCompanyAccountingConsolidationSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ConsolidationSettings"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Consolidation settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Sets the intercompany matching tolerance (manage_coa over every entity). Audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingConsolidationSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"settings":{"additionalProperties":false,"properties":{"ic_tolerance":{"pattern":"^-?\\d{1,14}(\\.\\d{1,2})?$","type":"string"}},"required":["ic_tolerance"],"type":"object"}},"required":["settings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ConsolidationSettings"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company, read-only token, or the preparer approving their own work"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A conflicting version or decision, an evidence change since preparation, an Idempotency-Key reuse, or an immutable row"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Update consolidation settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/consolidation/structure":{"get":{"description":"Members (roots and fully consolidated entities) with parent, group share and NCI percent, and the entities outside the group (equity, cost, not held, or held through one of those). Requires the accounting:read scope.","operationId":"listCompanyAccountingConsolidationStructure","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Date (default: today)","in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Structure"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, a grant limited to some entities or projects (consolidation covers every entity), wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing account mapping, or nothing to do"}},"summary":"Consolidation group on a date","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/control_objectives":{"get":{"description":"Each control objective (CO-1 to CO-10) with its owner, frequency, procedure, newest evidence (system records read live, and recorded evidence) and state as of the company's business date: current, overdue (newest evidence older than the frequency), no_evidence or unassigned (no owner). Needs view_ledger on an unrestricted grant. Requires accounting:read.","operationId":"listCompanyAccountingControlObjectives","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"as_of":{"format":"date","type":"string"},"objectives":{"items":{"$ref":"#/components/schemas/accounting_GovControlObjective"},"type":"array"}},"required":["as_of","objectives"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, a restricted grant, wrong company or a token without the required scope"}},"summary":"SOC 1 control register","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/control_objectives/{objective_key}":{"get":{"description":"The objective and every evidence item, system and recorded, newest first. Needs view_ledger on an unrestricted grant. Requires accounting:read.","operationId":"getCompanyAccountingControlObjective","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Control objective key, e.g. CO-1","in":"path","name":"objective_key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GovControlObjectiveDetail"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, a restricted grant, wrong company or a token without the required scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown objective"}},"summary":"Get a control objective with its evidence","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"Sets the owner (an active member with accounting access, or null), frequency (monthly, quarterly, semiannual, annual) and procedure. Audited with before and after. Needs manage_grants on an unrestricted grant. Requires accounting:write.","operationId":"replaceCompanyAccountingControlObjective","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Control objective key, e.g. CO-1","in":"path","name":"objective_key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"control_objective":{"$ref":"#/components/schemas/accounting_GovControlOwnerInput"}},"required":["control_objective"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GovControlObjective"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants, a restricted grant or a read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown objective or owner"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or an owner without accounting access"}},"summary":"Assign a control objective's owner and frequency","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/control_objectives/{objective_key}/evidence":{"post":{"description":"Appends evidence of a control performance (append-only): a DR rehearsal report, a document link, or a pointer to an access review or qualified sign-off of this company (ref_id). Not dated in the future. The objective's owner or a grant manager. Needs view_ledger on an unrestricted grant. Honors Idempotency-Key. Requires accounting:write.","operationId":"evidenceCompanyAccountingControlObjective","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Control objective key, e.g. CO-8","in":"path","name":"objective_key","required":true,"schema":{"type":"string"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"evidence":{"$ref":"#/components/schemas/accounting_GovEvidenceInput"}},"required":["evidence"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GovEvidence"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Neither the owner nor a grant manager, a restricted grant or a read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown objective"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused with a different body or caller, or still running"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body, a future date, or a ref_id that is not a completed access review or a sign-off of this company"}},"summary":"Record control evidence","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/current_portion_reclass":{"post":{"description":"Moves principal due within one year after as_of from each active schedule's long-term account to the current portion (ASC 210-10-45), on journal GJ, auto-reversing the next day. Idempotent per entity and date. 422 when no schedule exists, no current-portion account is mapped, the period is closed, or a schedule's current portion exceeds its account balance. Needs post_journal. Requires accounting:write.","operationId":"createCompanyAccountingCurrentPortionReclass","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"as_of":{"format":"date","type":"string"},"entity_id":{"minimum":1,"type":"integer"}},"required":["entity_id","as_of"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"entry":{"additionalProperties":true,"description":"The posted journal entry (JournalEntry fields), or null when nothing needed posting","type":["object","null"]},"items":{"items":{"properties":{"current":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"name":{"type":"string"},"noncurrent":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"schedule_id":{"type":"integer"}},"required":["schedule_id","name","current","noncurrent"],"type":"object"},"type":"array"}},"required":["entry","items"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, entity outside the grant, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or refused"}},"summary":"Post the current-portion reclass","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/dashboards":{"delete":{"description":"Removes the saved layout (back to the role preset), or with `preset` saves that preset's default widgets. Requires accounting:write.","operationId":"deleteCompanyAccountingDashboards","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Preset to reset to (default the role's)","in":"query","name":"preset","schema":{"enum":["cfo","controller","project_manager","ap_clerk"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Dashboard"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown preset"}},"summary":"Reset my dashboard","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"get":{"description":"The caller's saved layout, else their role's preset (owner: CFO; controller, accountant, auditor, AR and payroll: controller; AP clerk; project manager), with each widget's data read with the caller's grant. Widgets the grant cannot read are left out and listed in `hidden`. Requires accounting:read.","operationId":"listCompanyAccountingDashboards","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Show another preset's default layout instead of the saved one","in":"query","name":"preset","schema":{"enum":["cfo","controller","project_manager","ap_clerk"]}},{"description":"Date the widgets read (default the company's today)","in":"query","name":"as_of","schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Dashboard"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown preset or malformed as_of"}},"summary":"My accounting dashboard","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"A preset plus up to 16 widgets in display order with their size. Every widget must be readable with the caller's grant. Requires accounting:write.","operationId":"replaceCompanyAccountingDashboards","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"dashboard":{"properties":{"preset":{"enum":["cfo","controller","project_manager","ap_clerk"]},"widgets":{"items":{"properties":{"key":{"type":"string"},"size":{"enum":["s","m","l"]}},"required":["key"],"type":"object"},"maxItems":16,"type":"array"}},"required":["preset","widgets"],"type":"object"}},"required":["dashboard"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Dashboard"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown widget, a widget the grant cannot read, or an unknown preset"}},"summary":"Save my dashboard layout","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/dashboards/widgets":{"get":{"description":"Widgets the caller's grant can read, and each role preset's widgets. Requires accounting:read.","operationId":"listCompanyAccountingDashboardsWidgets","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"presets":{"items":{"properties":{"key":{"type":"string"},"title":{"type":"string"},"widgets":{"items":{"type":"string"},"type":"array"}},"required":["key","title","widgets"],"type":"object"},"type":"array"},"widgets":{"items":{"$ref":"#/components/schemas/accounting_DashboardWidgetInfo"},"type":"array"}},"required":["widgets","presets"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"}},"summary":"Dashboard widgets and presets","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/debt_schedules":{"get":{"description":"Active principal maturity schedules, optionally for one entity. Requires accounting:read.","operationId":"listCompanyAccountingDebtSchedules","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"entity_id","schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"debt_schedules":{"items":{"$ref":"#/components/schemas/accounting_DebtSchedule"},"type":"array"}},"required":["debt_schedules"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, entity outside the grant, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or refused"}},"summary":"List debt and lease schedules","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Principal maturities of a long-term note or lease liability, the source of the current-portion reclass. The account must be a postable long-term liability. Needs post_journal; audited. Requires accounting:write.","operationId":"createCompanyAccountingDebtSchedule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"debt_schedule":{"properties":{"account_id":{"minimum":1,"type":"integer"},"current_account_id":{"minimum":1,"type":["integer","null"]},"entity_id":{"minimum":1,"type":"integer"},"kind":{"default":"note","enum":["note","lease"]},"name":{"maxLength":200,"type":"string"},"payments":{"items":{"properties":{"due_date":{"format":"date","type":"string"},"principal":{"description":"Positive amount, at most 2 dp","type":"string"}},"required":["due_date","principal"],"type":"object"},"maxItems":600,"minItems":1,"type":"array"}},"required":["entity_id","name","account_id","payments"],"type":"object"}},"required":["debt_schedule"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"debt_schedule":{"$ref":"#/components/schemas/accounting_DebtSchedule"}},"required":["debt_schedule"],"type":"object"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, entity outside the grant, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or refused"}},"summary":"Create a debt or lease schedule","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/debt_schedules/{id}":{"delete":{"description":"Stops it feeding later reclasses (kept for the audit trail). Needs post_journal. Requires accounting:write.","operationId":"deleteCompanyAccountingDebtSchedule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, entity outside the grant, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed or refused"}},"summary":"Deactivate a debt or lease schedule","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/dimensions":{"get":{"description":"Every dimension with its values and requirement rules, by position then code. `active=true` lists active dimensions only. Requires the accounting:read scope.","operationId":"listCompanyAccountingDimensions","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"active","required":false,"schema":{"enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctDimension"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (manage_coa for writes), an entity-restricted or project-scoped grant writing, wrong company, or read-only workspace"}},"summary":"List dimensions","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Needs manage_coa on an unrestricted grant. Codes are unique per company (case-insensitive). Requires the accounting:write scope.","operationId":"createCompanyAccountingDimension","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"dimension":{"additionalProperties":false,"properties":{"code":{"maxLength":20,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.\\-]*$","type":"string"},"default_requirement":{"enum":["optional","required"],"type":"string"},"description":{"maxLength":1000,"type":["string","null"]},"is_active":{"type":"boolean"},"kind":{"enum":["department","division","location","custom"],"type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"},"position":{"maximum":1000,"minimum":0,"type":"integer"}},"required":["code","name"],"type":"object"}},"required":["dimension"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctDimension"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (manage_coa for writes), an entity-restricted or project-scoped grant writing, wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Create a dimension","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/dimensions/{id}":{"get":{"description":"Requires the accounting:read scope.","operationId":"getCompanyAccountingDimension","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctDimension"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (manage_coa for writes), an entity-restricted or project-scoped grant writing, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"Show a dimension","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Rename (audited as `renamed` with from and to), change the default requirement or order, or (de)activate. An inactive dimension's values are refused at posting. Needs manage_coa on an unrestricted grant. Requires the accounting:write scope.","operationId":"updateCompanyAccountingDimension","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"dimension":{"additionalProperties":false,"properties":{"code":{"maxLength":20,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.\\-]*$","type":"string"},"default_requirement":{"enum":["optional","required"],"type":"string"},"description":{"maxLength":1000,"type":["string","null"]},"is_active":{"type":"boolean"},"kind":{"enum":["department","division","location","custom"],"type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"},"position":{"maximum":1000,"minimum":0,"type":"integer"}},"type":"object"}},"required":["dimension"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctDimension"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (manage_coa for writes), an entity-restricted or project-scoped grant writing, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Update a dimension","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/dimensions/{id}/history":{"get":{"description":"Audit trail of the dimension and its values, newest first (at most 500): created, renamed (changes.name / changes.code from and to), updated, deactivated, reactivated and rules_changed (rules before and after). Requires the accounting:read scope.","operationId":"listCompanyAccountingDimensionHistory","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctDimensionHistoryEvent"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (manage_coa for writes), an entity-restricted or project-scoped grant writing, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"Dimension history","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/dimensions/{id}/rules":{"get":{"description":"Requires the accounting:read scope.","operationId":"listCompanyAccountingDimensionRules","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctDimensionRule"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (manage_coa for writes), an entity-restricted or project-scoped grant writing, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"List a dimension's requirement rules","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"Each rule names one selector: account_id, account_type, or an account number range (account_from with account_to, inclusive). The most specific match wins (account, then the narrowest range, then type), else the dimension's default_requirement. `optional` exempts accounts a broader rule requires. Checked when an entry posts; closing entries and reversals are exempt. Needs manage_coa on an unrestricted grant. Requires the accounting:write scope.","operationId":"replaceCompanyAccountingDimensionRules","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"rules":{"items":{"$ref":"#/components/schemas/accounting_AcctDimensionRuleInput"},"maxItems":200,"type":"array"}},"required":["rules"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctDimension"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (manage_coa for writes), an entity-restricted or project-scoped grant writing, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Replace a dimension's requirement rules","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/dimensions/{id}/values":{"get":{"description":"By code; parent_id gives the roll-up hierarchy. Requires the accounting:read scope.","operationId":"listCompanyAccountingDimensionValues","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctDimensionValue"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (manage_coa for writes), an entity-restricted or project-scoped grant writing, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"List a dimension's values","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"parent_id must be a value of the same dimension. entity_ids restricts the value to those entities (empty = every entity); effective_from/effective_to bound the posting dates it accepts. Needs manage_coa on an unrestricted grant. Requires the accounting:write scope.","operationId":"createCompanyAccountingDimensionValue","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"value":{"additionalProperties":false,"properties":{"code":{"maxLength":30,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.\\-]*$","type":"string"},"description":{"maxLength":1000,"type":["string","null"]},"effective_from":{"format":"date","type":["string","null"]},"effective_to":{"format":"date","type":["string","null"]},"entity_ids":{"items":{"minimum":1,"type":"integer"},"maxItems":200,"type":"array"},"is_active":{"type":"boolean"},"name":{"maxLength":200,"minLength":1,"type":"string"},"parent_id":{"minimum":1,"type":["integer","null"]}},"required":["code","name"],"type":"object"}},"required":["value"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctDimensionValue"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (manage_coa for writes), an entity-restricted or project-scoped grant writing, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Create a dimension value","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/dimensions/{id}/values/{value_id}":{"get":{"description":"Requires the accounting:read scope.","operationId":"getCompanyAccountingDimensionValue","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"value_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctDimensionValue"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (manage_coa for writes), an entity-restricted or project-scoped grant writing, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"Show a dimension value","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Rename, re-parent (no cycles), change the effective window or entity restriction, or (de)activate. Posted lines keep the value id, so reports show the new name for all history and the rename is in the dimension's history. Needs manage_coa on an unrestricted grant. Requires the accounting:write scope.","operationId":"updateCompanyAccountingDimensionValue","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"value_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"value":{"additionalProperties":false,"properties":{"code":{"maxLength":30,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.\\-]*$","type":"string"},"description":{"maxLength":1000,"type":["string","null"]},"effective_from":{"format":"date","type":["string","null"]},"effective_to":{"format":"date","type":["string","null"]},"entity_ids":{"items":{"minimum":1,"type":"integer"},"maxItems":200,"type":"array"},"is_active":{"type":"boolean"},"name":{"maxLength":200,"minLength":1,"type":"string"},"parent_id":{"minimum":1,"type":["integer","null"]}},"type":"object"}},"required":["value"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctDimensionValue"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission (manage_coa for writes), an entity-restricted or project-scoped grant writing, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Update a dimension value","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/entities":{"get":{"description":"Legal entities inside the company, for multi-entity books, intercompany and consolidation. Every posted entry balances per entity. Requires the accounting:read scope.","operationId":"listCompanyAccountingEntities","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Entity"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List legal entities","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Adds an entity with optional intercompany due-to/due-from accounts. The first entity becomes the default. Needs manage_coa. Requires the accounting:write scope. `is_elimination: true` creates the consolidation elimination book (one per company), which takes only CL entries and never becomes the default.","operationId":"createCompanyAccountingEntity","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"entity":{"properties":{"address":{"type":["string","null"]},"city":{"type":["string","null"]},"code":{"type":"string"},"intercompany_due_from_account_id":{"minimum":1,"type":["integer","null"]},"intercompany_due_to_account_id":{"minimum":1,"type":["integer","null"]},"is_active":{"type":"boolean"},"is_elimination":{"description":"Create the consolidation elimination entity (one per company).","type":"boolean"},"legal_name":{"type":["string","null"]},"name":{"type":"string"},"phone":{"type":["string","null"]},"retained_earnings_account_id":{"description":"Retained earnings this entity's year-end close posts to (a postable retained earnings or equity account); null uses the company's RETAINED_EARNINGS account.","minimum":1,"type":["integer","null"]},"state":{"type":["string","null"]},"tax_id":{"description":"Payer EIN for 1099 issuer records; stored encrypted, only tax_id_last4 is returned.","pattern":"^\\d{2}-?\\d{7}$","type":["string","null"]},"zip":{"type":["string","null"]}},"required":["code","name"],"type":"object"}},"required":["entity"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Entity"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Create a legal entity","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/entities/{id}":{"get":{"description":"One entity of this company. Requires the accounting:read scope.","operationId":"getCompanyAccountingEntity","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Entity"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a legal entity","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Renames, deactivates or remaps intercompany accounts. Needs manage_coa. Requires the accounting:write scope.","operationId":"updateCompanyAccountingEntity","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"entity":{"properties":{"address":{"type":["string","null"]},"city":{"type":["string","null"]},"code":{"type":"string"},"intercompany_due_from_account_id":{"minimum":1,"type":["integer","null"]},"intercompany_due_to_account_id":{"minimum":1,"type":["integer","null"]},"is_active":{"type":"boolean"},"legal_name":{"type":["string","null"]},"name":{"type":"string"},"phone":{"type":["string","null"]},"retained_earnings_account_id":{"description":"Retained earnings this entity's year-end close posts to (a postable retained earnings or equity account); null uses the company's RETAINED_EARNINGS account.","minimum":1,"type":["integer","null"]},"state":{"type":["string","null"]},"tax_id":{"description":"Payer EIN for 1099 issuer records; stored encrypted, only tax_id_last4 is returned.","pattern":"^\\d{2}-?\\d{7}$","type":["string","null"]},"zip":{"type":["string","null"]}},"type":"object"}},"required":["entity"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Entity"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Update a legal entity","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fiscal_years":{"post":{"description":"Creates the fiscal year (labelled by the calendar year it ends in) and its twelve monthly periods from the settings' start month. Returns the existing year unchanged if it already exists. A year before a closed period is refused unless `closed` is true. Needs close_period with unrestricted entity access. Requires the accounting:write scope.","operationId":"createCompanyAccountingFiscalYear","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"fiscal_year":{"properties":{"closed":{"description":"Create every period and module closed. Required when the year comes before a closed period (422 otherwise).","type":"boolean"},"year":{"maximum":2100,"minimum":1990,"type":"integer"}},"required":["year"],"type":"object"}},"required":["fiscal_year"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FiscalYear"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict, including an Idempotency-Key reused for a different request or still in progress"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Generate a fiscal year","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fiscal_years/{id}/adjusting_period":{"post":{"description":"Adds period 13 to the fiscal year: one day on the year's last day, open, for audit adjustments that land after later months closed. Entries reach it only with adjusting: true (GJ or CL), it is exempt from later closed periods, and it closes and reopens on its own. Idempotent: 200 with the existing period. Needs close_period with unrestricted entity access. Audited. Requires the accounting:write scope.","operationId":"adjustingPeriodCompanyAccountingFiscalYear","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"period":{"$ref":"#/components/schemas/accounting_Period"}},"required":["period"],"type":"object"}}},"description":"The fiscal year already has one"},"201":{"content":{"application/json":{"schema":{"properties":{"period":{"$ref":"#/components/schemas/accounting_Period"}},"required":["period"],"type":"object"}}},"description":"Adjusting period added"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Add the adjusting period (period 13)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fiscal_years/{id}/year_end_close":{"post":{"description":"Posts one closing entry (journal `CL`, `is_closing_entry: true`, source `year_end_close` with the fiscal year id) dated the last day of the year. It moves the year’s income and expense balances of every entity into retained earnings, balanced per entity, and marks the fiscal year `closed`. Earlier fiscal years with income or expense balances must be closed first. Once closed, the year refuses every posting except closing entries until the close is reversed (POST .../year_end_close/reverse). Each entity closes into its own retained_earnings_account_id when set (else the company's retained earnings), and equity accounts with subtype `distributions` (S-corp distributions, partner draws) close into it too. When the year has period 13, the closing entry posts there, period 13 may stay open, and each later adjusting entry re-closes the year with a new revision. Every period of the year must be soft-closed (or closed) for GL first, and the last period must still accept GL postings. Idempotent: a rerun returns the existing entry with 200. Reports already present prior-year earnings in retained earnings, so the entry changes no statement total. Needs close_period with unrestricted entity access. Audited. Requires the accounting:write scope.","operationId":"yearEndCloseCompanyAccountingFiscalYear","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_YearEndClose"}}},"description":"Already closed; the existing entry"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_YearEndClose"}}},"description":"Closing entry posted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Post the year-end close","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fiscal_years/{id}/year_end_close/reverse":{"post":{"description":"Reverses the fiscal year's standing year-end closing entry on its own date (the year's last day) and reopens the fiscal year (status `open`), so the year can take postings and be closed again. The last period must still accept GL postings. Needs post_journal and close_period with unrestricted entity access; at or above the approval threshold the reverser must hold approve_journal and must not have prepared the close. 404 when the year has no posted closing entry. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingFiscalYearYearEndCloseReverse","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reversal":{"properties":{"reason":{"maxLength":500,"type":["string","null"]}},"type":"object"}},"type":"object"}}},"required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_JournalEntryShow"}}},"description":"The reversing entry"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Reverse the year-end close","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/cash_forecast":{"get":{"description":"The job-aware rolling cash forecast: 13 weeks (granularity week) or 12 months (month) after as_of (default today). Opening = book balance of the non-card bank accounts in scope. Lines (each with its source document and basis): open AR on due date + the customer's days past due at payment; AR retainage at job completion + release days; pay apps not yet invoiced and the remaining prime contract spread to completion; open AP on due date or on the discount date at the discounted amount (policy); draft payment runs; AP retainage at completion; open commitments spread to completion on vendor terms; payroll (unposted runs, then the pay calendar at the recent average; payroll_view only); recurring journals; debt principal; lease payments; manual lines. scenario_id applies a scenario overlay. ties reconcile each source to its open items (in the horizon, beyond it, excluded). Banking-wide: an entity-scoped grant sees its entities. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingFpaCashForecast","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"granularity","required":false,"schema":{"enum":["week","month"]}},{"in":"query","name":"buckets","required":false,"schema":{"maximum":52,"minimum":1,"type":"integer"}},{"in":"query","name":"scenario_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"One entity of the grant's scope. The forecast is single-currency: a scope whose entities keep different functional currencies is refused (422) unless narrowed to one entity.","in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FpaCashForecast"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Cash forecast","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/cash_forecast/adjustments":{"get":{"description":"Manual cash forecast lines, voided ones included. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingFpaCashForecastAdjustments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_CashAdjustment"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List manual forecast lines","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"A known receipt (positive) or payment (negative) dated after today with a reason. An entity-scoped grant must name one of its entities. Needs bank_reconcile; audited. Honors Idempotency-Key. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"createCompanyAccountingFpaCashForecastAdjustment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"adjustment":{"properties":{"amount":{"type":["string","number"]},"date":{"format":"date","type":"string"},"entity_id":{"minimum":1,"type":["integer","null"]},"project_id":{"minimum":1,"type":["integer","null"]},"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["date","amount","reason"],"type":"object"}},"required":["adjustment"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CashAdjustment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Add a manual forecast line","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/cash_forecast/adjustments/{id}/void":{"post":{"description":"Manual lines are never edited or deleted: a correction voids one with a reason. Needs bank_reconcile; audited. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"voidCompanyAccountingFpaCashForecastAdjustment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CashAdjustment"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict with the record's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Void a manual forecast line","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/cash_forecast/compare":{"get":{"description":"The base forecast and each scenario overlay of the same lines (scenario_ids, comma-separated, at most 5): net and closing per bucket, totals and low points. A scenario never changes the base column. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingFpaCashForecastCompare","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"granularity","required":false,"schema":{"enum":["week","month"]}},{"in":"query","name":"buckets","required":false,"schema":{"maximum":52,"minimum":1,"type":"integer"}},{"in":"query","name":"scenario_ids","required":true,"schema":{"pattern":"^\\d+(,\\d+)*$","type":"string"}},{"description":"One entity of the grant's scope. The forecast is single-currency: a scope whose entities keep different functional currencies is refused (422) unless narrowed to one entity.","in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_CashScenarioCompare"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Compare cash scenarios","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/cash_forecast/days_to_pay":{"get":{"description":"Per customer (and all customers, customer_id null) from posted, unreversed receipt applications: invoices fully paid within the lookback window; days to pay = paid date − invoice date, days late = paid date − due date; mean and median rounded half up to whole days; lag_days is the configured statistic of days late, which shifts open invoices in the forecast. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingFpaCashForecastDaysToPay","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"customer_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_DaysToPay"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"Customer days to pay","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/cash_forecast/snapshots":{"get":{"description":"Stored forecasts, newest first; an entity-scoped grant sees snapshots within its entities. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingFpaCashForecastSnapshots","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Snapshot"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List cash forecast snapshots","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Stores today's forecast (as of the company's today) with every line, its basis and a content hash. Append-only: a database trigger refuses any update or delete. Needs bank_reconcile; audited. Honors Idempotency-Key. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"createCompanyAccountingFpaCashForecastSnapshot","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"snapshot":{"properties":{"buckets":{"maximum":52,"minimum":1,"type":"integer"},"granularity":{"enum":["week","month"]},"name":{"type":"string"},"scenario_id":{"minimum":1,"type":["integer","null"]}},"required":[],"type":"object"}},"required":["snapshot"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Snapshot"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Store a cash forecast snapshot","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/cash_forecast/snapshots/{id}":{"get":{"description":"With its stored lines. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"getCompanyAccountingFpaCashForecastSnapshot","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Snapshot"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a cash forecast snapshot","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/cash_forecast/snapshots/{id}/accuracy":{"get":{"description":"For every bucket of the snapshot that has ended by as_of (default today): forecast in/out from the stored lines vs actual posted debits/credits to the snapshot's cash accounts in its entity scope (entries that only move cash between those accounts left out); error = actual net − forecast net, absolute percent error, forecast vs actual closing balance; summary bias, MAE and MAPE. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingFpaCashForecastSnapshotAccuracy","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Accuracy"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Forecast vs actual","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/margin_fade":{"get":{"description":"Every job with projected margin snapshots in scope (a project_manager_view grant: its own jobs): the latest margin, the change since the prior and the first snapshot, and fade flags against the FP&A thresholds (a fall of more than the percentage points or the amount). Faded jobs first. Requires the accounting:read scope.","operationId":"listCompanyAccountingFpaMarginFade","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"flagged","required":false,"schema":{"enum":["true","false"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_MarginPortfolio"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Margin fade portfolio","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/margin_fade/capture":{"post":{"description":"Captures each job's projected margin at a past period end: the job's latest approved or posted WIP row for that period end (its EAC override when set), else its latest unsuperseded frozen PM forecast in that month with a known contract value. Append-only: a job already captured for the period keeps its snapshot. Needs close_period; audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingFpaMarginFadeCapture","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"period_end":{"format":"date","type":"string"}},"required":["period_end"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"captured":{"items":{"properties":{"project_id":{"minimum":1,"type":"integer"},"source":{"enum":["wip","forecast"]}},"required":["project_id","source"],"type":"object"},"type":"array"},"period_end":{"format":"date","type":"string"},"skipped_project_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"}},"required":["period_end","captured","skipped_project_ids"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Capture projected margins","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/margin_fade/{id}":{"get":{"description":"One job's projected margin snapshots, the change since the prior and first snapshot, its fade flags and every threshold crossing (events). A project_manager_view grant reads its own jobs only. Requires the accounting:read scope.","operationId":"getCompanyAccountingFpaMarginFade","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project id","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_MarginHistory"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Job margin history","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/scenarios":{"get":{"description":"Named scenarios (base, upside, downside, custom) with their overlay adjustments. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingFpaScenarios","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Scenario"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List forecast scenarios","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"A scenario is a set of overlay adjustments, never a copy: target budget (by account and/or project: percent, or amount per month) or cash (by driver and/or project: percent, amount per bucket, or shift_days). Needs close_period and unrestricted entity access; audited. Honors Idempotency-Key. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"createCompanyAccountingFpaScenario","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"scenario":{"properties":{"adjustments":{"items":{"properties":{"account_id":{"minimum":1,"type":["integer","null"]},"driver":{"enum":["ar","ar_retainage","billing","ap","ap_run","ap_retainage","commitment","payroll","recurring","scheduled","debt","lease","manual",null],"type":["string","null"]},"from_date":{"format":"date","type":["string","null"]},"memo":{"type":["string","null"]},"method":{"enum":["percent","amount","shift_days"]},"project_id":{"minimum":1,"type":["integer","null"]},"target":{"enum":["budget","cash"]},"to_date":{"format":"date","type":["string","null"]},"value":{"description":"Percent, amount or whole days","type":["string","number"]}},"required":["target","method","value"],"type":"object"},"type":"array"},"description":{"type":["string","null"]},"kind":{"enum":["base","upside","downside","custom"]},"name":{"maxLength":100,"minLength":1,"type":"string"}},"required":["name"],"type":"object"}},"required":["scenario"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Scenario"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict with the record's state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Create a forecast scenario","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/scenarios/compare":{"get":{"description":"A budget version's fiscal-year totals per account against the overlay of each scenario (scenario_ids, comma-separated, at most 5), with net income per column. The version is read, never changed. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingFpaScenariosCompare","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"budget_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"scenario_ids","required":true,"schema":{"pattern":"^\\d+(,\\d+)*$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BudgetScenarioCompare"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Compare budget scenarios","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/scenarios/{id}":{"delete":{"description":"Refused (409) while a stored cash forecast snapshot names it. Needs close_period; audited. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"deleteCompanyAccountingFpaScenario","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict with the record's state"}},"summary":"Delete a forecast scenario","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"get":{"description":"Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"getCompanyAccountingFpaScenario","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Scenario"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a forecast scenario","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/scenarios/{id}/adjustments":{"post":{"description":"Needs close_period; audited. Honors Idempotency-Key. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"createCompanyAccountingFpaScenarioAdjustment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"adjustment":{"properties":{"account_id":{"minimum":1,"type":["integer","null"]},"driver":{"enum":["ar","ar_retainage","billing","ap","ap_run","ap_retainage","commitment","payroll","recurring","scheduled","debt","lease","manual",null],"type":["string","null"]},"from_date":{"format":"date","type":["string","null"]},"memo":{"type":["string","null"]},"method":{"enum":["percent","amount","shift_days"]},"project_id":{"minimum":1,"type":["integer","null"]},"target":{"enum":["budget","cash"]},"to_date":{"format":"date","type":["string","null"]},"value":{"description":"Percent, amount or whole days","type":["string","number"]}},"required":["target","method","value"],"type":"object"}},"required":["adjustment"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Adjustment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Add a scenario adjustment","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/scenarios/{id}/adjustments/{adjustment_id}":{"delete":{"description":"Needs close_period; audited. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"deleteCompanyAccountingFpaScenarioAdjustment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"adjustment_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Remove a scenario adjustment","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fpa/settings":{"get":{"description":"Cash forecast timing policy and margin fade thresholds (defaults until saved: saved false). Requires the accounting:read scope.","operationId":"listCompanyAccountingFpaSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FpaSettings"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"FP&A settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Needs close_period and unrestricted entity access; audited with the diff. Requires the accounting:write scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"updateCompanyAccountingFpaSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"settings":{"properties":{"customer_terms_days":{"maximum":365,"minimum":0,"type":"integer"},"default_duration_months":{"maximum":60,"minimum":1,"type":"integer"},"dtp_lookback_days":{"maximum":1825,"minimum":30,"type":"integer"},"dtp_method":{"enum":["median","mean"]},"fade_threshold_amount":{"type":["string","number"]},"fade_threshold_pct":{"type":["string","number"]},"honor_discounts":{"type":"boolean"},"payroll_average_runs":{"maximum":12,"minimum":1,"type":"integer"},"retainage_release_days":{"maximum":730,"minimum":0,"type":"integer"},"vendor_pay_days":{"maximum":365,"minimum":0,"type":"integer"}},"type":"object"}},"required":["settings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FpaSettings"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Update FP&A settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fx/entities":{"get":{"description":"Each entity in the grant's scope with its functional currency (the base currency when unset). Requires the accounting:read scope.","operationId":"listCompanyAccountingFxEntities","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EntityCurrencies"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"}},"summary":"List entity functional currencies","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fx/entities/{id}":{"patch":{"description":"ASC 830-10-45-2. Allowed only before the entity has posted or unposted entries (a later change is prospective remeasurement, which is not automated); the elimination entity stays in the base currency. Needs manage_coa over every entity. Audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingFxEntity","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"entity":{"additionalProperties":false,"properties":{"functional_currency":{"pattern":"^[A-Z]{3}$","type":["string","null"]}},"required":["functional_currency"],"type":"object"}},"required":["entity"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EntityCurrency"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing rate or account mapping"}},"summary":"Set an entity's functional currency","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fx/rates":{"get":{"description":"Effective-dated rates (spot, average, historical), newest first, with Total/Per-Page/Link headers. Any accounting grant. Requires the accounting:read scope.","operationId":"listCompanyAccountingFxRates","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter: from currency","in":"query","name":"from_currency","required":false,"schema":{"pattern":"^[A-Z]{3}$","type":"string"}},{"description":"Filter: to currency","in":"query","name":"to_currency","required":false,"schema":{"pattern":"^[A-Z]{3}$","type":"string"}},{"description":"Filter: rate type","in":"query","name":"rate_type","required":false,"schema":{"enum":["spot","average","historical"],"type":"string"}},{"description":"Effective on or after","in":"query","name":"since","required":false,"schema":{"format":"date","type":"string"}},{"description":"Effective on or before","in":"query","name":"until","required":false,"schema":{"format":"date","type":"string"}},{"description":"Page number","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Page size (default 100)","in":"query","name":"per_page","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ExchangeRate"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing rate or account mapping"}},"summary":"List exchange rates","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Adds one rate: `rate` units of to_currency per unit of from_currency, effective on effective_date. Needs manage_coa over every entity. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingFxRate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"exchange_rate":{"$ref":"#/components/schemas/accounting_ExchangeRateInput"}},"required":["exchange_rate"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ExchangeRate"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: the rate is used by the ledger, a duplicate rate, or evidence changed since preparation"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing rate or account mapping"}},"summary":"Add an exchange rate","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fx/rates/import":{"post":{"description":"CSV with header rate_type,from_currency,to_currency,effective_date,rate (rate_type optional, default spot). All or nothing: any invalid row, or a row that would change an existing rate, refuses the file (422; with dry_run the errors are returned). Rows equal to existing rates are unchanged, so re-importing a file is a no-op (natural key). One audit event with the file's sha256. Needs manage_coa over every entity. Returns 201 when rates were created, else 200. Requires the accounting:write scope.","operationId":"createCompanyAccountingFxRatesImport","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"import":{"additionalProperties":false,"properties":{"csv":{"minLength":1,"type":"string"},"dry_run":{"default":false,"type":"boolean"}},"required":["csv"],"type":"object"}},"required":["import"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RateImportResult"}}},"description":"OK"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RateImportResult"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing rate or account mapping"}},"summary":"Import exchange rates from CSV","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fx/rates/{id}":{"delete":{"description":"Deletes a rate nothing has used (409 once used). Needs manage_coa over every entity. Audited. Requires the accounting:write scope.","operationId":"deleteCompanyAccountingFxRate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"No content"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: the rate is used by the ledger, a duplicate rate, or evidence changed since preparation"}},"summary":"Delete an unused exchange rate","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"get":{"description":"One rate, with whether it is used (immutable). Requires the accounting:read scope.","operationId":"getCompanyAccountingFxRate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ExchangeRate"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show an exchange rate","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Changes the rate or effective date of a rate no posting, document or revaluation has used (409 once used; a database trigger also refuses). Needs manage_coa over every entity. Audited with before and after values. Requires the accounting:write scope.","operationId":"updateCompanyAccountingFxRate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"exchange_rate":{"additionalProperties":false,"properties":{"effective_date":{"format":"date","type":"string"},"rate":{"pattern":"^\\d{1,14}(\\.\\d{1,10})?$","type":"string"}},"required":["rate"],"type":"object"}},"required":["exchange_rate"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ExchangeRate"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: the rate is used by the ledger, a duplicate rate, or evidence changed since preparation"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing rate or account mapping"}},"summary":"Change an unused exchange rate","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fx/revaluations":{"get":{"description":"Month-end revaluation runs, newest first (at most 200), in the grant's entities. Requires the accounting:read scope.","operationId":"listCompanyAccountingFxRevaluations","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter: entity","in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter: period","in":"query","name":"period_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_RevaluationRun"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"}},"summary":"List revaluation runs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"ASC 830-20-35-1: restates the entity's foreign-currency cash, receivable, payable and intercompany balances at the period-end spot rate. Saves a prepared run with its lines, rates and evidence hash; nothing posts until a different user approves. Natural key: at most one prepared run per entity and period; preparing again with unchanged balances and rates returns the current run (200, unchanged: true). Refused (422) in a closed period, when the next period (where it reverses) is missing or closed, when a prior revaluation has not yet auto-reversed, or when no gain/loss account is mapped. Needs post_journal and the entity in the grant. Requires the accounting:write scope.","operationId":"createCompanyAccountingFxRevaluation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"revaluation":{"additionalProperties":false,"properties":{"entity_id":{"minimum":1,"type":"integer"},"period_id":{"minimum":1,"type":"integer"}},"required":["entity_id","period_id"],"type":"object"}},"required":["revaluation"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RevaluationRun"}}},"description":"Unchanged"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RevaluationRun"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing rate or account mapping"}},"summary":"Prepare a revaluation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fx/revaluations/preview":{"get":{"description":"What a revaluation of the entity for the period would post now. No write. Requires the accounting:read scope.","operationId":"listCompanyAccountingFxRevaluationsPreview","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Entity","in":"query","name":"entity_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Period","in":"query","name":"period_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RevaluationPreview"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing rate or account mapping"}},"summary":"Preview a revaluation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fx/revaluations/{id}":{"get":{"description":"One run with its lines, rates and posting. Requires the accounting:read scope.","operationId":"getCompanyAccountingFxRevaluation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RevaluationRun"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a revaluation run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fx/revaluations/{id}/decision":{"post":{"description":"approve (approve_journal, never the preparer): recomputes the evidence (409 if balances or rates moved), posts the GJ entry dated the period end, auto-reversing on the next period's first day, and stamps the rates used. cancel (post_journal, with a reason) withdraws a prepared run. A repeat of a finished decision returns the run. Requires the accounting:write scope.","operationId":"decisionCompanyAccountingFxRevaluation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"decision":{"additionalProperties":false,"properties":{"action":{"enum":["approve","cancel"],"type":"string"},"reason":{"maxLength":500,"minLength":1,"type":"string"}},"required":["action"],"type":"object"}},"required":["decision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RevaluationRun"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: the rate is used by the ledger, a duplicate rate, or evidence changed since preparation"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing rate or account mapping"}},"summary":"Approve or cancel a revaluation","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fx/setup":{"post":{"description":"Creates and maps any missing FX_GAIN_LOSS (7500), FX_UNREALIZED_GAIN_LOSS (7510) and CTA (3600, accumulated other comprehensive income) accounts. Idempotent: nothing is created when every role is mapped (200). Needs manage_coa over every entity. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingFxSetup","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FxSetup"}}},"description":"OK"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_FxSetup"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"}},"summary":"Create the FX accounts","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/fx/translation":{"get":{"description":"ASC 830-30 current rate method for one entity as of a date: assets and liabilities at the closing rate (reporting-currency balances at their transaction amount), income and expense at monthly average rates, equity at historical rates, prior years' earnings in retained earnings, and the cumulative translation adjustment. Lists the rates used. Requires the accounting:read scope.","operationId":"listCompanyAccountingFxTranslation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Entity","in":"query","name":"entity_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"As-of date","in":"query","name":"as_of","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Translation"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a closed period, a missing rate or account mapping"}},"summary":"Translated trial balance","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/general_ledger":{"get":{"description":"Posted lines between `from` (default the start of the fiscal year holding `to`) and `to` (default today) in posting order. With `account_id` the response also carries the opening balance, a running balance per line and the closing balance (debit positive). Filter by entity, project, department or cost code. Requires the accounting:read scope. Deep reads should page by keyset: pass the previous response’s `next_cursor` as `cursor` (the running balance travels in the cursor, so no earlier line is re-summed); `page` is then ignored and the response carries no `Link` page header. Cursors are at most 512 characters; a longer or malformed one returns 422.","operationId":"listCompanyAccountingGeneralLedger","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"One account (enables running balances)","in":"query","name":"account_id","schema":{"minimum":1,"type":"integer"}},{"description":"Inclusive start (default the fiscal year start for `to`)","in":"query","name":"from","schema":{"format":"date","type":"string"}},{"description":"Inclusive end","in":"query","name":"to","schema":{"format":"date","type":"string"}},{"description":"Entity","in":"query","name":"entity_id","schema":{"minimum":1,"type":"integer"}},{"description":"Project","in":"query","name":"project_id","schema":{"minimum":1,"type":"integer"}},{"description":"Department","in":"query","name":"department_id","schema":{"minimum":1,"type":"integer"}},{"description":"Comma-separated dimension value ids: lines carrying one of them or a child value (values of one dimension OR, dimensions AND). Opening, closing and running balances follow the filter.","in":"query","name":"dimension_value_ids","schema":{"pattern":"^\\d{1,10}(,\\d{1,10}){0,49}$","type":"string"}},{"description":"Cost code","in":"query","name":"cost_code_id","schema":{"minimum":1,"type":"integer"}},{"description":"Lines whose vendor or customer is this company vendor. Narrows the lines only: opening, closing and running balance are null.","in":"query","name":"party_id","schema":{"minimum":1,"type":"integer"}},{"description":"Lines of this source type (manual, ap_bill, ar_invoice, payroll_run, intercompany for generated due-to/due-from lines…). Narrows the lines only: opening, closing and running balance are null.","in":"query","name":"source_type","required":false,"schema":{"maxLength":64,"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Opaque keyset cursor from `next_cursor` of the previous page; when set, `page` is ignored","in":"query","name":"cursor","schema":{"maxLength":512,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GeneralLedger"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"General ledger detail","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/grants":{"get":{"description":"Every company member with their accounting role and permission flags. Company admins are implicit owners. Needs manage_grants. Requires the accounting:read scope.","operationId":"listCompanyAccountingGrants","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Name or email","in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Member"},"type":"array"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List accounting access","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/grants/access_review":{"post":{"description":"Quarterly access review: decide every grant inside your entity scope except your own (keep stamps certified_at; revoke deletes the grant), in one transaction with one audit row per grant (grant_certified or grant_revoked). 422 when a grant is undecided or a decision names a member without a reviewable grant. Needs manage_grants. Requires the accounting:write scope. Step-up: from a browser session this needs an authenticator code re-entered within settings step_up_minutes (401 step_up_required); a user without a factor is refused (403 mfa_required) unless the MFA policy is off entirely (require_mfa_for empty and require_mfa_for_accounting off). An API token cannot re-enter a code: it passes only when it holds the accounting:step_up scope (403 step_up_required otherwise; the MFA policy still applies to its user); each such use writes a step_up_token audit row.","operationId":"createCompanyAccountingGrantsAccessReview","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"access_review":{"properties":{"decisions":{"items":{"properties":{"decision":{"enum":["keep","revoke"]},"user_id":{"minimum":1,"type":"integer"}},"required":["user_id","decision"],"type":"object"},"maxItems":1000,"type":"array"},"note":{"maxLength":500,"type":"string"}},"required":["decisions"],"type":"object"}},"required":["access_review"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"certified_at":{"format":"date-time","type":"string"},"kept":{"type":"integer"},"revoked":{"type":"integer"}},"required":["kept","revoked","certified_at"],"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Certify an access review","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/grants/{id}":{"patch":{"description":"Grants a role preset (owner, controller, accountant, ap_clerk, ar_clerk, payroll_admin, project_manager_view, auditor_readonly) or `none` to revoke. Individual flags override the preset; `entity_ids` limits the grant to some entities. Needs manage_grants. Audited in the same transaction. Requires the accounting:write scope. 422 when a project_manager_view grant would hold an AP, AR, banking or payroll flag (ap_enter, ap_approve, release_payments, manage_vendor_banking, ar_enter, ar_approve, bank_reconcile, payroll_view, payroll_run, view_payroll_pii): the role is project-scoped and those areas are entity-wide. A grant saved with one before this check resolves with it off, so every AP, AR, banking and payroll endpoint answers it 403. Preventive segregation of duties: rules ap_full_cycle (ap_enter + ap_approve + release_payments + manage_vendor_banking), payroll_full_cycle (payroll_run + view_payroll_pii + manage_vendor_banking) and gl_full_cycle (post_journal + approve_journal + close_period) warn: a grant that gains one needs `reason` (422 sod_reason_required), and the response lists every conflict it holds in `warnings`. grants_with_payments (manage_grants + release_payments) blocks (422 sod_blocked) except on the owner role. Step-up: from a browser session this needs an authenticator code re-entered within settings step_up_minutes (401 step_up_required); a user without a factor is refused (403 mfa_required) unless the MFA policy is off entirely (require_mfa_for empty and require_mfa_for_accounting off). An API token cannot re-enter a code: it passes only when it holds the accounting:step_up scope (403 step_up_required otherwise; the MFA policy still applies to its user); each such use writes a step_up_token audit row.","operationId":"updateCompanyAccountingGrant","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"The member's user id","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"grant":{"properties":{"ap_approve":{"type":"boolean"},"ap_enter":{"type":"boolean"},"approve_journal":{"type":"boolean"},"ar_approve":{"type":"boolean"},"ar_enter":{"type":"boolean"},"bank_reconcile":{"type":"boolean"},"close_period":{"type":"boolean"},"entity_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"expires_at":{"description":"Last company-local day of access; null clears it. Must be today or later.","format":"date","type":["string","null"]},"job_forecast_edit":{"type":"boolean"},"manage_coa":{"type":"boolean"},"manage_grants":{"type":"boolean"},"manage_integrations":{"type":"boolean"},"manage_vendor_banking":{"type":"boolean"},"payroll_run":{"type":"boolean"},"payroll_view":{"type":"boolean"},"post_journal":{"type":"boolean"},"reason":{"description":"Why a grant that gains a segregation of duties conflict is needed; audited with the change.","maxLength":500,"minLength":3,"type":"string"},"release_payments":{"type":"boolean"},"role":{"enum":["owner","controller","accountant","ap_clerk","ar_clerk","payroll_admin","project_manager_view","auditor_readonly","none"]},"view_ledger":{"type":"boolean"},"view_payroll_pii":{"type":"boolean"}},"required":["role"],"type":"object"}},"required":["grant"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/accounting_Member"},{"properties":{"warnings":{"items":{"properties":{"flags":{"items":{"type":"string"},"type":"array"},"risk":{"type":"string"},"rule":{"type":"string"},"severity":{"enum":["warn","block"]}},"required":["rule","severity","flags","risk"],"type":"object"},"type":"array"}},"required":["warnings"],"type":"object"}]}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Set a member's accounting access","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/integrations/connections":{"get":{"description":"Requires the accounting:read scope.","operationId":"listCompanyAccountingIntegrationsConnections","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Connection"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission or entity scope denied"},"404":{"description":"Not found in company"},"422":{"description":"Validation failed"}},"summary":"List ERP connections with health and recent sync runs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Requires the accounting:write scope.","operationId":"createCompanyAccountingIntegrationsConnection","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"config":{"additionalProperties":false,"properties":{"as_of":{"description":"Cut-over date; without it a sync stages masters only.","format":"date","type":"string"},"environment":{"enum":["production","sandbox"]},"retainage_payable_account_ids":{"items":{"type":"string"},"maxItems":20,"type":"array"}},"type":"object"},"entity_id":{"minimum":1,"type":"integer"},"external_tenant":{"description":"QBO realm id.","maxLength":64,"type":"string"},"name":{"maxLength":80,"type":"string"},"provider":{"enum":["qbo","spectrum","sage300cre","intacct","foundation","csv"]}},"required":["entity_id","provider","name"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Connection"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission or entity scope denied"},"404":{"description":"Not found in company"},"422":{"description":"Validation failed"}},"summary":"Create an ERP connection (manageIntegrations)","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/integrations/connections/{id}/sync":{"post":{"description":"Requires the accounting:write scope.","operationId":"syncCompanyAccountingIntegrationsConnection","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SyncRun"}}},"description":"Queued"},"401":{"description":"Authentication required"},"403":{"description":"Permission or entity scope denied"},"404":{"description":"Not found in company"},"422":{"description":"Validation failed"}},"summary":"Queue a sync pull (live API connections); it stages coa, vendors and open_ap import runs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/integrations/exports/journals":{"get":{"description":"Needs view_ledger; a project-scoped (project_manager_view) grant gets 403. Posted entries (reversed originals and their reversals) with posting dates in [from, to], optionally one journal (journal=AP exports AP) and one entity, in the caller's entity scope. The debit_credit and signed_amount files end with Entity (code) and Department columns, since one file can mix entities. Job-coded lines carry Project (project number, else name), Cost Code (full code) and Cost Type (code); the QBO template's Name column carries the line's vendor or customer, Location the entity code and Class the project (or department, qbo_class). Every entry balances before the file is written; text cells are formula-escaped and amounts are exact. Up to 20,000 lines; rate limited per user across all app instances (429 with Retry-After). Each export is audited. A target export that races another export to the same target is 409; export again. Requires the accounting:read scope; with target, the accounting:write scope (it records what was sent).","operationId":"listCompanyAccountingIntegrationsExportsJournals","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Posting date range; required unless since_last or batch_id is sent.","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"Posting date range; required unless since_last or batch_id is sent.","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"format","required":false,"schema":{"default":"debit_credit","enum":["debit_credit","signed_amount","qbo_journal"]}},{"in":"query","name":"journal","required":false,"schema":{"enum":["GJ","AP","AR","PR","CM","JC","FA","CL","IC","WIP"]}},{"in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"A named feed (another ERP running alongside). Each posted entry is exported to a target once: entries already sent to it are left out, and the new ones are recorded as an export batch (X-Export-Batch-Id). Needs the accounting:write scope and the manageIntegrations grant (403 otherwise); a read-only workspace is refused.","in":"query","name":"target","required":false,"schema":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"}},{"description":"With target: every posted entry not yet exported to it, whatever its posting date, oldest post first, up to the line cap (call again for the rest). An entry posted late with a back date is never missed.","in":"query","name":"since_last","required":false,"schema":{"enum":["true","false"]}},{"description":"Download a recorded batch again (for a lost response), exactly as it was exported: its stored format and qbo_class are used, not the ones sent.","in":"query","name":"batch_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"What the qbo_journal Class column carries. Location is the entity code.","in":"query","name":"qbo_class","required":false,"schema":{"default":"project","enum":["project","department","none"]}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"CSV file","headers":{"X-Export-Batch-Id":{"description":"The export batch recorded for a target export (or re-downloaded)","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"description":"No ledger access or wrong company"},"422":{"description":"Invalid range, entity outside scope, or more than 20,000 lines"},"429":{"description":"Export rate limit"}},"summary":"Export posted journals as an ERP import file","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/integrations/imports":{"get":{"description":"Requires the accounting:read scope.","operationId":"listCompanyAccountingIntegrationsImports","parameters":[{"in":"path","name":"company_id Import runs carry opening balances and open AP/AR documents, so project-scoped (project_manager_view) grants get 403 on every import read.","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ImportSummary"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination","schema":{"type":"string"}},"Per-Page":{"description":"Pagination","schema":{"type":"string"}},"Total":{"description":"Pagination","schema":{"type":"string"}}}},"401":{"description":"Authentication required"},"403":{"description":"Permission, entity scope or segregation of duties denied"},"404":{"description":"Import not found in company"},"409":{"description":"Preview changed; reload and reconcile"},"413":{"description":"Request too large"},"422":{"description":"Validation or reconciliation failed"},"500":{"description":"Operation failed; no partial import committed"}},"summary":"List imports","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Requires the accounting:write scope.","operationId":"createCompanyAccountingIntegrationsImport","parameters":[{"in":"path","name":"company_id Import runs carry opening balances and open AP/AR documents, so project-scoped (project_manager_view) grants get 403 on every import read.","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"additionalProperties":false,"properties":{"as_of":{"format":"date","type":"string"},"entity_id":{"minimum":1,"type":"integer"},"file":{"format":"binary","type":"string"},"kind":{"enum":["opening_tb","journal","open_ap","open_ar","coa","vendors","customers","cost_codes","employee_ytd"]},"profile":{"default":"flat","description":"File-import connector profile. foundation flattens a Foundation report export (title block, repeated page headers, totals, grouped party/job, trailing-sign negatives) before preview.","enum":["flat","foundation"]},"source_namespace":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"}},"required":["entity_id","source_namespace","kind","file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ImportRun"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission, entity scope or segregation of duties denied"},"404":{"description":"Import not found in company"},"409":{"description":"Preview changed; reload and reconcile"},"413":{"description":"Request too large"},"422":{"description":"Validation or reconciliation failed"},"500":{"description":"Operation failed; no partial import committed"}},"summary":"Upload CSV and persist validation preview","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/integrations/imports/{id}":{"get":{"description":"Requires the accounting:read scope.","operationId":"getCompanyAccountingIntegrationsImport","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ImportRun"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission, entity scope or segregation of duties denied"},"404":{"description":"Import not found in company"},"409":{"description":"Preview changed; reload and reconcile"},"413":{"description":"Request too large"},"422":{"description":"Validation or reconciliation failed"},"500":{"description":"Operation failed; no partial import committed"}},"summary":"Read preview, results and history","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Requires the accounting:write scope.","operationId":"createCompanyAccountingIntegrationsImportPost","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ImportCommand"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ImportRun"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission, entity scope or segregation of duties denied"},"404":{"description":"Import not found in company"},"409":{"description":"Preview changed; reload and reconcile"},"413":{"description":"Request too large"},"422":{"description":"Validation or reconciliation failed"},"500":{"description":"Operation failed; no partial import committed"}},"summary":"Map, reconcile, approve/apply or reverse an imported entry","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/integrations/inbox":{"get":{"description":"Requires the accounting:read scope.","operationId":"listCompanyAccountingIntegrationsInbox","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_InboxItem"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission or entity scope denied"},"404":{"description":"Not found in company"},"422":{"description":"Validation failed"}},"summary":"Integration error inbox: sync run errors and blocked or failed import runs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/integrations/parallel_run":{"post":{"description":"Requires the accounting:read scope and a ledger viewer grant over the entity. Read only: nothing is posted. The CSV uses the opening_tb layout (account with debit/credit or a signed balance). Source accounts map by the saved opening_tb mapping of source_namespace, else by account number. Balances are cumulative posted balances through as_of in the entity.","operationId":"createCompanyAccountingIntegrationsParallelRun","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"as_of":{"format":"date","type":"string"},"csv":{"maxLength":4194304,"minLength":1,"type":"string"},"entity_id":{"minimum":1,"type":"integer"},"source_namespace":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"}},"required":["entity_id","as_of","csv"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ParallelRunReport"}}},"description":"Comparison (a report document: one row per account, checks for balance, mapping and agreement)"},"401":{"description":"Authentication required"},"403":{"description":"Permission or entity scope denied"},"404":{"description":"Not found in company"},"413":{"description":"Request body too large"},"422":{"description":"Validation failed (including an unbalanced or unreadable source trial balance)"}},"summary":"Parallel run: compare a source system trial balance with the posted trial balance on the same date","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/integrations/sync_runs/{id}":{"get":{"description":"Requires the accounting:read scope.","operationId":"getCompanyAccountingIntegrationsSyncRun","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SyncRun"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission or entity scope denied"},"404":{"description":"Not found in company"},"422":{"description":"Validation failed"}},"summary":"Get a sync run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/job_cost_entries":{"get":{"description":"The job cost subledger: one actual row per posted line on a job-cost account with a project (labor, burden, material, subcontract, equipment, other), linked to its GL line. Filter with `filters[project_id]`, `filters[cost_code_id]`, `filters[cost_type]`, `filters[kind]` and a `from`/`to` date range. A project_manager_view grant sees only the projects its user is a member of. Requires the accounting:read scope.","operationId":"listCompanyAccountingJobCostEntries","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project ids","in":"query","name":"filters[project_id]","schema":{"type":"string"}},{"description":"Cost code ids","in":"query","name":"filters[cost_code_id]","schema":{"type":"string"}},{"description":"labor, material, subcontract, equipment, other, burden","in":"query","name":"filters[cost_type]","schema":{"type":"string"}},{"description":"actual, committed, estimate, projection, change, billed","in":"query","name":"filters[kind]","schema":{"type":"string"}},{"description":"On or after","in":"query","name":"from","schema":{"format":"date","type":"string"}},{"description":"On or before","in":"query","name":"to","schema":{"format":"date","type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_JobCostEntry"},"type":"array"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown filter value"}},"summary":"List job cost entries","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/job_tax_profiles/{id}":{"get":{"description":"`id` is the project id. Returns the job's contractor sales/use tax profile with the model resolved from the state and contract type on `as_of` (default today). Requires the accounting:read scope.","operationId":"getCompanyAccountingJobTaxProfile","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_JobTaxProfile"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity out of scope, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, or a named setup gap (state with no encoded contractor tax rule, missing job-site sales or use tax code)"}},"summary":"Get a job tax profile","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"`id` is the project id. Creates or replaces the profile. A state with no encoded contractor rule is refused (422, setup gap) rather than defaulted. Retailer and gross-receipts states need sales_tax_code_id (except separated retailer contracts); use-tax states need use_tax_code_id. Needs manage_coa. Requires the accounting:write scope.","operationId":"replaceCompanyAccountingJobTaxProfile","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"tax_profile":{"additionalProperties":false,"properties":{"contract_type":{"enum":["lump_sum","separated"],"type":"string"},"sales_tax_code_id":{"nullable":true,"type":"integer"},"state_code":{"type":"string"},"use_tax_code_id":{"nullable":true,"type":"integer"}},"required":["state_code","contract_type"],"type":"object"}},"required":["tax_profile"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_JobTaxProfile"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity out of scope, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, or a named setup gap (state with no encoded contractor tax rule, missing job-site sales or use tax code)"}},"summary":"Set a job tax profile","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/jobcost/forecast":{"get":{"description":"Requires the accounting:read scope.","operationId":"listCompanyAccountingJobcostForecast","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"entity_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"as_of","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Forecast"}}},"description":"Cost-code worksheet, cent-string totals, source links and calculation trace"},"403":{"description":"No accounting/entity access"},"409":{"description":"Missing assignment, inconsistent sources, unsupported consumption, or unavailable historical revisions"},"422":{"description":"Invalid project/entity/date"}},"summary":"Review a tenant/entity-scoped forecast from dated sources","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"Requires the accounting:write scope.","operationId":"replaceCompanyAccountingJobcostForecast","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PmInput"}}},"required":true},"responses":{"200":{"description":"Saved id, incremented revision, method, costToComplete money string or null, and percentComplete / unitsInstalled / totalUnits decimal strings or null"},"403":{"description":"No write permission or read-only workspace"},"409":{"description":"Stale revision or source coverage failure (reload before retrying), the date is in a soft- or hard-closed period, or WIP is posted through the date"},"422":{"description":"Invalid money, date, code or reason"}},"summary":"Save a dated PM forecast input: projection method per cost code (manual cost to complete, physical percent complete, unit rate, budget) and its inputs (jobForecastEdit permission; PM grants only on projects they belong to). With no PM input a cost code's EAC is max(revised budget, actual + remaining commitments) (flag unforecast_budget when the budget is higher); a null cost_to_complete selects actual + remaining commitments explicitly and, like any input, needs approval before WIP reads it. Saving clears any approval; saving on a later date than the carried-forward input adds a new dated input. Frozen forecasts dated on or after the input are superseded (kept, with supersededAt), never deleted; the audit lists their ids. Refused (409) in a soft- or hard-closed job cost period and on or before the latest posted WIP period end for the entity.","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/jobcost/forecast/approve":{"post":{"description":"Requires the accounting:write scope.","operationId":"createCompanyAccountingJobcostForecastApprove","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"as_of":{"format":"date","type":"string"},"cost_code_id":{"minimum":1,"type":"integer"},"entity_id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"revision":{"minimum":1,"type":"integer"}},"required":["project_id","entity_id","as_of","cost_code_id","revision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"approvedAt":{"format":"date-time","type":"string"},"id":{"type":"integer"},"revision":{"type":"integer"}},"required":["id","revision","approvedAt"],"type":"object"}}},"description":"Approved input id, revision and approvedAt; idempotent for an already approved revision"},"403":{"description":"No approval permission, segregation of duties, or read-only workspace"},"404":{"description":"No PM input for that cost code on or before the date"},"409":{"description":"Stale revision or source coverage failure (reload before retrying), the date is in a hard-closed period, or WIP is posted through the date"},"422":{"description":"Invalid input"}},"summary":"Approve the PM input shown for a cost code on the worksheet date (approveJournal permission; the last editor cannot approve). Only approved inputs may feed WIP. Approving the last pending input for the date freezes the forecast there, superseding (not deleting) an earlier freeze on the same date. Refused (409) in a hard-closed period or on or before the latest posted WIP period end; allowed in a soft-closed period, so a month-end approval freezes at the period end.","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/jobcost/scope":{"get":{"description":"Requires the accounting:read scope.","operationId":"listCompanyAccountingJobcostScope","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"description":"Options restricted to the accounting entity grant"}},"summary":"List accessible projects, entities and source assignments","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Requires the accounting:write scope.","operationId":"updateCompanyAccountingJobcostScope","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"A revenue method, a retainage classification, or both.","properties":{"project_id":{"minimum":1,"type":"integer"},"reason":{"maxLength":1000,"minLength":3,"type":"string"},"retainage_conditional":{"description":"Retainage is payable on completion or acceptance, not just time: presented as a contract asset on the WIP row","type":"boolean"},"revenue_method":{"enum":["cost_to_cost","as_invoiced"]}},"required":["project_id","reason"],"type":"object"}}},"required":true},"responses":{"200":{"description":"The assignment with its revenue method"},"403":{"description":"Insufficient permission or entity outside the grant"},"404":{"description":"Project not assigned to an entity"},"422":{"description":"Invalid input"}},"summary":"Set a job's WIP contract terms (manageCoa): revenue method (cost_to_cost, or as_invoiced for T&M / cost-plus jobs: revenue equals billings, ASC 606-10-55-18) and/or whether retainage is conditional (WIP presents it as a contract asset, ASC 606-10-45-3). Audited with the reason.","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Requires the accounting:write scope.","operationId":"createCompanyAccountingJobcostScope","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"confirm_project_sources":{"enum":[true],"type":"boolean"},"currency":{"pattern":"^[A-Z]{3}$","type":"string"},"entity_id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"reason":{"maxLength":1000,"minLength":3,"type":"string"}},"required":["project_id","entity_id","currency","reason","confirm_project_sources"],"type":"object"}}},"required":true},"responses":{"201":{"description":"Immutable entity assignment created and audited"},"403":{"description":"Insufficient permission"},"409":{"description":"Existing assignment, mixed entities or currency mismatch"},"422":{"description":"Invalid input or missing confirmation"}},"summary":"Assign a project's sources to one entity and base currency (unrestricted manageCoa permission)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/jobcost/wip":{"get":{"description":"Requires the accounting:read scope.","operationId":"listCompanyAccountingJobcostWip","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"entity_id","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"period_id","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"status","schema":{"enum":["draft","approved","posted","superseded","rejected"],"type":"string"}},{"description":"1-based page of 100 snapshots","in":"query","name":"page","schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_WipSnapshot"},"type":"array"}}},"description":"Snapshots"},"403":{"description":"No accounting permission for this action, entity outside the grant, or segregation of duties"}},"summary":"List WIP snapshots (newest period end and revision first), 100 per page, filtered by entity, period and status.","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Requires the accounting:write scope.","operationId":"createCompanyAccountingJobcostWip","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"entity_id":{"minimum":1,"type":"integer"},"overrides":{"items":{"additionalProperties":false,"description":"One per project; any of an EAC, uninstalled materials, excluded cost or change orders.","properties":{"change_orders":{"description":"Pending or unpriced prime change orders (PCO ids) included in the transaction price as constrained variable consideration (ASC 606-10-32-11). A CO that is not pending on the job is a compute_failed exception. Stored on the row as variable_consideration.","items":{"additionalProperties":false,"properties":{"change_order_id":{"minimum":1,"type":"integer"},"include_amount":{"description":"Amount included after the constraint; 0 records a full constraint","pattern":"^(0|[1-9][0-9]{0,15})(.[0-9]{1,2})?$","type":"string"},"rationale":{"description":"Why this amount is highly probable not to reverse","maxLength":1000,"minLength":3,"type":"string"}},"required":["change_order_id","include_amount","rationale"],"type":"object"},"maxItems":200,"minItems":1,"type":"array"},"eac":{"description":"Replaces the forecast EAC","pattern":"^(0|[1-9][0-9]{0,15})(.[0-9]{1,2})?$","type":"string"},"excluded_cost":{"description":"Cost in cost to date that does not depict progress (inefficiency, unpriced rework): stays in cost to date, out of the cost-to-cost measure (ASC 606-10-55-21(a)). Cost-to-cost jobs only.","pattern":"^(0|[1-9][0-9]{0,15})(.[0-9]{1,2})?$","type":"string"},"project_id":{"minimum":1,"type":"integer"},"reason":{"maxLength":1000,"minLength":3,"type":"string"},"uninstalled_materials":{"description":"Cost of uninstalled, customer-controlled materials in cost to date; excluded from the measure of progress (ASC 606-10-55-21(b))","pattern":"^(0|[1-9][0-9]{0,15})(.[0-9]{1,2})?$","type":"string"}},"required":["project_id","reason"],"type":"object"},"maxItems":500,"type":"array"},"period_id":{"minimum":1,"type":"integer"}},"required":["entity_id","period_id"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_WipSnapshot"}}},"description":"Draft snapshot"},"403":{"description":"No accounting permission for this action, entity outside the grant, or segregation of duties"},"404":{"description":"Entity or period not found"},"409":{"description":"Job cost or billings were posted through the period end while WIP was computing; compute again"},"422":{"description":"Invalid input (an override needs an EAC, uninstalled materials, excluded cost or change orders, and a reason; one per project), period not ended, or override for a project outside the entity"}},"summary":"Compute the next WIP revision for an entity at an ended period (postJournal and viewLedger). Contract = executed prime SOV + approved prime COs; cost = posted job cost; billed = posted AR; EAC = the forecast frozen at the period end (PM approval or soft close) plus job cost posted since the freeze beyond what the freeze already held on each cost code (only cost on a commitment-linked line consumes the open commitment frozen there; a budget_remaining code rises to max(frozen EAC, actual + commitment left)), else the approved live forecast, unless overridden with a reason. Each job uses its revenue method (cost_to_cost or as_invoiced); pending prime COs are the memo column (pendingChangeOrders) and enter the transaction price only through overrides[].change_orders; retainage receivable comes from AR (retainageContractAsset when the job's retainage is conditional); each row records settings.loss_provision_unit; cash position is AR receipts less AP payments on the job (payroll and other direct cash costs are not included). A job whose inputs fail is a compute_failed exception, and an executed contract with no value against a positive EAC a contract_value_missing exception (not on completed_contract jobs; the other jobs still compute); both block approval. Rows are read without the company posting lock; the insert refuses with 409 if job cost or billings were posted, or job forecast inputs changed, meanwhile. Supports Idempotency-Key.","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/jobcost/wip/{id}":{"get":{"description":"Requires the accounting:read scope.","operationId":"getCompanyAccountingJobcostWip","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"format","schema":{"enum":["json","csv"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_WipSnapshot"}},"text/csv":{"schema":{"type":"string"}}},"description":"The snapshot"},"403":{"description":"No accounting permission for this action, entity outside the grant, or segregation of duties"},"404":{"description":"Snapshot not found in this company or entity scope"}},"summary":"Get a WIP snapshot with its job rows; format=csv returns the rows as CSV","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/jobcost/wip/{id}/approve":{"post":{"description":"Requires the accounting:write scope.","operationId":"approveCompanyAccountingJobcostWip","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"exceptions_note":{"description":"Acknowledges the jobs listed in exceptions","maxLength":1000,"minLength":3,"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_WipSnapshot"}}},"description":"The snapshot"},"403":{"description":"No accounting permission for this action, entity outside the grant, or segregation of duties"},"404":{"description":"Snapshot not found in this company or entity scope"},"409":{"description":"Stale: job cost or billings were posted through the period end after the snapshot was computed; a job could not compute (compute_failed: fix it or override it, then compute a new revision); or exceptions need an exceptions_note"},"422":{"description":"The snapshot was rejected"}},"summary":"Approve a draft snapshot (approveJournal; the preparer cannot approve). A snapshot with exceptions needs exceptions_note; compute_failed exceptions cannot be acknowledged. Idempotent; a rejected snapshot is refused.","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/jobcost/wip/{id}/attachments":{"get":{"description":"Oldest first. Needs view_ledger and the parent's entity scope. Requires the accounting:read scope.","operationId":"listCompanyAccountingJobcostWipAttachments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctAttachment"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"List attachments on a WIP snapshot","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Multipart upload (one `file` part, allow-listed type, up to MAX_UPLOAD_BYTES). Allowed after posting: attachments are not ledger data. Writes an attachment_added audit event on the parent in the same transaction. Needs post_journal and the parent's entity scope. Requires the accounting:write scope.","operationId":"createCompanyAccountingJobcostWipAttachment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctAttachment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused for a different request or still in progress"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Request body too large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing file, empty file, too large, or a type that is not allowed"}},"summary":"Attach a file to a WIP snapshot","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/jobcost/wip/{id}/post":{"post":{"description":"Requires the accounting:write scope.","operationId":"postCompanyAccountingJobcostWip","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_WipSnapshot"}}},"description":"The snapshot"},"403":{"description":"No accounting permission for this action, entity outside the grant, or segregation of duties"},"404":{"description":"Snapshot not found in this company or entity scope"},"409":{"description":"A later revision exists for the period, or the snapshot is stale (job cost or billings posted through the period end after compute)"},"422":{"description":"Snapshot not approved, a WIP system account is missing, or the period is closed"}},"summary":"Post an approved snapshot on journal WIP at the period end with autoReverseDate the next day; idempotent on (snapshot, revision). Supersedes an earlier posted revision for the period.","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/jobcost/wip/{id}/reject":{"post":{"description":"Requires the accounting:write scope.","operationId":"rejectCompanyAccountingJobcostWip","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"reason":{"maxLength":1000,"minLength":3,"type":"string"},"return_to_draft":{"default":false,"type":"boolean"}},"required":["reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_WipSnapshot"}}},"description":"The snapshot"},"403":{"description":"No accounting permission for this action, entity outside the grant, or segregation of duties"},"404":{"description":"Snapshot not found in this company or entity scope"},"422":{"description":"Invalid input, or the snapshot is not in a state that allows it (posted, superseded or already rejected)"}},"summary":"Reject a draft or approved snapshot (approveJournal; terminal, compute a new revision), or with return_to_draft send an approved one back to draft (approval and acknowledgment cleared). Audited with the reason.","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/journal_entries":{"get":{"description":"Journal entries newest first. Filter with `filters[status]`, `filters[journal]`, `filters[source_type]`, `filters[entity_id]`, `filters[period_id]`, `filters[account_id]`, `filters[project_id]`, a `from`/`to` posting-date range, or `search` (number or memo). Requires the accounting:read scope.","operationId":"listCompanyAccountingJournalEntries","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"draft, pending_approval, posted, reversed","in":"query","name":"filters[status]","schema":{"type":"string"}},{"description":"GJ, AP, AR, PR, CM, JC, FA, CL, IC, WIP","in":"query","name":"filters[journal]","schema":{"type":"string"}},{"description":"e.g. manual, recurring, reversal","in":"query","name":"filters[source_type]","schema":{"type":"string"}},{"description":"Entity ids","in":"query","name":"filters[entity_id]","schema":{"type":"string"}},{"description":"Period ids","in":"query","name":"filters[period_id]","schema":{"type":"string"}},{"description":"Entries with a line on these accounts","in":"query","name":"filters[account_id]","schema":{"type":"string"}},{"description":"Entries with a line on these projects","in":"query","name":"filters[project_id]","schema":{"type":"string"}},{"description":"Posting date on or after","in":"query","name":"from","schema":{"format":"date","type":"string"}},{"description":"Posting date on or before","in":"query","name":"to","schema":{"format":"date","type":"string"}},{"description":"Number or memo","in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Delta sync: only rows created or changed at or after this time (ISO 8601 with offset). Switches the list to ascending (updated_at, id) order; page is ignored and Next-Cursor continues it. Re-read with a small overlap (a few seconds) and dedupe by id.","in":"query","name":"updated_since","schema":{"format":"date-time","type":"string"}},{"description":"Opaque keyset cursor from a previous response's Next-Cursor header; each page costs the same however deep it is.","in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_JournalEntry"},"type":"array"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Next-Cursor":{"description":"Delta sync only: cursor for the next page, present while a full page came back","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown filter value"}},"summary":"List journal entries","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Saves a manual entry as a draft. Each line has either a debit or a credit (never both), and may carry dimensions (project, cost code, cost type, vendor, customer, department, ...). Drafts may be unbalanced; balance, open period, account and dimension rules are enforced at submit and post. Control accounts (AP, AR, retainage) post only from their subledgers. Needs post_journal. Requires the accounting:write scope.","operationId":"createCompanyAccountingJournalEntry","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"journal_entry":{"properties":{"adjusting":{"description":"Post into the fiscal year's adjusting period (period 13): posting_date must be the fiscal year's last day, the year must have period 13 (POST .../fiscal_years/{id}/adjusting_period), the entry cannot be intercompany, and posting needs close_period. Exempt from later closed periods; in a year-end closed year the post re-closes the year's earnings with a new year_end_close revision in period 13.","type":"boolean"},"auto_reverse":{"description":"true: auto-reverse on the first day of the next period (the accrual default); false clears it. Overrides auto_reverse_date.","type":"boolean"},"auto_reverse_date":{"format":"date","type":["string","null"]},"auto_reverse_reason":{"description":"Required (422 auto_reverse_reason_required) for an auto_reverse_date other than the first day of the next period, unless the preparer holds close_period; recorded in the audit trail.","type":["string","null"]},"document_date":{"format":"date","type":["string","null"]},"entity_id":{"minimum":1,"type":["integer","null"]},"intercompany":{"description":"Post in the IC journal; lines in other entities get generated due-to/due-from lines from each entity intercompany account map (422 when an entity has no map).","type":"boolean"},"lines":{"items":{"properties":{"account_id":{"minimum":1,"type":"integer"},"billable":{"type":"boolean"},"cost_code_id":{"minimum":1,"type":["integer","null"]},"cost_type_id":{"minimum":1,"type":["integer","null"]},"counterparty_entity_id":{"description":"Intercompany lines: the other entity (must differ from the line's entity).","minimum":1,"type":["integer","null"]},"credit":{"description":"Non-negative amount, at most 2 dp; a string is preferred","oneOf":[{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},{"type":"number"}]},"customer_id":{"minimum":1,"type":["integer","null"]},"debit":{"description":"Non-negative amount, at most 2 dp; a string is preferred","oneOf":[{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},{"type":"number"}]},"department_id":{"minimum":1,"type":["integer","null"]},"dimension_value_ids":{"description":"Custom dimension values (dimension value ids of this company).","items":{"minimum":1,"type":"integer"},"maxItems":20,"type":["array","null"]},"employee_id":{"minimum":1,"type":["integer","null"]},"entity_id":{"minimum":1,"type":["integer","null"]},"equipment_id":{"minimum":1,"type":["integer","null"]},"memo":{"type":["string","null"]},"project_id":{"minimum":1,"type":["integer","null"]},"quantity":{"pattern":"^(-?\\d{1,12}(\\.\\d{1,6})?)?$","type":["string","null"]},"unit":{"type":["string","null"]},"vendor_id":{"minimum":1,"type":["integer","null"]}},"required":["account_id"],"type":"object"},"minItems":2,"type":"array"},"memo":{"type":["string","null"]},"noncash":{"description":"ASC 230-10-50-3 noncash investing or financing transaction (e.g. equipment bought with a note): left out of the cash flow statement and listed in its noncash schedule. Refused (422) when a line is on a bank or cash account; a reversal inherits it.","type":"boolean"},"posting_date":{"format":"date","type":"string"}},"required":["posting_date","lines"],"type":"object"}},"required":["journal_entry"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_JournalEntryShow"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict, including an Idempotency-Key reused for a different request or still in progress"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Create a draft journal entry","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/journal_entries/{id}":{"delete":{"description":"Removes a draft or pending entry. Posted entries cannot be deleted; reverse them. Needs post_journal. Requires the accounting:write scope.","operationId":"deleteCompanyAccountingJournalEntry","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Delete a draft journal entry","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"get":{"description":"Header, lines with account numbers, totals and a balanced flag. Requires the accounting:read scope.","operationId":"getCompanyAccountingJournalEntry","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_JournalEntryShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a journal entry","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Edits a draft or pending entry; `lines` replaces every line. Any edit returns a pending entry to draft and clears its approval. Posted entries are immutable. Needs post_journal. Requires the accounting:write scope.","operationId":"updateCompanyAccountingJournalEntry","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"journal_entry":{"properties":{"adjusting":{"description":"Post into the fiscal year's adjusting period (period 13): posting_date must be the fiscal year's last day, the year must have period 13 (POST .../fiscal_years/{id}/adjusting_period), the entry cannot be intercompany, and posting needs close_period. Exempt from later closed periods; in a year-end closed year the post re-closes the year's earnings with a new year_end_close revision in period 13.","type":"boolean"},"auto_reverse":{"description":"true: auto-reverse on the first day of the next period (the accrual default); false clears it. Overrides auto_reverse_date.","type":"boolean"},"auto_reverse_date":{"format":"date","type":["string","null"]},"auto_reverse_reason":{"description":"Required (422 auto_reverse_reason_required) for an auto_reverse_date other than the first day of the next period, unless the preparer holds close_period; recorded in the audit trail.","type":["string","null"]},"document_date":{"format":"date","type":["string","null"]},"entity_id":{"minimum":1,"type":["integer","null"]},"intercompany":{"description":"Post in the IC journal; lines in other entities get generated due-to/due-from lines from each entity intercompany account map (422 when an entity has no map).","type":"boolean"},"lines":{"items":{"properties":{"account_id":{"minimum":1,"type":"integer"},"billable":{"type":"boolean"},"cost_code_id":{"minimum":1,"type":["integer","null"]},"cost_type_id":{"minimum":1,"type":["integer","null"]},"counterparty_entity_id":{"description":"Intercompany lines: the other entity (must differ from the line's entity).","minimum":1,"type":["integer","null"]},"credit":{"description":"Non-negative amount, at most 2 dp; a string is preferred","oneOf":[{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},{"type":"number"}]},"customer_id":{"minimum":1,"type":["integer","null"]},"debit":{"description":"Non-negative amount, at most 2 dp; a string is preferred","oneOf":[{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},{"type":"number"}]},"department_id":{"minimum":1,"type":["integer","null"]},"dimension_value_ids":{"description":"Custom dimension values (dimension value ids of this company).","items":{"minimum":1,"type":"integer"},"maxItems":20,"type":["array","null"]},"employee_id":{"minimum":1,"type":["integer","null"]},"entity_id":{"minimum":1,"type":["integer","null"]},"equipment_id":{"minimum":1,"type":["integer","null"]},"memo":{"type":["string","null"]},"project_id":{"minimum":1,"type":["integer","null"]},"quantity":{"pattern":"^(-?\\d{1,12}(\\.\\d{1,6})?)?$","type":["string","null"]},"unit":{"type":["string","null"]},"vendor_id":{"minimum":1,"type":["integer","null"]}},"required":["account_id"],"type":"object"},"minItems":2,"type":"array"},"memo":{"type":["string","null"]},"noncash":{"description":"ASC 230-10-50-3 noncash investing or financing transaction (e.g. equipment bought with a note): left out of the cash flow statement and listed in its noncash schedule. Refused (422) when a line is on a bank or cash account; a reversal inherits it.","type":"boolean"},"posting_date":{"format":"date","type":"string"}},"type":"object"}},"required":["journal_entry"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_JournalEntryShow"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Update a draft journal entry","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/journal_entries/{id}/approve":{"post":{"description":"Records one approval on a pending entry's route. Submit resolves the route from the lowest-priority active journal_entry approval rule matching the entry (amount, entities, projects; N-of-M groups); with none, one approve_journal user approves. Delegates may act within an active delegation. The vote that completes the route stamps approved_by_id, which posting needs at or above the approval threshold. Segregation of duties: a user who prepared or edited the entry can't approve it (403); one vote per user (409 already_approved); a caller not on the current step gets 403 approver_role_required. In small-team SoD mode (settings sod_mode) a maker may approve their own document by sending approve.reason; the event is audited as self_approved and listed by approvals/self_approved. Needs approve_journal. Requires the accounting:write scope.","operationId":"approveCompanyAccountingJournalEntry","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"approve":{"additionalProperties":false,"properties":{"reason":{"description":"Required only to approve your own document in small-team SoD mode (422 self_approval_reason_required); the approval is flagged self_approved.","maxLength":500,"minLength":3,"type":"string"}},"type":"object"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_JournalEntryShow"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict (already approved)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Approve a journal entry","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/journal_entries/{id}/attachments":{"get":{"description":"Oldest first. Needs view_ledger and the parent's entity scope. Requires the accounting:read scope.","operationId":"listCompanyAccountingJournalEntryAttachments","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_AcctAttachment"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"List attachments on a journal entry","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Multipart upload (one `file` part, allow-listed type, up to MAX_UPLOAD_BYTES). Allowed after posting: attachments are not ledger data. Writes an attachment_added audit event on the parent in the same transaction. Needs post_journal and the parent's entity scope. Requires the accounting:write scope.","operationId":"createCompanyAccountingJournalEntryAttachment","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctAttachment"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, outside the parent record's entity scope, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Idempotency-Key reused for a different request or still in progress"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Request body too large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing file, empty file, too large, or a type that is not allowed"}},"summary":"Attach a file to a journal entry","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/journal_entries/{id}/post":{"post":{"description":"Posts a draft or pending entry to the ledger and assigns its JE-YYYY-##### number. Entries at or above the settings approval threshold must be approved by a second person first. An entry routed by a journal_entry approval rule must complete that route first, whatever the threshold (422). Writes job cost rows for job-cost lines, an audit record in the same transaction, and emits `accounting.journal_entry.posted` (ids and links only). Needs post_journal. Requires the accounting:write scope. An unapproved entry is refused (422) at or above the approval threshold, and also below it when an active journal_entry approval rule matches the entry as it stands at post time (a draft never submitted, or edited after a reject, must be submitted and approved first). An approval any of whose voters (each approved route step, or the final approver) has since lost approve_journal (or the entities on the lines) no longer counts: the entry is treated as unapproved and the approval is cleared. Allocation run and year-end close entries also need close_period.","operationId":"postCompanyAccountingJournalEntry","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_JournalEntryShow"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Post a journal entry","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/journal_entries/{id}/reject":{"post":{"description":"Needs approve_journal and every line's entity. A pending_approval entry returns to draft; its approval route is spent, so resubmission routes afresh. The reason is required and audited (action rejected). Requires the accounting:write scope.","operationId":"rejectCompanyAccountingJournalEntry","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reject":{"additionalProperties":false,"properties":{"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}},"required":["reject"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_JournalEntryShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed"}},"summary":"Reject a journal entry (return to the preparer)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/journal_entries/{id}/reverse":{"post":{"description":"Posts a mirror entry (debits and credits swapped) on `date`, links the two both ways and marks the original reversed. Repeating the call returns the same reversal. Entries from a subledger document reverse through that document instead. At or above the approval threshold, or when an active journal_entry approval rule matches the original (amount, entities, projects, vendor risk) at any amount, the reverser must hold approve_journal and not be one of its authors (403); under a rule they also fill the rule's route as its approver (403 approver_role_required when no slot fits), and a route needing more than one approval is refused (422): enter the reversing entry as a journal entry and submit it. Needs post_journal. Emits `accounting.journal_entry.reversed`. Requires the accounting:write scope.","operationId":"reverseCompanyAccountingJournalEntry","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reversal":{"properties":{"date":{"format":"date","type":"string"},"reason":{"maxLength":500,"type":["string","null"]}},"required":["date"],"type":"object"}},"required":["reversal"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_JournalEntryShow"}}},"description":"The reversing entry"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Reverse a posted journal entry","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/journal_entries/{id}/submit":{"post":{"description":"Validates the draft in full (balanced per entity, postable active accounts, required dimensions, open period) and moves it to pending_approval. An intercompany entry (journal IC) gets its generated due-to/due-from lines stored now (line source_type `intercompany`, total updated), so approvers see the entry as it will post; editing the draft drops them and the next submit regenerates them. Needs post_journal. Requires the accounting:write scope.","operationId":"submitCompanyAccountingJournalEntry","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_JournalEntryShow"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Submit a journal entry for approval","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/leases":{"get":{"description":"The ASC 842 lessee lease register with each lease's commencement liability and ROU. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingLeases","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Page size","in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Lease"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List leases","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Adds a lessee lease (LS-#### numbering) and, unless it is a short-term election, posts the commencement entry Dr right-of-use asset / Cr lease liability at the present value of the payments (annual rate / 12, monthly). Accounts default to 1841/1842 ROU, 2741/2742 and 2535/2536 liabilities, 6200 (operating and short-term) or 6710 (finance amortization) cost, 8100 interest and 2130 payments. Terms are locked once added. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingLease","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"lease":{"additionalProperties":false,"properties":{"asset_class":{"maxLength":80,"type":"string"},"classification":{"enum":["operating","finance"],"type":"string"},"commencement_date":{"description":"First day of a month.","format":"date","type":"string"},"cost_account_id":{"minimum":1,"type":["integer","null"]},"current_liability_account_id":{"minimum":1,"type":["integer","null"]},"discount_rate":{"description":"Percent, at most six decimals, under 100","type":"string"},"entity_id":{"minimum":1,"type":["integer","null"]},"escalation_pct":{"description":"Percent, at most six decimals, under 100","type":"string"},"incentives":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"initial_direct_costs":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"interest_account_id":{"minimum":1,"type":["integer","null"]},"lessor":{"type":["string","null"]},"liability_account_id":{"minimum":1,"type":["integer","null"]},"name":{"maxLength":200,"type":"string"},"payment":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"payment_account_id":{"minimum":1,"type":["integer","null"]},"payment_timing":{"enum":["advance","arrears"],"type":"string"},"purchase_option_price":{"description":"Must be 0: a purchase option reasonably certain to be exercised is refused (operating leases must be classified finance under ASC 842-10-25-2(b); useful-life amortization for finance leases is not built).","pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"rate_convention":{"description":"Monthly rate from the annual discount rate: nominal = annual / 12 (default), effective = (1 + annual)^(1/12) - 1.","enum":["nominal","effective"],"type":"string"},"rate_source":{"enum":["implicit","incremental_borrowing","risk_free"],"type":"string"},"rou_account_id":{"minimum":1,"type":["integer","null"]},"short_term":{"description":"Short-term election: term of 12 months or less with no purchase option reasonably certain to be exercised; expense only.","type":"boolean"},"term_months":{"maximum":600,"minimum":1,"type":"integer"}},"required":["name","asset_class","classification","commencement_date","term_months","payment","discount_rate"],"type":"object"}},"required":["lease"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_LeaseShow"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict, including an Idempotency-Key reused for a different request or still in progress"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Add a lease","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/leases/disclosures":{"get":{"description":"ASC 842-20-50 lessee disclosures from the lease schedules: lease cost by type, cash paid (operating vs financing), ROU assets obtained for new lease liabilities (noncash), and at `to` the balances, weighted average remaining term and discount rate, and the maturity analysis (years 1-5, thereafter, less imputed interest, which equals the liability). Payments count as paid when due. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingLeasesDisclosures","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Start date (default: January 1 of the year of `to`)","in":"query","name":"from","schema":{"format":"date","type":"string"}},{"description":"End date (default: today)","in":"query","name":"to","schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_LeaseDisclosures"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Lease disclosures","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/leases/runs":{"get":{"description":"Posted monthly lease runs, newest first. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingLeasesRuns","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Page size","in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_LeaseRun"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List lease runs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"With `preview: true` returns what the run would post (200). Otherwise posts one entry for the calendar-month period (201): per lease, the schedule to date minus what its lines already hold (catch-up), covering lease cost, interest, ROU amortization, payments and the current/noncurrent reclass. Refused when nothing is due, when a later lease entry exists, or when the period is closed. Needs post_journal to post. Audited. The accounting:read scope is enough for a preview. Requires the accounting:write scope. A project-scoped (project_manager_view) grant gets 403, preview included.","operationId":"createCompanyAccountingLeasesRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"lease_run":{"additionalProperties":false,"properties":{"period_id":{"minimum":1,"type":"integer"},"preview":{"type":"boolean"}},"required":["period_id"],"type":"object"}},"required":["lease_run"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_LeaseRunPreview"}}},"description":"Preview"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_LeaseRunShow"}}},"description":"Posted"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Period not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Preview or post a lease run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/leases/runs/{id}":{"get":{"description":"The run with its journal lines. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"getCompanyAccountingLeasesRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_LeaseRunShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a lease run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/leases/runs/{id}/reverse":{"post":{"description":"Posts the mirror entry on `date` and marks the run's entry reversed; the next run catches the leases up again. Idempotent for the same date and reason. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"reverseCompanyAccountingLeasesRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reversal":{"properties":{"date":{"format":"date","type":"string"},"reason":{"type":["string","null"]}},"required":["date"],"type":"object"}},"required":["reversal"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_LeaseRunShow"}}},"description":"Reversed"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already reversed with a different date or reason"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Reverse a lease run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/leases/{id}":{"get":{"description":"The lease with its monthly schedule (liability, interest, principal, current portion, lease cost, ROU) and the GL lines that carry it. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"getCompanyAccountingLease","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Schedule version: 0 = the original schedule, k = after the k-th remeasurement. Default: the schedule in force.","in":"query","name":"version","schema":{"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_LeaseShow"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"version is not a whole number"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No such schedule version"}},"summary":"Show a lease","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/leases/{id}/modifications":{"get":{"description":"The lease's modifications, oldest first. Append-only history: each remeasurement creates a schedule version. Requires the accounting:read scope. A project-scoped grant gets 403.","operationId":"listCompanyAccountingLeaseModifications","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_LeaseModification"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"List lease modifications","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Records an audited modification effective on the first day of a month. term_change, payment_change and partial_termination remeasure the liability at the revised discount_rate (required) as the PV of the revised remaining payments, adjust the ROU asset, recognize a gain or loss on a partial termination (f x ROU vs f x liability) or on a decrease beyond the ROU carrying amount, post one noncash entry on the effective date, and re-run the schedule from that month (earlier months unchanged: a new schedule version). separate_contract records the added right of use as a new lease (separate_lease) and leaves this one unchanged. Refused for a voided (409) or short-term lease, out of order, or while lease lines are posted on or after the effective date (422). preview: true returns the remeasurement, entry lines and revised schedule without posting (200). Lease terms themselves are locked: this is the only way to change them. Needs post_journal (preview: view). Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingLeaseModification","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"modification":{"properties":{"discount_rate":{"description":"Revised annual discount rate at the effective date (required for a remeasurement).","type":"string"},"effective_date":{"format":"date","type":"string"},"escalation_pct":{"type":"string"},"gain_loss_account_id":{"type":["integer","null"]},"kind":{"enum":["term_change","payment_change","partial_termination","separate_contract"],"type":"string"},"payment":{"description":"Payment due in the effective month (default: the scheduled payment).","type":"string"},"preview":{"type":"boolean"},"rate_convention":{"enum":["nominal","effective"],"type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"},"separate_lease":{"additionalProperties":false,"properties":{"asset_class":{"maxLength":80,"type":"string"},"classification":{"enum":["operating","finance"],"type":"string"},"cost_account_id":{"minimum":1,"type":["integer","null"]},"current_liability_account_id":{"minimum":1,"type":["integer","null"]},"discount_rate":{"description":"Percent, at most six decimals, under 100","type":"string"},"escalation_pct":{"description":"Percent, at most six decimals, under 100","type":"string"},"incentives":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"initial_direct_costs":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"interest_account_id":{"minimum":1,"type":["integer","null"]},"lessor":{"type":["string","null"]},"liability_account_id":{"minimum":1,"type":["integer","null"]},"name":{"maxLength":200,"type":"string"},"payment":{"pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"payment_account_id":{"minimum":1,"type":["integer","null"]},"payment_timing":{"enum":["advance","arrears"],"type":"string"},"purchase_option_price":{"description":"Must be 0: a purchase option reasonably certain to be exercised is refused (operating leases must be classified finance under ASC 842-10-25-2(b); useful-life amortization for finance leases is not built).","pattern":"^\\d{1,16}(\\.\\d{1,2})?$","type":"string"},"rate_convention":{"description":"Monthly rate from the annual discount rate: nominal = annual / 12 (default), effective = (1 + annual)^(1/12) - 1.","enum":["nominal","effective"],"type":"string"},"rate_source":{"enum":["implicit","incremental_borrowing","risk_free"],"type":"string"},"rou_account_id":{"minimum":1,"type":["integer","null"]},"short_term":{"description":"Short-term election: term of 12 months or less with no purchase option reasonably certain to be exercised; expense only.","type":"boolean"},"term_months":{"maximum":600,"minimum":1,"type":"integer"}},"required":["name","asset_class","term_months","payment","discount_rate"],"type":"object"},"term_months":{"description":"Revised lease term counted from commencement.","maximum":600,"minimum":1,"type":"integer"},"terminated_fraction":{"description":"partial_termination: share of the right of use given up, above 0 and below 1.","type":"string"}},"required":["kind","effective_date","reason"],"type":"object"}},"required":["modification"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"lines":{"items":{"$ref":"#/components/schemas/accounting_PreviewLine"},"type":"array"},"preview":{"type":"boolean"},"remeasurement":{"oneOf":[{"$ref":"#/components/schemas/accounting_LeaseRemeasurement"},{"type":"null"}]},"schedule":{"items":{"type":"object"},"type":"array"}},"required":["preview","remeasurement","lines","schedule"],"type":"object"}}},"description":"Preview (nothing posted)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_LeaseModificationResult"}}},"description":"Recorded: the lease with its new schedule version"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The lease is voided"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, out of order, later lease lines posted, or the ledger refused the entry (closed period)"}},"summary":"Modify a lease (ASC 842 remeasurement)","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/leases/{id}/void":{"post":{"description":"For a lease entered by mistake: reverses its commencement entry and posts one entry negating every other line the lease carries, on `date`. Runs, the daily job and the disclosures skip a voided lease. Idempotent for the same date and reason. Needs post_journal. Audited. Requires the accounting:write scope.","operationId":"voidCompanyAccountingLease","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"void":{"properties":{"date":{"format":"date","type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["date","reason"],"type":"object"}},"required":["void"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_LeaseShow"}}},"description":"Voided"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already voided with a different date or reason"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Void a lease","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/lifecycle/exports":{"get":{"description":"List is capped to the latest 50 requests; extract contents have no row cap.","operationId":"listCompanyAccountingLifecycleExports","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ExportSummary"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication/MFA/step-up required"},"403":{"description":"Wrong tenant, insufficient token scope or unrestricted owner/super-admin access required"},"404":{"description":"Not found"},"409":{"description":"Proof stale/incomplete, retention hold, offboarded company, or unsupported schema"},"422":{"description":"Invalid request or explicit confirmation"}},"summary":"Latest 50 full export requests; accounting:read and unrestricted owner plus step-up","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Supports Idempotency-Key; retries with the same key replay the original result.","operationId":"createCompanyAccountingLifecycleExport","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ExportSummary"}}},"description":"Success"},"401":{"description":"Authentication/MFA/step-up required"},"403":{"description":"Wrong tenant, insufficient token scope or unrestricted owner/super-admin access required"},"404":{"description":"Not found"},"409":{"description":"Proof stale/incomplete, retention hold, offboarded company, or unsupported schema"},"422":{"description":"Invalid request or explicit confirmation"}},"summary":"Queue full extract; accounting:write and unrestricted owner plus step-up","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/lifecycle/exports/{id}":{"get":{"description":"Requires accounting:read token scope.","operationId":"getCompanyAccountingLifecycleExport","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ExportDetail"}}},"description":"Success"},"401":{"description":"Authentication/MFA/step-up required"},"403":{"description":"Wrong tenant, insufficient token scope or unrestricted owner/super-admin access required"},"404":{"description":"Not found"},"409":{"description":"Proof stale/incomplete, retention hold, offboarded company, or unsupported schema"},"422":{"description":"Invalid request or explicit confirmation"}},"summary":"Export status, checksummed manifest and user-bound 15-minute download link","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/lifecycle/exports/{id}/download":{"get":{"description":"Requires accounting:read token scope.","operationId":"listCompanyAccountingLifecycleExportDownload","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"expires","required":true,"schema":{"type":"integer"}},{"in":"query","name":"signature","required":true,"schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"ZIP64 containing CSV files and manifest.json","headers":{"Cache-Control":{"schema":{"const":"private, no-store"}},"X-Checksum-Sha256":{"schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}}}},"401":{"description":"Authentication or step-up required"},"403":{"description":"Expired, altered or wrong-user signature/access revoked"},"404":{"description":"Artifact missing"}},"summary":"Stream signed ZIP64 archive; rechecks current owner access, MFA/step-up and authenticated recipient","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/lifecycle/holds":{"post":{"description":"Requires accounting:write token scope. Supports Idempotency-Key; retries with the same key replay the original result.","operationId":"createCompanyAccountingLifecycleHold","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"retention_hold":{"$ref":"#/components/schemas/accounting_RetentionHold"}},"required":["retention_hold"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"}},"required":["id"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication/MFA/step-up required"},"403":{"description":"Wrong tenant, insufficient token scope or unrestricted owner/super-admin access required"},"404":{"description":"Not found"},"409":{"description":"Proof stale/incomplete, retention hold, offboarded company, or unsupported schema"},"422":{"description":"Invalid request or explicit confirmation"}},"summary":"Record an outstanding filing or legal hold for employee/vendor","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/lifecycle/holds/{id}":{"delete":{"description":"Requires accounting:write token scope.","operationId":"deleteCompanyAccountingLifecycleHold","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"}},"required":["id"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication/MFA/step-up required"},"403":{"description":"Wrong tenant, insufficient token scope or unrestricted owner/super-admin access required"},"404":{"description":"Not found"},"409":{"description":"Proof stale/incomplete, retention hold, offboarded company, or unsupported schema"},"422":{"description":"Invalid request or explicit confirmation"}},"summary":"Release an explicit retention hold with owner step-up","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/lifecycle/offboarding":{"get":{"description":"Requires accounting:read token scope.","operationId":"listCompanyAccountingLifecycleOffboarding","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"certificate":{"anyOf":[{"$ref":"#/components/schemas/accounting_Certificate"},{"type":"null"}]}},"required":["certificate"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication/MFA/step-up required"},"403":{"description":"Wrong tenant, insufficient token scope or unrestricted owner/super-admin access required"},"404":{"description":"Not found"},"409":{"description":"Proof stale/incomplete, retention hold, offboarded company, or unsupported schema"},"422":{"description":"Invalid request or explicit confirmation"}},"summary":"Super-admin retrieves retained offboarding certificate","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Requires accounting:write token scope.","operationId":"createCompanyAccountingLifecycleOffboarding","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"offboarding":{"$ref":"#/components/schemas/accounting_Offboarding"}},"required":["offboarding"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"certificate":{"$ref":"#/components/schemas/accounting_Certificate"}},"required":["certificate"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication/MFA/step-up required"},"403":{"description":"Wrong tenant, insufficient token scope or unrestricted owner/super-admin access required"},"404":{"description":"Not found"},"409":{"description":"Proof stale/incomplete, retention hold, offboarded company, or unsupported schema"},"422":{"description":"Invalid request or explicit confirmation"}},"summary":"Super-admin irreversibly deletes tenant accounting after durable/fresh export verification","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/lifecycle/retention":{"get":{"description":"The approved employee SSN (employee_days) and vendor TIN (vendor_days) retention periods from the retention register (null when none is approved) and the company legal hold flag. Requires accounting:read.","operationId":"listCompanyAccountingLifecycleRetention","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RetentionState"}}},"description":"Success"},"401":{"description":"Authentication/MFA/step-up required"},"403":{"description":"Wrong tenant, insufficient token scope or unrestricted owner/super-admin access required"},"404":{"description":"Not found"},"409":{"description":"Proof stale/incomplete, retention hold, offboarded company, or unsupported schema"},"422":{"description":"Invalid request or explicit confirmation"}},"summary":"Explicit policy or disabled defaults","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"legal_hold applies at once (a company-wide hold blocks every retention purge). A non-null employee_days or vendor_days different from the approved period files maker-checker change requests in the retention register (employee_ssn and employee_bank, or vendor_tin and vendor_bank) that another unrestricted owner must approve; a period below a class's hard floor (1461 days for SSN/TIN, 730 for bank details) is 422. Unrestricted owner, view_payroll_pii and step-up. Requires accounting:write.","operationId":"replaceCompanyAccountingLifecycleRetention","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"retention_policy":{"$ref":"#/components/schemas/accounting_RetentionPolicy"}},"required":["retention_policy"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RetentionPolicyResult"}}},"description":"Success"},"401":{"description":"Authentication/MFA/step-up required"},"403":{"description":"Wrong tenant, insufficient token scope or unrestricted owner/super-admin access required"},"404":{"description":"Not found"},"409":{"description":"Proof stale/incomplete, retention hold, offboarded company, or unsupported schema"},"422":{"description":"Invalid request or explicit confirmation"}},"summary":"Set the company legal hold flag; request subject retention periods through the register","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/party_profiles":{"get":{"description":"Accounting profiles of company vendors and customers: 1099 settings, W-9 status, terms, remit-to, payment method, retainage, compliance hold and credit limit. Tax ids and bank numbers are always masked. Filter with `filters[role]` (vendor or customer) or `search` by vendor name. Delta sync: updated_since and/or cursor return changes in ascending (updated_at, id) order with Next-Cursor. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingPartyProfiles","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Vendors or customers","in":"query","name":"filters[role]","schema":{"enum":["vendor","customer"]}},{"description":"Vendor name","in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Delta sync: only rows created or changed at or after this time (ISO 8601 with offset). Switches the list to ascending (updated_at, id) order; page is ignored and Next-Cursor continues it. Re-read with a small overlap (a few seconds) and dedupe by id.","in":"query","name":"updated_since","schema":{"format":"date-time","type":"string"}},{"description":"Opaque keyset cursor from a previous response's Next-Cursor header; each page costs the same however deep it is.","in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_PartyProfile"},"type":"array"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Next-Cursor":{"description":"Delta sync only: cursor for the next page, present while a full page came back","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List party profiles","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Creates a party profile. Changed W-9 status/date, tax classification, 1099 flag/form/box and clearing a compliance hold need (ap_approve AND release_payments) OR manage_vendor_banking, including configured MFA checks. Unchanged fields and safe create defaults need no sensitive permission. AR-only users may edit customer role, billing/contact, credit limit and terms, never vendor-only fields. Customer-only creates must explicitly set is_vendor=false (the server default is true). Bank account ownership still needs manage_vendor_banking. Remit-to and payment_method changes, including non-default create values, require a reason and step-up and become pending_sensitive_change alongside bank/TIN proposals. Effective routing stays unchanged until a different manage_vendor_banking user approves the reviewed change_hash. Any new proposal replaces the entire pending change; stale hashes and self-approval are refused. Approval arms the existing non-overridable payment cool-off. Authorization and step-up run before Idempotency-Key replay as well as inside the mutation. Requires accounting:write.","operationId":"createCompanyAccountingPartyProfile","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"party_profile":{"properties":{"bank_account_number":{"pattern":"^\\d{4,17}$","type":["string","null"]},"bank_account_ownership":{"description":"Needs manage_vendor_banking.","enum":["business","consumer",null],"type":["string","null"]},"bank_account_type":{"type":["string","null"]},"bank_routing_number":{"pattern":"^\\d{9}$","type":["string","null"]},"billing_address":{"maxLength":500,"type":["string","null"]},"billing_contact_name":{"maxLength":200,"type":["string","null"]},"billing_email":{"format":"email","maxLength":320,"type":["string","null"]},"compliance_hold":{"type":"boolean"},"compliance_hold_reason":{"type":["string","null"]},"credit_limit":{"type":["string","null"]},"default_expense_account_id":{"minimum":1,"type":["integer","null"]},"form_1099_box":{"type":["string","null"]},"form_1099_type":{"type":["string","null"]},"is_1099":{"type":"boolean"},"is_customer":{"type":"boolean"},"is_vendor":{"type":"boolean"},"payment_method":{"enum":["check","ach","wire","card"]},"reason":{"description":"Required for non-default remit-to/payment method proposals.","maxLength":500,"type":["string","null"]},"remit_to_address":{"type":["string","null"]},"remit_to_city":{"type":["string","null"]},"remit_to_name":{"type":["string","null"]},"remit_to_state":{"type":["string","null"]},"remit_to_zip":{"type":["string","null"]},"retainage_percent":{"type":["string","null"]},"tax_classification":{"description":"W-9 federal tax classification; corporations and exempt payees get no 1099-NEC/MISC. Null is treated as reportable.","enum":["individual","sole_proprietor","partnership","llc_disregarded","llc_partnership","llc_c_corp","llc_s_corp","c_corp","s_corp","tax_exempt","government",null],"type":["string","null"]},"tax_id":{"description":"9-digit EIN or SSN; applied only after a second person approves","type":["string","null"]},"tax_id_type":{"enum":["ein","ssn",null]},"term_id":{"minimum":1,"type":["integer","null"]},"vendor_id":{"minimum":1,"type":"integer"},"w9_received_at":{"format":"date","type":["string","null"]},"w9_status":{"enum":["not_requested","requested","received","expired"]}},"required":["vendor_id"],"type":"object"}},"required":["party_profile"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PartyProfile"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Create a party profile","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/party_profiles/{id}":{"get":{"description":"One profile with masked tax id and bank account. `reveal=true` adds the decrypted values; it needs the accounting:write scope and manage_vendor_banking, writes an audit record, counts toward the per-user export limit (429), and is never cached. Requires the accounting:read scope (accounting:write with reveal=true). Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"getCompanyAccountingPartyProfile","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Decrypt TIN and bank numbers","in":"query","name":"reveal","schema":{"enum":["true","false"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PartyProfile"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"429":{"description":"Too many reveals; retry after the Retry-After seconds."}},"summary":"Show a party profile","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Updates changed profile fields. Changed W-9 status/date, tax classification, 1099 flag/form/box and clearing a compliance hold need (ap_approve AND release_payments) OR manage_vendor_banking, including configured MFA checks. Unchanged fields and safe create defaults need no sensitive permission. AR-only users may edit customer role, billing/contact, credit limit and terms, never vendor-only fields. Customer-only creates must explicitly set is_vendor=false (the server default is true). Bank account ownership still needs manage_vendor_banking. Remit-to and payment_method changes, including non-default create values, require a reason and step-up and become pending_sensitive_change alongside bank/TIN proposals. Effective routing stays unchanged until a different manage_vendor_banking user approves the reviewed change_hash. Any new proposal replaces the entire pending change; stale hashes and self-approval are refused. Approval arms the existing non-overridable payment cool-off. Ordinary edits need ap_enter, ar_enter or manage_vendor_banking. Requires accounting:write.","operationId":"updateCompanyAccountingPartyProfile","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"party_profile":{"properties":{"bank_account_number":{"pattern":"^\\d{4,17}$","type":["string","null"]},"bank_account_ownership":{"description":"Needs manage_vendor_banking.","enum":["business","consumer",null],"type":["string","null"]},"bank_account_type":{"type":["string","null"]},"bank_routing_number":{"pattern":"^\\d{9}$","type":["string","null"]},"billing_address":{"maxLength":500,"type":["string","null"]},"billing_contact_name":{"maxLength":200,"type":["string","null"]},"billing_email":{"format":"email","maxLength":320,"type":["string","null"]},"compliance_hold":{"type":"boolean"},"compliance_hold_reason":{"type":["string","null"]},"credit_limit":{"type":["string","null"]},"default_expense_account_id":{"minimum":1,"type":["integer","null"]},"form_1099_box":{"type":["string","null"]},"form_1099_type":{"type":["string","null"]},"is_1099":{"type":"boolean"},"is_customer":{"type":"boolean"},"is_vendor":{"type":"boolean"},"payment_method":{"enum":["check","ach","wire","card"]},"reason":{"description":"Required (422 without it) when clearing compliance_hold or changing remit_to_* or payment_method; recorded in the audit trail with the old and new values.","maxLength":500,"type":["string","null"]},"remit_to_address":{"type":["string","null"]},"remit_to_city":{"type":["string","null"]},"remit_to_name":{"type":["string","null"]},"remit_to_state":{"type":["string","null"]},"remit_to_zip":{"type":["string","null"]},"retainage_percent":{"type":["string","null"]},"tax_classification":{"description":"W-9 federal tax classification; corporations and exempt payees get no 1099-NEC/MISC. Null is treated as reportable.","enum":["individual","sole_proprietor","partnership","llc_disregarded","llc_partnership","llc_c_corp","llc_s_corp","c_corp","s_corp","tax_exempt","government",null],"type":["string","null"]},"tax_id":{"description":"9-digit EIN or SSN; applied only after a second person approves","type":["string","null"]},"tax_id_type":{"enum":["ein","ssn",null]},"term_id":{"minimum":1,"type":["integer","null"]},"w9_received_at":{"format":"date","type":["string","null"]},"w9_status":{"enum":["not_requested","requested","received","expired"]}},"type":"object"}},"required":["party_profile"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PartyProfile"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Update a party profile","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/party_profiles/{id}/sensitive_change":{"post":{"description":"Applies (`approve`) or discards (`reject`) the pending remit-to, payment method, tax id and bank change. Send the `change_hash` from the profile's `pending_sensitive_change` you reviewed: if the change was replaced since (any new request replaces it and gets a new hash), the decision is refused with 409 stale_change. A legacy pending change without reviewable values can only be rejected (409 unreviewable_change). The requester cannot decide their own change. Needs manage_vendor_banking. Requires the accounting:write scope. Step-up is required. Routing before/after and the request reason are shown in pending_sensitive_change; approval starts the non-overridable payment cool-off.","operationId":"sensitiveChangeCompanyAccountingPartyProfile","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"change_hash":{"description":"pending_sensitive_change.change_hash of the change you reviewed.","pattern":"^[0-9a-f]{64}$","type":"string"},"decision":{"enum":["approve","reject"]}},"required":["decision","change_hash"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PartyProfile"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The pending change was replaced after review (stale_change) or has no reviewable values (unreviewable_change)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Approve or reject a routing/bank/TIN change","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/accrual":{"post":{"description":"{ month: YYYY-MM }: approved timecards dated in the month that no posted run has paid, at each hourly employee's rate: Dr job labor by job (with hours) / Cr accrued wages (2150 → 2315) on the month's last day, auto-reversing on the 1st. 201 with the entry, 200 with journal_entry_id null when nothing is unpaid, 409 when the month is already accrued; an accrual reversed on its own date (a correction) no longer counts, so the month can be re-run as a new revision. Employer-wide: needs payroll_run on all entities. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollAccrual","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"month":{"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","type":"string"}},"required":["month"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Nothing to accrue"},"201":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"auto_reverse_date":{"type":["string","null"]},"journal_entry_id":{"type":["integer","null"]},"journal_entry_number":{"type":["string","null"]}},"required":["amount","journal_entry_id","journal_entry_number","auto_reverse_date"],"type":"object"}}},"description":"Accrued"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict with the current state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Post the month-end payroll accrual","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/burden_true_up":{"post":{"description":"{ month: YYYY-MM }: clears the month's Burden Applied balance to the jobs it was applied to (pro rata) or to overhead. Each entity's Burden Applied clears in that entity: one entry per entity with a balance (a pay group posts to its own entity). The job split is net of payroll run reversals and single-check voids posted in the month, so a voided run's or check's job gets no share; a check voided this month from an earlier month's run clears its own residue to that check's jobs (or overhead). 422 when the month holds a reversal of an earlier month's payroll run and that earlier month was already trued up (reconcile the job allocation manually), or when a payroll run in the month was reversed after the month's true-up was posted (reverse that true-up and re-run). Reversed true-ups never block. 201 with the entries (journal_entries lists each with its entity_id; the deprecated journal_entry_id / journal_entry_number name only the first), or 200 with journal_entry_id null when the balance is zero. Needs payroll_run. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollBurdenTrueUp","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"month":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Nothing to true up"},"201":{"content":{"application/json":{"schema":{"properties":{"journal_entries":{"items":{"properties":{"entity_id":{"type":"integer"},"id":{"type":"integer"},"number":{"type":"string"}},"required":["id","number","entity_id"],"type":"object"},"type":"array"},"journal_entry_id":{"deprecated":true,"description":"The first entity's entry only; read journal_entries for every entity's true-up entry.","type":["integer","null"]},"journal_entry_number":{"deprecated":true,"description":"The first entity's entry only; read journal_entries for every entity's true-up entry.","type":["string","null"]},"variance":{"type":"string"}},"required":["variance","journal_entry_id","journal_entry_number","journal_entries"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Post the standard-rate burden true-up","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/certified_payroll":{"get":{"description":"Without project_id: prevailing-wage projects and the weeks that need reports. With project_id and week_ending: the WH-347 dataset (json; column 1E is the last four SSN digits), csv, pdf, or the CA DIR eCPR XML (ecpr: V1 layout, accepted by DIR until 2027-01-13; ecpr_v2: XML Schema V2.0 with pwcr=<10-digit DIR registration>; ny_xml: NYS DOL certified payroll XML with prc_number=<10-character PRC>; ecpr and ecpr_v2 carry the full SSN and ny_xml the home address: all need the accounting:write scope and view_payroll_pii, audited, per-user export limit). A week with no work returns the statement of no work performed. Covers every entity: an entity-scoped grant gets 403. Requires the accounting:read scope (accounting:write for ecpr).","operationId":"listCompanyAccountingPayrollCertifiedPayroll","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project with a wage determination","in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"YYYY-MM-DD","in":"query","name":"week_ending","required":false,"schema":{"type":"string"}},{"description":"Output","in":"query","name":"format","required":false,"schema":{"enum":["json","csv","pdf","ecpr","ecpr_v2","ny_xml"],"type":"string"}},{"description":"format=ecpr_v2: the contractor's 10-digit DIR public works registration","in":"query","name":"pwcr","required":false,"schema":{"pattern":"^[0-9]{10}$","type":"string"}},{"description":"format=ny_xml: the project's 10-character NYS DOL Prevailing Rate Case number","in":"query","name":"prc_number","required":false,"schema":{"maxLength":10,"minLength":10,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"properties":{"projects":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"wd_number":{"type":"string"}},"required":["id","name","wd_number"],"type":"object"},"type":"array"},"weeks":{"items":{"type":"string"},"type":"array"}},"required":["projects","weeks"],"type":"object"},{"properties":{"header":{"type":"object"},"rows":{"items":{"type":"object"},"type":"array"},"statement_of_compliance":{"type":"object"}},"required":["header","statement_of_compliance","rows"],"type":"object"}]}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No wage determination, or the data fails WH-347 checks (e.g. apprentice over ratio)"},"429":{"description":"Too many reveals or PII files; retry after the Retry-After seconds."}},"summary":"Certified payroll (WH-347)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/checks/{id}/reissue":{"post":{"description":"For a lost or damaged paper check of an approved or posted run: the old number is voided in the bank account's shared check register (positive pay sends the void) and the same net pay takes the next number on that account, issued on `date` (default today). No journal entry, wage or tax effect: the run's cash line for the check stays outstanding until the new check clears. A voided check or a direct deposit is refused (422); a check whose cash line cleared the bank returns 409. Requires the accounting:write scope and release_payments.","operationId":"reissueCompanyAccountingPayrollCheck","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"date":{"format":"date","type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"check":{"$ref":"#/components/schemas/accounting_Check"},"voided_check_number":{"type":"string"}},"required":["check","voided_check_number"],"type":"object"}}},"description":"Reissued"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict with the current state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Reissue a printed paper check under a new number","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/checks/{id}/void":{"post":{"description":"Reverses only this check's journal lines and job cost hours (source payroll_check_void), dated `date` (default today, never before the pay date or in a filed quarter). The voider did not prepare, edit or calculate the run. A direct deposit whose NACHA file exists needs confirm_paid. A paper check whose cash line cleared the bank (bank-matched, or cleared or reconciled in a reconciliation) returns 409. Standard-rate burden is reversed at the rate and per-check share captured at approval, not the current setup. Payroll reports keep the check on its pay date and add a negative row on the void date. `reissue` creates a correction run (draft) with the check's time and earnings, paid on reissue_pay_date. A run with a voided check can no longer be voided whole. Requires the accounting:write scope.","operationId":"voidCompanyAccountingPayrollCheck","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"confirm_paid":{"type":"boolean"},"date":{"format":"date","type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"},"reissue":{"type":"boolean"},"reissue_pay_date":{"format":"date","type":"string"}},"required":["reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"check":{"$ref":"#/components/schemas/accounting_Check"},"reissue_run":{"oneOf":[{"$ref":"#/components/schemas/accounting_PayRun"},{"type":"null"}]}},"required":["check","reissue_run"],"type":"object"}}},"description":"Voided"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict with the current state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Void one check of a posted run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/codes":{"get":{"description":"Earning, deduction, benefit and employer-tax codes. Needs payroll_view. Requires the accounting:read scope.","operationId":"listCompanyAccountingPayrollCodes","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_PayrollCode"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"}},"summary":"List payroll codes","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Needs payroll_run; audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollCode","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"code":{"type":"object"}},"required":["code"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PayrollCode"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Create a code","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/employees":{"get":{"description":"PII masked (***-**-1234, ****6789). Filters: filters[status], filters[pay_group_id], search. Needs payroll_view. Requires the accounting:read scope.","operationId":"listCompanyAccountingPayrollEmployees","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Page (1-based)","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Page size (max 1000)","in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"description":"Name or number","in":"query","name":"search","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Employee"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"}},"summary":"List employees","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"ssn, bank_routing_number and bank_account_number are write-only: encrypted at rest (AES-256-GCM), never returned. Audit rows carry field names only. Needs payroll_run. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollEmployee","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"employee":{"type":"object"}},"required":["employee"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Employee"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Create an employee","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/employees/{id}":{"get":{"description":"With deductions. Deprecated `?reveal=true` (use POST employees/{id}/reveal, which takes a reason and keeps the request out of URLs and access logs) adds the decrypted SSN and bank numbers: needs the accounting:write scope and view_payroll_pii, writes an audit entry (the app's reveal is a POST server action with a required reason, stored in the audit event; it is never a URL parameter), and counts toward the per-user export limit (429). Employees outside the grant's entities (by pay group posting entity) are 404. Requires the accounting:read scope (accounting:write with reveal=true).","operationId":"getCompanyAccountingPayrollEmployee","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"deprecated":true,"description":"Decrypt PII (view_payroll_pii; audited)","in":"query","name":"reveal","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Employee"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"429":{"description":"Too many reveals or PII files; retry after the Retry-After seconds."}},"summary":"Show an employee","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Partial update; rate changes are audited as rate_changed. Needs payroll_run. Requires the accounting:write scope. Pay-rate fields (pay_type, hourly_rate, salary_per_period, classification, union_local_id, plan_credit_per_hour) are not applied: they become a pending rate change (pending_rate_change_id) that a different user approves. Bank fields (bank_routing_number, bank_account_number, bank_account_type) likewise become a pending bank change (pending_bank_change_id).","operationId":"updateCompanyAccountingPayrollEmployee","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"employee":{"type":"object"}},"required":["employee"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Employee"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Update an employee","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/employees/{id}/deductions":{"post":{"description":"kind deduction (pretax_401k, roth_401k, section125, hsa, post_tax, union_dues), garnishment (child_support, federal_tax_levy, state_tax_levy, bankruptcy, student_loan, creditor) or match (params.tiers). Needs payroll_run. One active row per code across every kind (a match cannot share a deduction's code, so use e.g. 401K and 401K_MATCH): a second active row with the same code is 409 (end the first). Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollEmployeeDeduction","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"deduction":{"type":"object"}},"required":["deduction"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Deduction"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"description":"The employee already has an active deduction with this code (end it first), or the Idempotency-Key is in use."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Add a deduction, match or garnishment","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/employees/{id}/deductions/{deduction_id}":{"delete":{"description":"Marks it inactive (kept for history). Needs payroll_run. Requires the accounting:write scope.","operationId":"deleteCompanyAccountingPayrollEmployeeDeduction","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"deduction_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"No content"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"End a deduction","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/employees/{id}/reveal":{"post":{"description":"{ reason }: the employee with the decrypted SSN and bank numbers (revealed). Needs the accounting:write scope and view_payroll_pii; writes a pii_revealed audit entry with the reason; counts toward the per-user export limit (429). Cache-Control: no-store. Employees outside the grant entities are 404. Requires the accounting:write scope.","operationId":"revealCompanyAccountingPayrollEmployee","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Employee"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error (reason: 3 to 500 characters)"},"429":{"description":"Too many reveals or PII files; retry after the Retry-After seconds."}},"summary":"Reveal an employee SSN and bank numbers","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/employers":{"get":{"description":"Entities with their own EIN that employ: state withholding / UI account numbers and the ACH origin (account masked). Checks of a pay group whose posting entity has an EIN other than payroll setup's carry that entity as employer_entity_id. Requires the accounting:read scope.","operationId":"listCompanyAccountingPayrollEmployers","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_PayrollEmployer"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), wrong company, or read-only workspace"}},"summary":"List payroll employer entities","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/employers/{entity_id}":{"put":{"description":"Upsert state_account_ids, ach_odfi_routing, ach_bank_name and ach_account_number (write-only, encrypted) for an entity with an EIN. Employer-wide: needs payroll_run on all entities. Requires the accounting:write scope.","operationId":"replaceCompanyAccountingPayrollEmployer","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"entity_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"employer":{"properties":{"ach_account_number":{"type":["string","null"]},"ach_bank_name":{"type":["string","null"]},"ach_odfi_routing":{"type":["string","null"]},"state_account_ids":{"type":["object","null"]}},"type":"object"}},"required":["employer"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PayrollEmployer"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Set an employer entity's payroll identity","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/filings":{"post":{"description":"{ period: \"2026-Q1\" (941) | \"2026-Q1-UI\" (state UI report) | \"2026\" (W-2 / 940), filed?: true }. A void of posted payroll may not be dated into a filed period (409); voiding payroll paid in a filed quarter or year records an amended_return_required audit event (Form 941-X / W-2c) and form_941 lists corrections_required. filed=false reopens the period and also needs close_period (a payroll runner alone cannot reopen a filed return). Needs payroll_run for every entity. Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollFiling","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"filed":{"type":"boolean"},"period":{"pattern":"^\\d{4}(-Q[1-4](-UI)?)?$","type":"string"}},"required":["period"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"filed_periods":{"items":{"type":"string"},"type":"array"}},"required":["filed_periods"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii / release_payments), wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation error or payroll setup missing"}},"summary":"Mark a payroll return period filed","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/futa_override":{"post":{"description":"While the year's FUTA credit reduction is DOL's provisional list (final after November 10), Form 940 returns 422 \"credit reduction provisional\". { action: \"request\", year, reason } by one payroll runner, then { action: \"approve\", year } by a different one (403 for the requester). A new request replaces the old one; a change to the provisional rates voids the approval. 422 when the year is not provisional. Audited. Needs payroll_run. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollFutaOverride","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"action":{"enum":["request","approve"],"type":"string"},"reason":{"description":"Required for request (3-500 chars)","type":"string"},"year":{"type":"integer"}},"required":["action","year"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"approved_at":{"type":["string","null"]},"approved_by_id":{"type":["integer","null"]},"rates":{"additionalProperties":{"type":"string"},"type":"object"},"reason":{"type":"string"},"requested_by_id":{"type":"integer"},"status":{"enum":["pending","approved"],"type":"string"},"year":{"type":"integer"}},"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Request or approve a provisional FUTA credit reduction override","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/manual_checks":{"post":{"description":"Gross, taxes and deductions as written become a one-check run of run_type manual, status calculated. Net = gross − employee taxes − deductions (a given net must match). A second person approves it and it posts like any run; it is never recalculated (calculate returns 422). Its accounts are the payroll account map's job labor (5000), overhead labor (6000) and net pay (1010) keys, as for any run. check_number requires bank_account_id: the check is entered in that account's shared check register (positive pay sends it), the account must be the checking account on the net pay GL account, and a number already used on the account returns 409. Idempotent on request_key or the Idempotency-Key header (one run and one check per key). Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollManualCheck","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"manual_check":{"properties":{"bank_account_id":{"description":"Required with check_number: the checking account the check was written on.","type":"integer"},"check_number":{"type":"string"},"cost_code_id":{"type":["integer","null"]},"deductions":{"items":{"properties":{"amount":{"pattern":"^\\d+(\\.\\d{1,2})?$","type":"string"},"code":{"type":"string"},"type":{"enum":["pretax_401k","roth_401k","section125","hsa","post_tax","union_dues"],"type":"string"}},"required":["code","type","amount"],"type":"object"},"type":"array"},"employee_id":{"type":"integer"},"gross":{"pattern":"^\\d+(\\.\\d{1,2})?$","type":"string"},"memo":{"type":["string","null"]},"net":{"pattern":"^\\d+(\\.\\d{1,2})?$","type":"string"},"pay_date":{"format":"date","type":"string"},"pay_group_id":{"type":"integer"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"project_id":{"type":["integer","null"]},"request_key":{"description":"Retry key: a repeat with the same key returns the first run (201, same body); the same key with any other field changed (employee, pay group, dates, gross, taxes, deductions, net, check number, job, memo) is 409. An Idempotency-Key header fills a missing request_key.","maxLength":100,"minLength":8,"type":"string"},"taxes":{"items":{"properties":{"amount":{"pattern":"^\\d+(\\.\\d{1,2})?$","type":"string"},"code":{"description":"FIT, SS, MED, ADDL_MED, FUTA, SUTA, SIT, LOCAL, SDI …","type":"string"},"jurisdiction":{"type":"string"},"payer":{"enum":["employee","employer"],"type":"string"},"wages":{"pattern":"^\\d+(\\.\\d{1,2})?$","type":"string"}},"required":["code","payer","amount"],"type":"object"},"type":"array"}},"required":["pay_group_id","employee_id","pay_date","gross"],"type":"object"}},"required":["manual_check"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PayRun"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The check number is already used on the bank account, or the request_key (or Idempotency-Key) was already used for a different manual check, or that request is still running."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Enter a manual (handwritten) check","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/pay_groups":{"get":{"description":"Pay groups with frequency and overtime rule set (FLSA, CA, AK, NV, CO). Needs payroll_view. Requires the accounting:read scope.","operationId":"listCompanyAccountingPayrollPayGroups","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_PayGroup"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"}},"summary":"List pay groups","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Needs payroll_run; audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollPayGroup","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"pay_group":{"type":"object"}},"required":["pay_group"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PayGroup"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Create a pay group","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/pay_groups/{id}":{"patch":{"description":"Name, frequency, OT rule set, OT method (weighted_average | rate_in_effect) or is_active. Needs payroll_run; audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingPayrollPayGroup","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"pay_group":{"type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PayGroup"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Update a pay group","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/pii_rotation":{"post":{"description":"Re-encrypts SSNs, employee and pending bank numbers and the ACH account still under an older key version (or the legacy format) with the current key, bound to its row (company, employee, field). Refused (409) while any run is approved. Returns counts only. Needs payroll_run + view_payroll_pii; audited. Requires the accounting:write scope. Also rewrites decided bank-change rows, employer-entity ACH accounts (AcctPayrollEmployer), employee ACH prenote records and employee NOC corrections. `remaining` counts the company's rows, vendor and banking included, still holding a value under an older key id or the legacy format: drop an old key id only once it is 0.","operationId":"createCompanyAccountingPayrollPiiRotation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"remaining":{"description":"Rows still under an older key id or the legacy format, company-wide.","type":"integer"},"rotated":{"type":"integer"}},"required":["rotated","remaining"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"An approved run holds a hash of the current ciphertext"}},"summary":"Rotate payroll PII encryption","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/rate_changes":{"get":{"description":"Newest first. Paginated (page/per_page; Total and Link headers). Requested by one person, approved or rejected by another (SoD). Filters: employee_id, status. Needs payroll_view. Requires the accounting:read scope.","operationId":"listCompanyAccountingPayrollRateChanges","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"employee_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"status","required":false,"schema":{"enum":["pending","approved","rejected"],"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_RateChange"},"type":"array"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"}},"summary":"List pay-rate changes","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/accounting/payroll/rate_changes/{id}":{"post":{"description":"{ approve, reason }. Approving applies the rates. 403 when the approver requested the change or prepared an open run for the employee's pay group. Needs payroll_run; audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollRateChange","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"approve":{"type":"boolean"},"reason":{"type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RateChange"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Approve or reject a pay-rate change","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/remittances":{"get":{"description":"Newest first. Paginated (page/per_page; Total and Link headers). Needs payroll_view. Requires the accounting:read scope.","operationId":"listCompanyAccountingPayrollRemittances","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_PayrollRemittance"},"type":"array"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"}},"summary":"List payroll liability remittances","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"{ remittance: { request_key, account_key, amount, through_date, paid_date, method: bank | ap_bill, bank_account_id (bank) | vendor_id (ap_bill), entity_id?, memo } }. entity_id defaults to the bank account's entity, else the company default; the liability is cleared, and the open balance checked, in that entity (the actor needs access to it; a bank account of another entity is 422). bank moves cash: it needs release_payments (403 without it) and posts Dr liability / Cr the bank's GL account (shown in the bank register), or, at or above the journal approval threshold (settings require_approval_above), is saved as status pending_approval with no journal until a different user releases it (POST remittances/{id}/approve); ap_bill drafts an AP bill coded to the liability. The amount may not exceed the open balance through through_date less unposted remittance bills and pending bank remittances (422). Idempotent on request_key (a replay returns the first remittance; a different body with the same key is 409). Needs payroll_run; audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollRemittance","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"remittance":{"type":"object"}},"required":["remittance"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PayrollRemittance"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii / release_payments), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Request key reused for a different remittance"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Remit a payroll liability","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/remittances/{id}/{decision}":{"post":{"description":"approve posts the bank remittance journal (Dr liability / Cr bank GL), dated its paid date; reject leaves it rejected with no journal. Needs payroll_run and release_payments; the creator cannot approve their own remittance (403). Only pending_approval remittances (409 otherwise). Audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollRemittancePost","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"decision","required":true,"schema":{"enum":["approve","reject"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PayrollRemittance"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii / release_payments), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not waiting for release, or decided concurrently"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error (closed period)"}},"summary":"Release or reject a pending bank remittance","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/reports/{report}":{"get":{"description":"From posted runs. form_941 (year, quarter), form_940 (year; credit_reduction {provisional, rates, override} with Schedule A from the year's FUTA credit reduction list; 422 \"credit reduction provisional\" while DOL's list is provisional and wages fall in a listed state, until an approved futa_override; 422 when no list is loaded for the year and wages fall in a state on any loaded list), w2 (year; format=efw2 supports domestic tax years 2024-2026 and needs the accounting:write scope and view_payroll_pii, audited; BSO/contact inputs required; provisional requests rejected; incomplete or unsupported populated payroll source fields return 422), union_remittance (month YYYY-MM: per fund, remit-to local, employees with hours and amounts; hours and gross are the CBA rate group's), union_local_remittance (month YYYY-MM, optional local; format=json|csv: one report per remit-to local with each employee's hours, gross, employer fringe by fund, dues actually withheld and the amount to remit, plus a reconciliation of the month's fringe (engine key 2120) and dues (2124) to the payroll journal and the GL accounts they map to: report vs engine and engine vs GL payroll postings must both be 0.00 for an account to tie; opening, other activity (remittances) and closing balances), state_ui (year, quarter; rows carry employee_tax: NJ/PA/AK employee unemployment withheld; the csv adds an employee_sui column). Requires the accounting:read scope. deposit_calendar (year, quarter): each liability date's 941 deposit due date under the monthly or semiweekly schedule (next-day for $100k). w2 format=pdf: employee W-2 copies (view_payroll_pii, audited). w3 (year): W-3 transmittal totals. w2 and w3 boxes include W (box 12 code W: HSA contributions through the cafeteria plan). state_ui accepts state=XX; format=csv returns the state SUI wage file (accounting:write scope and view_payroll_pii, audited). Tax filings cover every entity of the employer: an entity-scoped grant gets 403. EFW2 and the SUI file count toward the per-user export limit (429). form_941 also returns filed (the quarter is marked filed) and corrections_required ([{ run, voided_on, form: 941-X }]: posted payroll of the filed quarter voided after it ended). Reports use effective dates: a run voided after posting stays in its pay-date period, and its void adds negative rows on the void (reversal) date. deposit_calendar counts only posted (paid) remittances toward remitted; a deposit period whose net liability is negative (a void) has amount 0.00 and the rest as credit. w2 rows carry correction_required: \"W-2c\" when a void of prior-year pay leaves a box negative (left out of EFW2, W-3 and the PDF); state_ui rows carry correction_required: \"amended_report\" likewise (left out of the SUI file). form_940 caps FUTA wages on cumulative wages, so a void gives back only the wages it had made taxable.","operationId":"getCompanyAccountingPayrollReport","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"report","required":true,"schema":{"enum":["form_941","form_940","w2","union_remittance","union_local_remittance","state_ui","deposit_calendar","w3"],"type":"string"}},{"description":"Tax year","in":"query","name":"year","required":false,"schema":{"type":"integer"}},{"description":"1-4","in":"query","name":"quarter","required":false,"schema":{"type":"integer"}},{"description":"YYYY-MM","in":"query","name":"month","required":false,"schema":{"type":"string"}},{"description":"w2: json | efw2 | pdf; state_ui: json | csv; union_local_remittance: json | csv","in":"query","name":"format","required":false,"schema":{"type":"string"}},{"description":"union_local_remittance: one remit-to local code","in":"query","name":"local","required":false,"schema":{"maxLength":64,"type":"string"}},{"description":"Required for efw2: attesting BSO user ID","in":"query","name":"bso_user_id","schema":{"pattern":"^[A-Z0-9]{8}$","type":"string"}},{"description":"Required for efw2","in":"query","name":"contact_name","schema":{"maxLength":27,"minLength":1,"type":"string"}},{"description":"Required for efw2: ten-digit domestic telephone (formatting allowed)","in":"query","name":"contact_phone","schema":{"maxLength":15,"type":"string"}},{"description":"Required for efw2: printable ASCII email","in":"query","name":"contact_email","schema":{"format":"email","maxLength":40,"type":"string"}},{"description":"state_ui: two-letter state","in":"query","name":"state","required":false,"schema":{"pattern":"^[A-Z]{2}$","type":"string"}},{"description":"form_941, form_940, deposit_calendar, w3, state_ui: the employer (EIN) to file for. 0 = the company employer in payroll setup, an entity id = that entity. Omitted: the only employer that paid in the period (422 when several did). W-2 rows carry employer_entity_id: an employee paid by two EINs gets two W-2s.","in":"query","name":"employer_entity_id","required":false,"schema":{"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object"},{"items":{"type":"object"},"type":"array"}]}},"text/plain":{"schema":{"description":"EFW2 attachment; 512 ASCII-byte records plus CR/LF. Payroll maps TT, D/AA, W (cafeteria-plan HSA contributions) and documented participation; no TA/TP, DD, C or box 10 employee source is available.","type":"string"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unsupported year/provisional option, invalid identity/contact, missing qualified-overtime detail, unsupported populated W-2 data, HSA contributions or unclassified retirement-plan source"},"429":{"description":"Too many reveals or PII files; retry after the Retry-After seconds."}},"summary":"Payroll tax and remittance data","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/runs":{"get":{"description":"Newest pay date first. Filters: filters[status], filters[pay_group_id]. Needs payroll_view. Requires the accounting:read scope.","operationId":"listCompanyAccountingPayrollRuns","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Page (1-based)","in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"description":"Page size (max 1000)","in":"query","name":"per_page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_PayRun"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"}},"summary":"List pay runs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"pay_group_id, period_start, period_end, pay_date. Refuses a period that overlaps another open run of the group. Imports approved timecards unless import_time is false. Needs payroll_run. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"pay_run":{"type":"object"}},"required":["pay_run"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PayRun"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Create a pay run","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/runs/{id}":{"get":{"description":"Checks (PII masked) with taxes and deductions, and time lines. `?explain=true` adds each check's calculation trace. Requires the accounting:read scope.","operationId":"getCompanyAccountingPayrollRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Include calculation traces","in":"query","name":"explain","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PayRunShow"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"}},"summary":"Show a pay run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/runs/{id}/{action}":{"get":{"description":"preview: the payroll journal entry and the labor/burden job cost lines it will post. register: per-check register (JSON, or CSV with format=csv). nacha: the PPD direct deposit file (payroll_run + view_payroll_pii; audited; approved or posted runs). The file is never stored; each generation is recorded (file id modifier, sha256, entries, total, generated by). It is generated once (file id modifier A): a second GET is 409; re-send with POST nacha_resend. Response headers: X-Ach-File-Id-Modifier, and X-Ach-Warning when the effective entry date (pay date) is fewer than 2 banking days away. preview and register require the accounting:read scope; nacha (the direct deposit file) requires the accounting:write scope. Payroll resends require previous_file_id_modifier from the run detail last_ach_file_id_modifier. Missing acknowledgement is 422; stale or replayed acknowledgement is 409 with no new file. Confirm bank non-processing before refreshing and requesting another distinct resend.","operationId":"getCompanyAccountingPayrollRunGet","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"GET: preview | register | nacha. POST: nacha | import_time | time | earnings | calculate | acknowledge | override | approve | post | void | print_checks | nacha_resend.","in":"path","name":"action","required":true,"schema":{"enum":["preview","register","nacha","import_time","time","calculate","acknowledge","override","approve","post","void","earnings","print_checks","nacha_resend"],"type":"string"}},{"description":"register: csv","in":"query","name":"format","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/accounting_Preview"},{"items":{"type":"object"},"type":"array"}]}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The direct deposit file was already generated (re-send with nacha_resend)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not calculated / not approved / setup incomplete"}},"summary":"Pay run outputs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"import_time: approved TimecardEntry rows of the group's linked users in the period (each imported once; they become completed when the run posts). time: { time: [...] } hand-entered lines. calculate: gross-to-net for every employee with time or a salary (replaces prior checks, bumps the revision). acknowledge: { key, reason } for a warning. approve: a different person than the preparer; errors block, warnings must be acknowledged; 422 when a check already in a bank's register (a manual check) is on a bank whose GL is not the net pay account (map key 1010). post: one PR journal entry (sourceType payroll_run) with labor and burden job cost; timecards → completed. void: { reason, date?, confirm_paid? } reverses a posted entry (dated today by default, never before the pay date) and reopens the timecards; a posted run is voided by someone other than its preparers, and an approved or posted run whose direct deposit file was generated needs confirm_paid: true (409 otherwise), and a bank-reconciled entry is refused (409). Needs payroll_run. Requires the accounting:write scope. override: { key, reason } clears an apprentice_over_ratio error (only when the over-ratio hours are already paid at least the journeyworker rate), a missing_suta_rate error or a local_tax_stub error; the person overriding must not be the run's preparer. approve refuses with 409 'Recalculate: YTD changed' when another run paying any of the same employees in the same tax year was approved after this run was calculated (its YTD wage bases are stale); recalculate and approve again. Checks localized to NJ, PA or AK withhold employee unemployment (tax code SUI, accrued to payroll key 2116); with no employee rate loaded for the pay date the check fails with calc_failed. Earnings coded to a project are taxed in the job site state and rated for workers comp there. Calculation raises sdi_rate_unconfirmed (error), one per payer side, when a work state's SDI/PFML program has no rate loaded or that side's rate depends on employer size and payroll setup has no confirmed rate for that side. earnings: { earnings: [{ employee_id, code_id, amount | hours (+ rate), project_id, cost_code_id, memo }] } replaces the run's extra earnings (bonus, PTO, holiday); each code's tax_treatment decides supplemental withholding. print_checks: { bank_account_id } numbers the run's paper checks from that checking account's shared check register (approved or posted runs; re-printing keeps the numbers; the bank account's GL must be the account the run credited for net pay, map key 1010, else 422 naming both) and returns { checks: [{ check_id, employee_id, employee_number, check_number, net, print }] }; needs release_payments. nacha: generates the direct deposit file the first time (422 when the payroll ACH origin routing/account differs from the numbered bank account on the run's net-pay GL; a warning when that GL has no numbered bank account) (same as GET nacha, which is kept for older clients; prefer POST so a retry or prefetch does not spend the one generation). nacha_resend: { resend: { reason, previous_file_id_modifier } } re-sends the direct deposit file with the next file id modifier (B, then C; at most 2 re-sends, then 409); needs payroll_run, view_payroll_pii and release_payments; returns the ACH file (text/plain) with the same headers as GET nacha; audited (nacha_resent, with the reason). Payroll resends require previous_file_id_modifier from the run detail last_ach_file_id_modifier. Missing acknowledgement is 422; stale or replayed acknowledgement is 409 with no new file. Confirm bank non-processing before refreshing and requesting another distinct resend.","operationId":"createCompanyAccountingPayrollRunPost","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"GET: preview | register | nacha. POST: nacha | import_time | time | earnings | calculate | acknowledge | override | approve | post | void | print_checks | nacha_resend.","in":"path","name":"action","required":true,"schema":{"enum":["preview","register","nacha","import_time","time","calculate","acknowledge","override","approve","post","void","earnings","print_checks","nacha_resend"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/accounting_PayrollNachaResend"},{"not":{"required":["resend"]},"type":"object"}]}}},"description":"Action-specific body. nacha_resend requires PayrollNachaResend; other workflow actions use the bodies described above.","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PayRun"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Approve: YTD changed since calculation (recalculate), approval inputs busy, or a conflicting state"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Pay run workflow step","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/setup":{"get":{"description":"Tax engine (builtin or a registered provider adapter), burden method, SUTA, employer identity (EIN masked), ACH origin (account masked) and the payroll account map. Needs payroll_view. Requires the accounting:read scope.","operationId":"listCompanyAccountingPayrollSetup","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Setup"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"}},"summary":"Show payroll setup","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Partial update; an unknown tax_provider is refused. The ACH account number is encrypted. Needs payroll_run; audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingPayrollSetup","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"payroll_setup":{"type":"object"}},"required":["payroll_setup"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Setup"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Update payroll setup","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/union_locals":{"get":{"description":"Locals with their effective-dated CBA rates and benefit rules. Needs payroll_view. Requires the accounting:read scope.","operationId":"listCompanyAccountingPayrollUnionLocals","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_UnionLocal"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"}},"summary":"List union locals","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Needs payroll_run; audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollUnionLocal","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"union_local":{"type":"object"}},"required":["union_local"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_UnionLocal"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Create a union local","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/union_locals/{id}":{"patch":{"description":"Name, remit_to, or cba_rules ({ day_multipliers: { \"0\"..\"6\": multiplier }, holidays: [date], holiday_multiplier }; null clears). Needs payroll_run; audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingPayrollUnionLocal","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"union_local":{"type":"object"}},"required":["union_local"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_UnionLocal"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Update a union local","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/union_rates":{"post":{"description":"Effective-dated wage and benefit rules (per hour, % of gross, per day; employer fringe or employee deduction such as dues; reciprocity). Needs payroll_run. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollUnionRate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"union_rate":{"type":"object"}},"required":["union_rate"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_UnionRate"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Add a CBA rate","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/wage_determinations":{"get":{"description":"Prevailing wage BHR + fringe per project and classification, with the apprentice ratio. Needs payroll_view. Requires the accounting:read scope.","operationId":"listCompanyAccountingPayrollWageDeterminations","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_WageDetermination"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"}},"summary":"List wage determinations","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Needs payroll_run; audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollWageDetermination","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"wage_determination":{"type":"object"}},"required":["wage_determination"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_WageDetermination"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Create a wage determination","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/payroll/wc_classes":{"get":{"description":"Effective-dated class rates per $100 (or per hour); OT premium excluded by default. Needs payroll_view. Requires the accounting:read scope.","operationId":"listCompanyAccountingPayrollWcClasses","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_WcClass"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"}},"summary":"List workers' comp classes","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Needs payroll_run; audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingPayrollWcClass","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"wc_class":{"type":"object"}},"required":["wc_class"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_WcClass"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing payroll permission (payroll_view / payroll_run / view_payroll_pii), a project-scoped (project_manager_view) grant (it never holds payroll permissions), wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation or workflow error"}},"summary":"Create a wc class","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/periods":{"get":{"description":"Periods in date order with the overall status and the close status of each module (AP, AR, payroll, job cost, cash management, GL). Filter with `filters[fiscal_year]` and `filters[status]`. Requires the accounting:read scope.","operationId":"listCompanyAccountingPeriods","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Fiscal year label","in":"query","name":"filters[fiscal_year]","schema":{"type":"integer"}},{"description":"open, soft_closed or closed (comma-separated)","in":"query","name":"filters[status]","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Period"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown filter value"}},"summary":"List fiscal periods","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/periods/rebuild_balances":{"post":{"description":"Recomputes acct_period_balances (what TB, balance sheet and income statement read for whole periods) from the posted journal lines, under every period row lock, and audits the number of corrected rows. Use when the integrity check period_balances_parity fails. Needs close_period and unrestricted entity access (403 otherwise). Requires the accounting:write scope.","operationId":"createCompanyAccountingPeriodsRebuildBalance","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reason":{"maxLength":2000,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"corrected":{"description":"Snapshot rows that differed from the lines","type":"integer"},"rows":{"description":"Snapshot rows written","type":"integer"}},"required":["corrected","rows"],"type":"object"}}},"description":"Rebuilt"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (reason missing)"}},"summary":"Rebuild period balance snapshots","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/periods/{id}":{"get":{"description":"One period with its per-module close status. Requires the accounting:read scope.","operationId":"getCompanyAccountingPeriod","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Period"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a fiscal period","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/periods/{id}/close":{"post":{"description":"Closes one module (`ap`, `ar`, `payroll`, `jc`, `cm`, `gl`) or the whole period (`all`, the default). A closed period refuses postings, enforced again by a database trigger; a soft-closed one accepts postings only from users who can close periods. Needs close_period. With `entity_id` (per-entity close enabled), only that entity's lines are refused; an entity's readiness, checklist and evidence cover that entity only, and the elimination entity closes last (every entity closed, eliminations current). Without per-entity close enabled, `entity_id` answers 422 `entity_close_disabled`. Audited and emits `accounting.period.closed` or `accounting.period.soft_closed`. Requires the accounting:write scope.","operationId":"closeCompanyAccountingPeriod","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"close":{"properties":{"entity_id":{"description":"Per-entity close (when enabled): act on this entity only. The company period status is the roll-up of its active entities (closed once every entity is closed). An entity-restricted grant may act on its own entities; the elimination entity needs unrestricted access. Omit for all entities.","minimum":1,"type":"integer"},"module":{"enum":["all","ap","ar","payroll","jc","cm","gl"]},"status":{"enum":["soft_closed","closed"]}},"type":"object"}},"required":["close"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Period"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, read-only workspace, an entity outside the grant's entities, or (without entity_id) an entity-restricted grant"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Company heavy-read budget spent (ACCT_HEAVY_BUDGET units per minute); retry after the Retry-After seconds"}},"summary":"Close or soft-close a period","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/periods/{id}/eliminate_intercompany":{"post":{"description":"Posts one CL entry in the elimination entity dated the period end, auto-reversing the next day, that reverses every matched pair of intercompany due-to/due-from balances (by line counterparty), so the Consolidated column of the entity-pivot statements nets intercompany to zero. Refuses (422) when no elimination entity exists, when a pair of entities does not net to zero, or when intercompany lines with a balance name no counterparty. A rerun compares with what earlier runs still contribute at the period end, even after their auto-reversal: unchanged returns the latest entry (200, created false); otherwise a still-posted revision is reversed, an already auto-reversed one is offset on the period end, and a new revision posts (201). It also posts a second CL entry (pl_journal_entry) dated the period end, not auto-reversing, that reverses the period's intercompany revenue and cost: income-statement lines naming a counterparty entity (the intercompany pre-pass tags them only when an entry's P&L sits in exactly two entities and nets to zero), so the consolidated income statement leaves out EquipCo rent charged to OpCo jobs; only pairs that net to zero are eliminated, the others stay in consolidation and are listed in pl_mismatches without blocking the balance-sheet elimination, and a rerun reverses the standing revision when the period's activity changed. Needs close_period and unrestricted entity access (403 otherwise). Requires the accounting:write scope.","operationId":"eliminateIntercompanyCompanyAccountingPeriod","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EliminationRun"}}},"description":"Standing eliminations unchanged, or nothing left to eliminate (journal_entry null)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_EliminationRun"}}},"description":"Eliminations posted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Eliminate intercompany at a period end","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/periods/{id}/reopen":{"post":{"description":"Reopens one module or the whole period. A reason is required and recorded in the audit trail. Refused with 422 while a later period is closed, unless cascade is true: then every later closed period is reopened too, its close reviews are invalidated, and each reopen is audited. Reopening a hard-closed scope (a closed period or module, or a cascade over closed periods) needs two close_period users: the first call records a request and answers 202 with the unchanged period and pending_reopen; a different user's call with the same module and cascade within 7 days applies the reopen (200). Soft-closed scopes reopen on one call. With `entity_id`, the reopen, cascade and two-person request apply to that entity's rows; reopening a real entity also reopens the elimination entity where it is closed in that period or later. Needs close_period. Requires the accounting:write scope.","operationId":"reopenCompanyAccountingPeriod","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reopen":{"properties":{"cascade":{"default":false,"type":"boolean"},"entity_id":{"description":"Per-entity close (when enabled): act on this entity only. The company period status is the roll-up of its active entities (closed once every entity is closed). An entity-restricted grant may act on its own entities; the elimination entity needs unrestricted access. Omit for all entities.","minimum":1,"type":"integer"},"module":{"enum":["all","ap","ar","payroll","jc","cm","gl"]},"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["reason"],"type":"object"}},"required":["reopen"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Period"}}},"description":"OK"},"202":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/accounting_Period"},{"properties":{"pending_reopen":{"properties":{"id":{"type":"integer"},"requested_at":{"format":"date-time","type":"string"},"requested_by_id":{"type":"integer"}},"required":["id","requested_by_id","requested_at"],"type":"object"}},"required":["pending_reopen"],"type":"object"}]}}},"description":"Reopen requested; a second close_period user must confirm it with the same module and cascade."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, read-only workspace, an entity outside the grant's entities, or (without entity_id) an entity-restricted grant"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Reopen a period","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/pii_rotation":{"post":{"description":"Data migration and key rotation: re-encrypts vendor/customer TIN and bank numbers (live and pending) and company bank account and routing numbers still in the legacy format, under an older key, or written before row binding (empty AAD), with the current key and bound to their row (company, row, field), so a value copied to another row no longer decrypts. A rewritten pending change gets a new change_hash. Returns counts only. Needs manage_vendor_banking; audited. Requires the accounting:write scope. Also rewrites AP payment release snapshots and vendor ACH prenote records (profile binding), vendor and unmatched NOC corrections, ERP connection OAuth tokens and webhook signing secrets. `remaining` counts the company's rows, payroll included, still holding a value under an older key id or the legacy format: drop an old key id only once it is 0.","operationId":"createCompanyAccountingPiiRotation","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"remaining":{"description":"Rows still under an older key id or the legacy format, company-wide.","type":"integer"},"rotated":{"type":"integer"}},"required":["rotated","remaining"],"type":"object"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing manage_vendor_banking, wrong company, or read-only workspace"}},"summary":"Rotate vendor and bank PII encryption","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/prepaids/forecast":{"get":{"description":"Scheduled prepaid amortization and deferred revenue recognition by recognition account and month for `months` months (1-36, default 12) from `from` (YYYY-MM, default this month), from the schedules in force; `overdue` is what is scheduled before `from` and not yet posted. Noncash (`cash_impact` none): the payments were cash when the bill or receipt was. Needs view_ledger. Requires the accounting:read scope.","operationId":"listCompanyAccountingPrepaidsForecast","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"from","required":false,"schema":{"pattern":"^\\d{4}-(0[1-9]|1[0-2])$","type":"string"}},{"in":"query","name":"months","required":false,"schema":{"maximum":36,"minimum":1,"type":"integer"}},{"in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidForecast"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, a project-scoped grant or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Entity outside the grant"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid from or months"}},"summary":"Upcoming amortization forecast","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/prepaids/roll_forward":{"get":{"description":"Per balance account, in its normal direction, for from..to: opening (GL) + additions (funding, deferred bill lines, other increases) − amortization (posted runs net of reversals) + adjustments (amount changes, cancellations, voids, other decreases) = closing (GL), with the subledger balance and the difference; `foots` checks the identity and `ties` that every account foots and agrees with the subledger. Per schedule: opening, posted amortization and closing from the subledger. Needs view_ledger. Requires the accounting:read scope.","operationId":"listCompanyAccountingPrepaidsRollForward","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"from","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"to","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidRollForward"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, a project-scoped grant or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Entity outside the grant"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"from and to missing or invalid"}},"summary":"Prepaid and deferred revenue roll-forward","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/prepaids/runs":{"get":{"description":"Runs of the grant's entities, latest period first (at most 200). Needs view_ledger. Requires the accounting:read scope.","operationId":"listCompanyAccountingPrepaidsRuns","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"period_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_PrepaidRun"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, a project-scoped grant, outside the entity scope or wrong company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid query"}},"summary":"List amortization runs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Needs post_journal. Computes, for every schedule of the entity funded by the period end, the cumulative scheduled amortization through the period less what is posted, and stores the lines without posting (201). The same evidence returns the prepared run (200, unchanged true); changed evidence supersedes it. Refused (409) when a posted run covers the period and entity; (422) for a non-calendar-month or closed period, when a later period's run is posted, or when nothing is due. A second user approves it. Audited. Honors Idempotency-Key. Requires the accounting:write scope.","operationId":"createCompanyAccountingPrepaidsRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"prepaid_run":{"additionalProperties":false,"properties":{"entity_id":{"minimum":1,"type":"integer"},"period_id":{"minimum":1,"type":"integer"}},"required":["period_id","entity_id"],"type":"object"}},"required":["prepaid_run"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidRun"}}},"description":"The prepared run with the same evidence"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidRun"}}},"description":"Prepared"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing post_journal, a project-scoped grant, outside the entity scope or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Period or entity not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already posted for the period and entity"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body, closed or non-calendar period, a later run posted, or nothing due"}},"summary":"Prepare an amortization run","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/prepaids/runs/{id}":{"get":{"description":"The run with its items and lines. Needs view_ledger. Requires the accounting:read scope.","operationId":"getCompanyAccountingPrepaidsRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidRun"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, a project-scoped grant or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found or outside the entity scope"}},"summary":"Show an amortization run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/prepaids/runs/{id}/decision":{"post":{"description":"approve needs approve_journal and is refused (403) for the preparer; the run is recomputed and refused (409) if schedules or postings moved; the entry posts on the period end with both users recorded. cancel needs post_journal and a reason. A repeat returns the run. Audited. Requires the accounting:write scope.","operationId":"decisionCompanyAccountingPrepaidsRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"decision":{"additionalProperties":false,"properties":{"action":{"enum":["approve","cancel"]},"reason":{"maxLength":500,"minLength":3,"type":["string","null"]}},"required":["action"],"type":"object"}},"required":["decision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidRun"}}},"description":"Posted or cancelled"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing approve_journal (post_journal to cancel), the preparer approving, a project-scoped grant or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found or outside the entity scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not prepared any more, or the evidence moved"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or a closed period"}},"summary":"Approve and post, or cancel, a prepared run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/prepaids/runs/{id}/reverse":{"post":{"description":"Needs approve_journal. Reverses the run's entry on `date` with a reason; the period and entity can then be run again, and the next run catches the schedules up. A repeat with the same date and reason returns the run. Audited. Requires the accounting:write scope.","operationId":"reverseCompanyAccountingPrepaidsRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"reversal":{"additionalProperties":false,"properties":{"date":{"format":"date","type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["date","reason"],"type":"object"}},"required":["reversal"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidRun"}}},"description":"Reversed"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing approve_journal, a project-scoped grant or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found or outside the entity scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not posted, or reversed differently"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or a closed period"}},"summary":"Reverse a posted run","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/prepaids/schedules":{"get":{"description":"Schedules of the grant's entities, newest start first (at most 500), with posted amortization and the unamortized balance as of `as_of` (default today in the company's time zone). Needs view_ledger. Requires the accounting:read scope.","operationId":"listCompanyAccountingPrepaidsSchedules","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"kind","required":false,"schema":{"enum":["prepaid","deferred_revenue"]}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","cancelled","voided"]}},{"in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_PrepaidSchedule"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, a project-scoped grant, outside the entity scope or wrong company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid query"}},"summary":"List prepaid and deferred revenue schedules","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Needs post_journal. Manual: `funding_mode` entry (default) posts Dr balance / Cr `funding_offset_account_id` (Dr offset / Cr balance for deferred revenue) on `funding_date` (default the start date); existing records a balance already on the account (an opening balance). From a posted AP bill line (`ap_bill_line_id`): a line coded to the prepaid account funds the schedule itself (deferred in full); a line coded to an expense is reclassified to the prepaid account on `funding_date` (default the bill's posting date). Accounts default by category (1330 insurance and bonds, 1340 others; 6300, 5520, 6200, 6240, 6250 expense; 4150 revenue for deferred revenue). The funding date must be in a period open for the entity. `preview: true` returns the months and the funding lines and writes nothing (200). Audited. Honors Idempotency-Key. Requires the accounting:write scope.","operationId":"createCompanyAccountingPrepaidsSchedule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidScheduleCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidSchedulePreview"}}},"description":"Preview (nothing written)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidSchedule"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing post_journal, a project-scoped grant, outside the entity scope or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Bill line not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The bill line is already deferred"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body, accounts, allocation or terms, or a closed period"}},"summary":"Create a schedule, or defer an AP bill line","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/prepaids/schedules/{id}":{"get":{"description":"The schedule, its months in force (or of `version`, 0 = original) and every version. Needs view_ledger. Requires the accounting:read scope.","operationId":"getCompanyAccountingPrepaidsSchedule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"version","required":false,"schema":{"minimum":0,"type":"integer"}},{"in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidSchedule"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown version"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, a project-scoped grant or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found or outside the entity scope"}},"summary":"Show a schedule with its versions","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/prepaids/schedules/{id}/modifications":{"post":{"description":"Needs post_journal. Appends a version that keeps every month before the effective month. term_change (new_end_date) and amount_change (new_amount and offset_account_id; optional new_end_date) are prospective by default (the balance left at the effective date spreads over the revised remaining window) or catch_up (the revised terms from the start, the difference in the effective month). cancel stops amortization at the effective date and posts the unamortized balance: refund_amount to refund_account_id, the rest written off to the recognition account. Monthly and custom schedules change on the first of a month. Refused for a cancelled or voided schedule (409), when amortization is posted on or after the effective date (409; reverse that run), and for a closed period (422). `preview: true` writes nothing (200). Audited. Honors Idempotency-Key. Requires the accounting:write scope.","operationId":"createCompanyAccountingPrepaidsScheduleModification","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidModification"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidModificationPreview"}}},"description":"Preview (nothing written)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidSchedule"}}},"description":"Recorded: the schedule with its new version"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing post_journal, a project-scoped grant or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found or outside the entity scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Cancelled or voided, or amortization posted on or after the effective date"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or terms, or a closed period"}},"summary":"Modify or cancel a schedule","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/prepaids/schedules/{id}/void":{"post":{"description":"Needs post_journal. Reverses the funding entry (if any) on `date`. Refused (409) once amortization is posted (reverse the runs first) or after a modification (cancel instead). A repeat with the same date and reason returns the schedule. Audited. Requires the accounting:write scope.","operationId":"voidCompanyAccountingPrepaidsSchedule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"void":{"additionalProperties":false,"properties":{"date":{"format":"date","type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"}},"required":["date","reason"],"type":"object"}},"required":["void"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrepaidSchedule"}}},"description":"Voided"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing post_journal, a project-scoped grant or wrong company"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found or outside the entity scope"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Amortization posted, modified, or voided differently"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or a closed period"}},"summary":"Void a schedule entered by mistake","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/privacy/holds":{"get":{"description":"Every hold, newest first (500), active and released. Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:read.","operationId":"listCompanyAccountingPrivacyHolds","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_PrivacyHold"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"}},"summary":"List legal holds","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Places a hold on the company, an entity, a project, a vendor or an employee. Effective at once: retention skips every record it covers (an employee: their pay group's or a check's employer entity, projects they logged time on; a vendor: entities of its bills, payments and 1099 filings, projects on its bill lines). Any active hold also suspends outbox and job-error redaction. Audited. Honors Idempotency-Key. Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:write.","operationId":"createCompanyAccountingPrivacyHold","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"hold":{"$ref":"#/components/schemas/accounting_PrivacyHoldInput"}},"required":["hold"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrivacyHold"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Subject not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or a period below the class's hard floor"}},"summary":"Place a legal hold","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/privacy/holds/{id}/release":{"post":{"description":"Releases an active hold with a reason; audited. 409 when already released. Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:write.","operationId":"releaseCompanyAccountingPrivacyHold","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"release":{"additionalProperties":false,"properties":{"reason":{"maxLength":1000,"minLength":10,"type":"string"}},"required":["reason"],"type":"object"}},"required":["release"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrivacyHold"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No such hold"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already released"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or a period below the class's hard floor"}},"summary":"Release a legal hold","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/privacy/pii_inventory":{"get":{"description":"Every accounting column holding personal or sensitive identifying data: category, subject, protection (sealed, masked, plain, hashed) and governing retention class, plus pattern-matching columns classified as not personal data with the reason. Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:read.","operationId":"listCompanyAccountingPrivacyPiiInventory","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrivacyInventory"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"}},"summary":"PII inventory","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/privacy/requests":{"get":{"description":"Newest first (500). Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:read.","operationId":"listCompanyAccountingPrivacyRequests","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_PrivacyRequest"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"}},"summary":"List data subject requests","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Access, rectification or erasure about an employee or vendor contact; due 45 days after receipt (a proposal for counsel). Audited. Honors Idempotency-Key. Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:write.","operationId":"createCompanyAccountingPrivacyRequest","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"privacy_request":{"$ref":"#/components/schemas/accounting_PrivacyRequestInput"}},"required":["privacy_request"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrivacyRequest"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No such subject"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or a period below the class's hard floor"}},"summary":"Log a data subject request","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/privacy/requests/{id}":{"get":{"description":"With, while open, the live assessment of each data item: erasable, retained (with the reason: retention period, ledger integrity, legal hold, open item) or already minimized. Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:read.","operationId":"getCompanyAccountingPrivacyRequest","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrivacyRequest"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No such request"}},"summary":"Data subject request","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/privacy/requests/{id}/decision":{"post":{"description":"A different owner than the one who logged it. Access completes only after a subject export since the request was logged (409). Erasure clears exactly what the assessment marks erasable (sealed values past their approved period, optional vendor contact fields) and records what was retained and why; financial records, payroll records and the audit trail are never erased. Audited. Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:write.","operationId":"decisionCompanyAccountingPrivacyRequest","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"decision":{"additionalProperties":false,"properties":{"decision":{"enum":["complete","reject"]},"note":{"maxLength":2000,"minLength":10,"type":"string"}},"required":["decision","note"],"type":"object"}},"required":["decision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrivacyRequest"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No such request"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already decided or export missing"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or a period below the class's hard floor"}},"summary":"Complete or reject a data subject request","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/privacy/retention_register":{"get":{"description":"Every record class with its hard floor, proposed period and basis (proposals, not in force), the approved rule in force and any pending change, plus the latest 200 change requests. Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:read.","operationId":"listCompanyAccountingPrivacyRetentionRegister","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrivacyRegister"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"}},"summary":"Retention register","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/privacy/retention_register/changes":{"post":{"description":"Requests a period for a record class. Refused below the class's hard floor (422; the database also refuses it) and while another change for the class is pending (409). Not in force until a different owner approves it. Audited. Honors Idempotency-Key. Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:write.","operationId":"createCompanyAccountingPrivacyRetentionRegisterChange","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"change":{"$ref":"#/components/schemas/accounting_PrivacyRuleChangeInput"}},"required":["change"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrivacyRuleChange"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A change for this class is pending"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or a period below the class's hard floor"}},"summary":"Request a retention period change (maker)","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/privacy/retention_register/changes/{id}/decision":{"post":{"description":"A different unrestricted owner than the requester approves (the rule takes effect, version + 1) or rejects a pending change; 403 for your own request, 409 once decided. Audited with before and after. Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:write.","operationId":"decisionCompanyAccountingPrivacyRetentionRegisterChange","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"decision":{"additionalProperties":false,"properties":{"decision":{"enum":["approve","reject"]},"note":{"maxLength":1000,"minLength":3,"type":"string"}},"required":["decision"],"type":"object"}},"required":["decision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrivacyRuleChange"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No such change"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Already decided"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or a period below the class's hard floor"}},"summary":"Approve or reject a retention change (checker)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/privacy/retention_runs":{"get":{"description":"Latest 50 previews and executions with per-class summaries. Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:read.","operationId":"listCompanyAccountingPrivacyRetentionRuns","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_PrivacyRun"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"}},"summary":"List retention runs","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Computes and records what retention would change now (or at the end of as_of, not in the future): per class, records past the approved period, those kept by holds and those that would change, with a plan hash. Nothing is changed. Honors Idempotency-Key. Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:write.","operationId":"createCompanyAccountingPrivacyRetentionRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"preview":{"additionalProperties":false,"properties":{"as_of":{"format":"date","type":"string"}},"type":"object"}},"required":["preview"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrivacyRun"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or a period below the class's hard floor"}},"summary":"Preview retention (dry run)","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/privacy/retention_runs/{id}":{"get":{"description":"Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:read.","operationId":"getCompanyAccountingPrivacyRetentionRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrivacyRun"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No such run"}},"summary":"Retention run with its evidence report","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/privacy/retention_runs/{id}/execute":{"post":{"description":"Recomputes the plan at the preview's date; it must hash to the preview (409 otherwise: preview again). Then applies it in batches that re-check eligibility and holds under row locks, and records the execution evidence (applied ids against the plan, ledger fingerprint, integrity checks and audit count before and after). A preview executes once and within 24 hours (409). Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:write.","operationId":"executeCompanyAccountingPrivacyRetentionRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrivacyRun"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No such preview"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Plan changed, preview stale or already executed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or a period below the class's hard floor"}},"summary":"Execute a retention preview","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/privacy/subject_exports":{"post":{"description":"Employee or vendor contact: identity, contact, bank (masked), payroll or AP history, portal users, the audit trail about them (actions only), active holds covering them and the retention disposition of each data item. reveal=true decrypts sealed SSN/TIN/bank values for this response only (rate limited). Every export is audited with the sections and the reveal flag, never the values. Creates no record. Needs an unrestricted company owner (company-wide access, every flag including view_payroll_pii and manage_grants) and step-up: a token needs accounting:step_up. Requires accounting:write.","operationId":"createCompanyAccountingPrivacySubjectExport","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"subject_export":{"additionalProperties":false,"properties":{"request_id":{"minimum":1,"type":"integer"},"reveal":{"default":false,"type":"boolean"},"subject_id":{"minimum":1,"type":"integer"},"subject_type":{"enum":["employee","vendor"]}},"required":["subject_type","subject_id"],"type":"object"}},"required":["subject_export"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_PrivacySubjectExport"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token, or step-up required for a session"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No owner access, wrong company, token without the required scope, step-up or MFA missing, or maker-checker refused"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No such subject or request"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body or a period below the class's hard floor"},"429":{"description":"Export rate limit"}},"summary":"Export the personal data held about a subject","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/recurring_journals":{"get":{"description":"Recurring journal templates in the caller's entities, active first by next run date. Paginated (page/per_page; Total and Link headers). Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"listCompanyAccountingRecurringJournals","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_RecurringJournal"},"type":"array"}}},"description":"OK","headers":{"Link":{"description":"first/prev/next/last page links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List recurring journals","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Saves a template that generates a journal entry on each run date (daily scheduler, as of today in the company time zone). Lines must balance. Starts unapproved; an auto_post template posts only after a second person approves it, and generates drafts until then. Needs post_journal. Requires the accounting:write scope.","operationId":"createCompanyAccountingRecurringJournal","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"recurring_journal":{"additionalProperties":false,"properties":{"auto_post":{"type":"boolean"},"day_of_month":{"maximum":31,"minimum":1,"type":["integer","null"]},"end_date":{"format":"date","type":["string","null"]},"entity_id":{"minimum":1,"type":["integer","null"]},"frequency":{"enum":["weekly","monthly","quarterly","yearly"]},"interval":{"maximum":36,"minimum":1,"type":"integer"},"is_active":{"type":"boolean"},"lines":{"items":{"additionalProperties":false,"properties":{"account_id":{"minimum":1,"type":"integer"},"cost_code_id":{"minimum":1,"type":["integer","null"]},"cost_type_id":{"minimum":1,"type":["integer","null"]},"credit":{"oneOf":[{"type":"string"},{"type":"number"}]},"debit":{"oneOf":[{"type":"string"},{"type":"number"}]},"department_id":{"minimum":1,"type":["integer","null"]},"dimension_value_ids":{"description":"Custom dimension values (dimension value ids of this company), copied onto each generated entry's line.","items":{"minimum":1,"type":"integer"},"maxItems":20,"type":["array","null"]},"memo":{"type":["string","null"]},"project_id":{"minimum":1,"type":["integer","null"]}},"required":["account_id"],"type":"object"},"maxItems":500,"minItems":2,"type":"array"},"memo":{"type":["string","null"]},"name":{"maxLength":200,"minLength":1,"type":"string"},"reverse_after_days":{"maximum":366,"minimum":1,"type":["integer","null"]},"start_date":{"format":"date","type":"string"}},"required":["name","start_date","lines"],"type":"object"}},"required":["recurring_journal"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RecurringJournal"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Create a recurring journal","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/recurring_journals/{id}":{"delete":{"description":"Removes a template that never generated an entry; otherwise deactivate it (is_active false). Needs post_journal. Requires the accounting:write scope.","operationId":"deleteCompanyAccountingRecurringJournal","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Delete a recurring journal","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"get":{"description":"One template with its lines. Requires the accounting:read scope. Entity-wide: a project-scoped (project_manager_view) grant gets 403.","operationId":"getCompanyAccountingRecurringJournal","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RecurringJournal"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"}},"summary":"Show a recurring journal","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Edits a template. Any edit clears its approval, so an auto_post template needs a second-person re-approval before it posts again. Sending lines replaces them. The start date is fixed once the template has run. Needs post_journal. Requires the accounting:write scope.","operationId":"updateCompanyAccountingRecurringJournal","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"recurring_journal":{"additionalProperties":false,"properties":{"auto_post":{"type":"boolean"},"day_of_month":{"maximum":31,"minimum":1,"type":["integer","null"]},"end_date":{"format":"date","type":["string","null"]},"entity_id":{"minimum":1,"type":["integer","null"]},"frequency":{"enum":["weekly","monthly","quarterly","yearly"]},"interval":{"maximum":36,"minimum":1,"type":"integer"},"is_active":{"type":"boolean"},"lines":{"items":{"additionalProperties":false,"properties":{"account_id":{"minimum":1,"type":"integer"},"cost_code_id":{"minimum":1,"type":["integer","null"]},"cost_type_id":{"minimum":1,"type":["integer","null"]},"credit":{"oneOf":[{"type":"string"},{"type":"number"}]},"debit":{"oneOf":[{"type":"string"},{"type":"number"}]},"department_id":{"minimum":1,"type":["integer","null"]},"dimension_value_ids":{"description":"Custom dimension values (dimension value ids of this company), copied onto each generated entry's line.","items":{"minimum":1,"type":"integer"},"maxItems":20,"type":["array","null"]},"memo":{"type":["string","null"]},"project_id":{"minimum":1,"type":["integer","null"]}},"required":["account_id"],"type":"object"},"maxItems":500,"minItems":2,"type":"array"},"memo":{"type":["string","null"]},"name":{"maxLength":200,"minLength":1,"type":"string"},"reverse_after_days":{"maximum":366,"minimum":1,"type":["integer","null"]},"start_date":{"format":"date","type":"string"}},"type":"object"}},"required":["recurring_journal"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RecurringJournal"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Update a recurring journal","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/recurring_journals/{id}/approve":{"post":{"description":"Records a second-person approval. The creator and every editor of the template can never approve it (403). Needs approve_journal. Requires the accounting:write scope.","operationId":"approveCompanyAccountingRecurringJournal","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_RecurringJournal"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Approve a recurring journal","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/report_definitions":{"get":{"description":"Definitions the caller may see: their own, shared with the company, and shared with their grant role. Paginated (Total, Per-Page, Link). Requires accounting:read.","operationId":"listCompanyAccountingReportDefinitions","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Only this data source","in":"query","name":"source","schema":{"type":"string"}},{"description":"Page","in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"description":"Page size","in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ReportDefinition"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"}},"summary":"List report definitions","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":true},"post":{"description":"Saves version 1, owned by the caller, private or shared with roles or the whole company. The spec is checked against the source's columns; data access is checked whenever it runs. Honors Idempotency-Key. Requires accounting:write.","operationId":"createCompanyAccountingReportDefinition","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"report_definition":{"$ref":"#/components/schemas/accounting_ReportDefinitionInput"}},"required":["report_definition"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ReportDefinition"}}},"description":"Created"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown library report or budget"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid spec (unknown column, grouping or comparison), name or sharing"}},"summary":"Save a report definition","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/report_definitions/preview":{"post":{"description":"Runs a spec without saving it (the builder's live preview), scoped by the caller's grant. Reads only: accounting:read is enough. Query parameters override the spec's saved parameters.","operationId":"createCompanyAccountingReportDefinitionsPreview","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Balance date (as-of sources); overrides the saved parameter","in":"query","name":"as_of","schema":{"format":"date","type":"string"}},{"description":"Start of the activity range; overrides the saved parameter","in":"query","name":"from","schema":{"format":"date","type":"string"}},{"description":"End of the activity range; overrides the saved parameter","in":"query","name":"to","schema":{"format":"date","type":"string"}},{"description":"Entity (must be inside the caller's grant)","in":"query","name":"entity_id","schema":{"minimum":1,"type":"integer"}},{"description":"Job (must be inside the caller's grant)","in":"query","name":"project_id","schema":{"minimum":1,"type":"integer"}},{"description":"Department","in":"query","name":"department_id","schema":{"minimum":1,"type":"integer"}},{"description":"GL budget for compare=budget","in":"query","name":"budget_id","schema":{"minimum":1,"type":"integer"}},{"description":"Aging basis for open-item sources","in":"query","name":"basis","schema":{"enum":["due","document"]}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"report_definition":{"properties":{"spec":{"$ref":"#/components/schemas/accounting_ReportDefinitionSpec"}},"required":["spec"],"type":"object"}},"required":["report_definition"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BuilderReportDoc"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a source the grant cannot read (AP/AR, cash or budget for a project-scoped grant)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Entity, job, budget or report outside the grant or company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid spec or parameter, or too many detail lines"}},"summary":"Preview an unsaved definition","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/report_definitions/sources":{"get":{"description":"The whitelisted sources (GL lines, trial balance, cash, AP/AR open items, job cost, job cost entries, library reports) with their columns, groupable dimensions, amounts and comparisons. Requires accounting:read.","operationId":"listCompanyAccountingReportDefinitionsSources","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ReportSource"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"}},"summary":"Report builder data sources","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/report_definitions/{id}":{"delete":{"description":"Owner or company administrator only; its versions go with it. Requires accounting:write.","operationId":"deleteCompanyAccountingReportDefinition","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not the owner, or no accounting access"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found or not shared with the caller"}},"summary":"Delete a report definition","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"get":{"description":"A definition the caller may see (404 otherwise). Requires accounting:read.","operationId":"getCompanyAccountingReportDefinition","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ReportDefinition"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found or not shared with the caller"}},"summary":"Show a report definition","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Owner or company administrator only. Every save is a new version (the previous one stays in versions). Requires accounting:write.","operationId":"updateCompanyAccountingReportDefinition","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"report_definition":{"properties":{"description":{"maxLength":500,"type":["string","null"]},"name":{"maxLength":120,"minLength":1,"type":"string"},"shared_roles":{"items":{"enum":["owner","controller","accountant","ap_clerk","ar_clerk","payroll_admin","project_manager_view","auditor_readonly"]},"type":"array"},"spec":{"$ref":"#/components/schemas/accounting_ReportDefinitionSpec"},"visibility":{"enum":["private","role","company"]}},"type":"object"}},"required":["report_definition"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ReportDefinition"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not the owner, or no accounting access"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found or not shared with the caller"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid spec, name or sharing"}},"summary":"Update a report definition","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/report_definitions/{id}/export":{"get":{"description":"The run's output as CSV, XLSX or PDF, with the report library's encoders, per-user rate limit and export audit. Requires accounting:read.","operationId":"listCompanyAccountingReportDefinitionExport","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"File format (default csv)","in":"query","name":"format","schema":{"enum":["csv","xlsx","pdf"]}},{"description":"Balance date (as-of sources); overrides the saved parameter","in":"query","name":"as_of","schema":{"format":"date","type":"string"}},{"description":"Start of the activity range; overrides the saved parameter","in":"query","name":"from","schema":{"format":"date","type":"string"}},{"description":"End of the activity range; overrides the saved parameter","in":"query","name":"to","schema":{"format":"date","type":"string"}},{"description":"Entity (must be inside the caller's grant)","in":"query","name":"entity_id","schema":{"minimum":1,"type":"integer"}},{"description":"Job (must be inside the caller's grant)","in":"query","name":"project_id","schema":{"minimum":1,"type":"integer"}},{"description":"Department","in":"query","name":"department_id","schema":{"minimum":1,"type":"integer"}},{"description":"GL budget for compare=budget","in":"query","name":"budget_id","schema":{"minimum":1,"type":"integer"}},{"description":"Aging basis for open-item sources","in":"query","name":"basis","schema":{"enum":["due","document"]}},{"description":"Run an earlier saved version","in":"query","name":"version","schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"type":"string"}}},"description":"File"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found or not shared with the caller"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown format or invalid parameter"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Export rate limit reached (Retry-After)"}},"summary":"Export a report definition","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/report_definitions/{id}/run":{"get":{"description":"Runs the definition as the caller: their grant's entities and projects scope every row, whoever owns or shared it. Query parameters override the saved ones. `checks` prove the grouped rows add back to the base total (and the comparison column to its own base). Requires accounting:read.","operationId":"listCompanyAccountingReportDefinitionRun","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Balance date (as-of sources); overrides the saved parameter","in":"query","name":"as_of","schema":{"format":"date","type":"string"}},{"description":"Start of the activity range; overrides the saved parameter","in":"query","name":"from","schema":{"format":"date","type":"string"}},{"description":"End of the activity range; overrides the saved parameter","in":"query","name":"to","schema":{"format":"date","type":"string"}},{"description":"Entity (must be inside the caller's grant)","in":"query","name":"entity_id","schema":{"minimum":1,"type":"integer"}},{"description":"Job (must be inside the caller's grant)","in":"query","name":"project_id","schema":{"minimum":1,"type":"integer"}},{"description":"Department","in":"query","name":"department_id","schema":{"minimum":1,"type":"integer"}},{"description":"GL budget for compare=budget","in":"query","name":"budget_id","schema":{"minimum":1,"type":"integer"}},{"description":"Aging basis for open-item sources","in":"query","name":"basis","schema":{"enum":["due","document"]}},{"description":"Run an earlier saved version","in":"query","name":"version","schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_BuilderReportDoc"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a source the grant cannot read (AP/AR, cash or budget for a project-scoped grant)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found, not shared with the caller, or an entity, job or budget outside the grant"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid parameter, or too many detail lines"}},"summary":"Run a report definition","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/report_definitions/{id}/versions":{"get":{"description":"Every saved version, newest first. Requires accounting:read.","operationId":"listCompanyAccountingReportDefinitionVersions","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ReportDefinitionVersion"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a token without the required scope"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found or not shared with the caller"}},"summary":"Report definition versions","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/reports":{"get":{"description":"Every report with its group and accepted parameters. Requires the accounting:read scope and an accounting grant.","operationId":"listCompanyAccountingReports","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_ReportDef"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a project-scoped (project_manager_view) grant on an entity-wide report (AR/AP aging, AR overview, subledger reconciliation, ledger integrity, CECL allowance, asset roll-forward, audit log)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown report, or an entity or account outside this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed parameter"}},"summary":"Report library","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/reports/{report_key}":{"get":{"description":"Balance sheet, income statement (comparative or by month, quarter, entity, department or job), indirect cash flow, trial balance worksheet (unadjusted, adjustments, adjusted, closing, post-closing), GL detail, journal, AR/AP aging as of a date, job profitability, subledger reconciliation, the integrity check, the surety package (completed contracts, WIP to GL reconciliation, backlog roll-forward) and the CECL allowance. The cash flow statement ends with supplemental interest and income taxes paid and the noncash schedule (entries tagged noncash); the balance sheet presents receivables net of the allowance, and the loss provision and the current portion of long-term debt on their own lines. `checks` are the report's own proofs (assets = liabilities + equity, debits = credits, cash flow ties to cash). Requires accounting:read.","operationId":"getCompanyAccountingReport","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Report key","in":"path","name":"report_key","required":true,"schema":{"enum":["balance_sheet","income_statement","cash_flow","equity_roll_forward","trial_balance","general_ledger","journal","ar_aging","ar_overview","cash_receipts","ar_collection_effectiveness","ar_dso","ar_promise_kept_rate","ar_dispute_aging","sales_tax_liability","ap_aging","check_register","cash_requirements","match_exception_aging","job_cost_status","job_cost_detail","committed_cost","retainage_by_job","job_profitability","payroll_register","subledger_reconciliation","integrity_check","manual_je_review","sod_conflicts","access_sod","vendor_changes","pii_reveals","audit_log","fixed_asset_roll_forward","reconciliation_status","close_progress","flux_analysis","cutover_reconciliation","wip_schedule","completed_contracts","wip_gl_reconciliation","backlog_roll_forward","cecl_allowance"]}},{"description":"Balance date (default `to`, else today)","in":"query","name":"as_of","schema":{"format":"date","type":"string"}},{"description":"Start of the activity range (default the start of the fiscal year holding `to`)","in":"query","name":"from","schema":{"format":"date","type":"string"}},{"description":"End of the activity range (default today)","in":"query","name":"to","schema":{"format":"date","type":"string"}},{"description":"Trial balance worksheet: start of the adjustments and closing window (default the start of the fiscal period holding `as_of`); income and expense adjustments before the fiscal year start roll into retained earnings. For trial_balance a `from` sent without `adj_from` is read as `adj_from` (deprecated alias)","in":"query","name":"adj_from","schema":{"format":"date","type":"string"}},{"description":"Comparative column (balance sheet, income statement, cash flow; the cash flow's prior column has its own opening balances). `budget` (income statement only) adds Budget and Variance (actual - budget, per account and row) columns for `budget_id`.","in":"query","name":"compare","schema":{"enum":["none","prior_period","prior_year","budget"]}},{"description":"With compare=budget: the GL budget version to compare with","in":"query","name":"budget_id","schema":{"minimum":1,"type":"integer"}},{"description":"Income statement columns; the balance sheet takes total or entity. Entity columns end with Eliminations (the elimination entity) and Consolidated. Month and quarter views allow at most 36 periods; narrow the date range or choose total columns for longer ranges. Entity, department and job views show at most 50 columns: past that, the values with the least revenue are combined in an All other column.","in":"query","name":"columns","schema":{"enum":["total","month","quarter","entity","department","project","dimension"]}},{"description":"One entity (within the grant entities)","in":"query","name":"entity_id","schema":{"minimum":1,"type":"integer"}},{"description":"One job","in":"query","name":"project_id","schema":{"minimum":1,"type":"integer"}},{"description":"One department","in":"query","name":"department_id","schema":{"minimum":1,"type":"integer"}},{"description":"User-defined dimension code (or id) to group by: trial_balance becomes one net column per value plus No <dimension> and Total (checked against the ungrouped trial balance), general_ledger adds the line's value as a column, and income_statement with columns=dimension pivots by value.","in":"query","name":"dimension","schema":{"pattern":"^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,19}$","type":"string"}},{"description":"Roll grouped values up to this hierarchy level (1 = top-level values); omitted = the posted value.","in":"query","name":"dimension_level","schema":{"maximum":20,"minimum":1,"type":"integer"}},{"description":"Comma-separated dimension value ids: lines carrying one of them or a child value (values of one dimension OR, dimensions AND).","in":"query","name":"dimension_value_ids","schema":{"pattern":"^\\d{1,10}(,\\d{1,10}){0,49}$","type":"string"}},{"description":"One account (general ledger)","in":"query","name":"account_id","schema":{"minimum":1,"type":"integer"}},{"description":"One journal (journal report)","in":"query","name":"journal","schema":{"enum":["GJ","AP","AR","PR","CM","JC","FA","CL","IC","WIP"]}},{"description":"Aging basis","in":"query","name":"basis","schema":{"enum":["due","document"]}},{"description":"Also show rows with no balance","in":"query","name":"include_zero","schema":{"enum":["true","false"]}},{"description":"Job profitability: job to date through `to` (ignores `from`)","in":"query","name":"jtd","schema":{"enum":["true","false"],"type":"string"}},{"description":"Audit log: only events by this user","in":"query","name":"actor_id","schema":{"minimum":1,"type":"integer"}},{"description":"Audit log: only events on this accounting record type (e.g. AcctAccount)","in":"query","name":"item_type","schema":{"pattern":"^[A-Za-z]{1,64}$","type":"string"}},{"description":"Audit log: only events with this action (e.g. updated)","in":"query","name":"action","schema":{"pattern":"^[a-z_]{1,64}$","type":"string"}},{"description":"Balance sheet and income statement: group account rows under their parent account with a subtotal row","in":"query","name":"rollup","schema":{"enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_ReportDoc"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a project-scoped (project_manager_view) grant on an entity-wide report (AR/AP aging, AR overview, subledger reconciliation, ledger integrity, CECL allowance, asset roll-forward, audit log)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown report, or an entity or account outside this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed parameter"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Company heavy-read budget spent (ACCT_HEAVY_BUDGET units per minute); retry after the Retry-After seconds"}},"summary":"Run a report","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/reports/{report_key}/export":{"get":{"description":"The same report as a CSV, XLSX or PDF download. Rate-limited per user (429 with Retry-After) and recorded in the audit log. Requires the accounting:read scope.","operationId":"listCompanyAccountingReportExport","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Report key","in":"path","name":"report_key","required":true,"schema":{"enum":["balance_sheet","income_statement","cash_flow","equity_roll_forward","trial_balance","general_ledger","journal","ar_aging","ar_overview","cash_receipts","ar_collection_effectiveness","ar_dso","ar_promise_kept_rate","ar_dispute_aging","sales_tax_liability","ap_aging","check_register","cash_requirements","match_exception_aging","job_cost_status","job_cost_detail","committed_cost","retainage_by_job","job_profitability","payroll_register","subledger_reconciliation","integrity_check","manual_je_review","sod_conflicts","access_sod","vendor_changes","pii_reveals","audit_log","fixed_asset_roll_forward","reconciliation_status","close_progress","flux_analysis","cutover_reconciliation","wip_schedule","completed_contracts","wip_gl_reconciliation","backlog_roll_forward","cecl_allowance"]}},{"description":"File format (default csv)","in":"query","name":"format","schema":{"enum":["csv","xlsx","pdf"]}},{"description":"Balance date (default `to`, else today)","in":"query","name":"as_of","schema":{"format":"date","type":"string"}},{"description":"Start of the activity range (default the start of the fiscal year holding `to`)","in":"query","name":"from","schema":{"format":"date","type":"string"}},{"description":"End of the activity range (default today)","in":"query","name":"to","schema":{"format":"date","type":"string"}},{"description":"Trial balance worksheet: start of the adjustments and closing window (default the start of the fiscal period holding `as_of`); income and expense adjustments before the fiscal year start roll into retained earnings. For trial_balance a `from` sent without `adj_from` is read as `adj_from` (deprecated alias)","in":"query","name":"adj_from","schema":{"format":"date","type":"string"}},{"description":"Comparative column (balance sheet, income statement, cash flow; the cash flow's prior column has its own opening balances). `budget` (income statement only) adds Budget and Variance (actual - budget, per account and row) columns for `budget_id`.","in":"query","name":"compare","schema":{"enum":["none","prior_period","prior_year","budget"]}},{"description":"With compare=budget: the GL budget version to compare with","in":"query","name":"budget_id","schema":{"minimum":1,"type":"integer"}},{"description":"Income statement columns; the balance sheet takes total or entity. Entity columns end with Eliminations (the elimination entity) and Consolidated. Month and quarter views allow at most 36 periods; narrow the date range or choose total columns for longer ranges. Entity, department and job views show at most 50 columns: past that, the values with the least revenue are combined in an All other column.","in":"query","name":"columns","schema":{"enum":["total","month","quarter","entity","department","project","dimension"]}},{"description":"One entity (within the grant entities)","in":"query","name":"entity_id","schema":{"minimum":1,"type":"integer"}},{"description":"One job","in":"query","name":"project_id","schema":{"minimum":1,"type":"integer"}},{"description":"One department","in":"query","name":"department_id","schema":{"minimum":1,"type":"integer"}},{"description":"User-defined dimension code (or id) to group by: trial_balance becomes one net column per value plus No <dimension> and Total (checked against the ungrouped trial balance), general_ledger adds the line's value as a column, and income_statement with columns=dimension pivots by value.","in":"query","name":"dimension","schema":{"pattern":"^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,19}$","type":"string"}},{"description":"Roll grouped values up to this hierarchy level (1 = top-level values); omitted = the posted value.","in":"query","name":"dimension_level","schema":{"maximum":20,"minimum":1,"type":"integer"}},{"description":"Comma-separated dimension value ids: lines carrying one of them or a child value (values of one dimension OR, dimensions AND).","in":"query","name":"dimension_value_ids","schema":{"pattern":"^\\d{1,10}(,\\d{1,10}){0,49}$","type":"string"}},{"description":"One account (general ledger)","in":"query","name":"account_id","schema":{"minimum":1,"type":"integer"}},{"description":"One journal (journal report)","in":"query","name":"journal","schema":{"enum":["GJ","AP","AR","PR","CM","JC","FA","CL","IC","WIP"]}},{"description":"Aging basis","in":"query","name":"basis","schema":{"enum":["due","document"]}},{"description":"Also show rows with no balance","in":"query","name":"include_zero","schema":{"enum":["true","false"]}},{"description":"Job profitability: job to date through `to` (ignores `from`)","in":"query","name":"jtd","schema":{"enum":["true","false"],"type":"string"}},{"description":"Audit log: only events by this user","in":"query","name":"actor_id","schema":{"minimum":1,"type":"integer"}},{"description":"Audit log: only events on this accounting record type (e.g. AcctAccount)","in":"query","name":"item_type","schema":{"pattern":"^[A-Za-z]{1,64}$","type":"string"}},{"description":"Audit log: only events with this action (e.g. updated)","in":"query","name":"action","schema":{"pattern":"^[a-z_]{1,64}$","type":"string"}},{"description":"Balance sheet and income statement: group account rows under their parent account with a subtotal row","in":"query","name":"rollup","schema":{"enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"type":"string"}}},"description":"The file"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, wrong company, or a project-scoped (project_manager_view) grant on an entity-wide report (AR/AP aging, AR overview, subledger reconciliation, ledger integrity, CECL allowance, asset roll-forward, audit log)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown report, or an entity or account outside this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed parameter"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Export limit reached, or the company heavy-read budget is spent; retry after the Retry-After seconds"}},"summary":"Export a report","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/ar_invoices/{id}/determinations":{"get":{"description":"One row per line and job-site jurisdiction: taxability, base, rate, tax, certificate and liability account. AR read access (project-scoped grants refused). Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxArInvoiceDeterminations","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxDetermination"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"An invoice's sales tax determinations","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/category_mappings":{"get":{"description":"AP lines without their own tax category take their cost type's. Any accounting grant. Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxCategoryMappings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxMapping"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"List cost type taxability categories","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"category null clears it (response null). Needs manage_coa; audited. Requires the accounting:write scope.","operationId":"replaceCompanyAccountingSalesTaxCategoryMappings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"mapping":{"additionalProperties":false,"properties":{"category":{"enum":["material","fixture","labor","equipment",null],"type":["string","null"]},"cost_type_id":{"minimum":1,"type":"integer"}},"required":["cost_type_id","category"],"type":"object"}},"required":["mapping"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/accounting_SalesTaxMapping"},{"type":"null"}]}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Set a cost type taxability category","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/certificates":{"get":{"description":"Customer exemption or resale certificates (exempt their invoices) and resale certificates given to vendors. Any accounting grant; a project-scoped grant sees company-wide and its projects' certificates. Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxCertificates","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter by party type","in":"query","name":"party_type","required":false,"schema":{"enum":["customer","vendor"],"type":"string"}},{"description":"Filter by party","in":"query","name":"party_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxCertificate"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"List exemption and resale certificates","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Covers its jurisdiction and descendants, optionally one project, from effective_from to expires_on. Needs manage_coa; audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingSalesTaxCertificate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"certificate":{"additionalProperties":false,"properties":{"certificate_number":{"minLength":1,"type":"string"},"effective_from":{"format":"date","type":"string"},"expires_on":{"format":"date","type":["string","null"]},"jurisdiction_id":{"minimum":1,"type":"integer"},"kind":{"enum":["exemption","resale"],"type":"string"},"party_id":{"minimum":1,"type":"integer"},"party_type":{"enum":["customer","vendor"],"type":"string"},"project_id":{"type":["integer","null"]},"reason":{"minLength":3,"type":"string"}},"required":["party_type","party_id","kind","jurisdiction_id","certificate_number","reason","effective_from"],"type":"object"}},"required":["certificate"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxCertificate"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Add a certificate","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/certificates/{id}":{"get":{"description":"Any accounting grant. Requires the accounting:read scope.","operationId":"getCompanyAccountingSalesTaxCertificate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxCertificate"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Show a certificate","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"expires_on renews; revoke_reason revokes (final). Needs manage_coa; audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingSalesTaxCertificate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"certificate":{"additionalProperties":false,"properties":{"expires_on":{"format":"date","type":["string","null"]},"revoke_reason":{"minLength":3,"type":"string"}},"required":[],"type":"object"}},"required":["certificate"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxCertificate"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Renew or revoke a certificate","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/filings":{"get":{"description":"Project-scoped grants refused; entity-scoped grants see their entities. Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxFilings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter by jurisdiction","in":"query","name":"jurisdiction_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxFiling"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"List sales tax returns","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"For a filing jurisdiction (with those that file with it), entity and whole-month period matching its frequency: figures frozen with an evidence hash. The same figures return the prepared return (200); new figures supersede it. A filed period needs amendment true. Needs post_journal. Requires the accounting:write scope.","operationId":"createCompanyAccountingSalesTaxFiling","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"filing":{"additionalProperties":false,"properties":{"amendment":{"type":"boolean"},"entity_id":{"minimum":1,"type":"integer"},"jurisdiction_id":{"minimum":1,"type":"integer"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"}},"required":["entity_id","jurisdiction_id","period_start","period_end"],"type":"object"}},"required":["filing"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxFiling"}}},"description":"Existing record returned (same request)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxFiling"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Prepare a sales tax return","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/filings/{id}":{"get":{"description":"stale is true when the period's figures changed since it was prepared or filed. Requires the accounting:read scope.","operationId":"getCompanyAccountingSalesTaxFiling","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxFiling"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Show a sales tax return","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/filings/{id}/decision":{"post":{"description":"mark_filed (approve_journal, never the preparer) recomputes the figures (409 if they moved) and records filed_on and the confirmation number; cancel (post_journal) needs a reason. No e-filing. Requires the accounting:write scope.","operationId":"decisionCompanyAccountingSalesTaxFiling","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"decision":{"additionalProperties":false,"properties":{"action":{"enum":["mark_filed","cancel"],"type":"string"},"confirmation_number":{"minLength":1,"type":"string"},"filed_on":{"format":"date","type":"string"},"reason":{"minLength":3,"type":"string"}},"required":["action"],"type":"object"}},"required":["decision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxFiling"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Mark a return filed, or cancel it","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/filings/{id}/export":{"get":{"description":"Jurisdiction and rate lines, exempt certificates and the GL tie-out of a return. Text only; no e-filing. Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxFilingExport","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"CSV"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Filing-prep export (CSV)","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/filings/{id}/payment":{"post":{"description":"A posted journal entry, or a posted AP bill's entry, in the return's entity that debits its liability accounts. One entry pays one return. Needs approve_journal; audited. Requires the accounting:write scope.","operationId":"paymentCompanyAccountingSalesTaxFiling","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"payment":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"},"source":{"enum":["journal_entry","ap_bill"],"type":"string"}},"required":["source","id"],"type":"object"}},"required":["payment"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxFiling"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Link a return's payment","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/jurisdiction_sets":{"get":{"description":"The jurisdictions that tax one place, chosen per job site. Any accounting grant. Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxJurisdictionSets","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxJurisdictionSet"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"List jurisdiction sets","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Jurisdictions of one state. Needs manage_coa; audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingSalesTaxJurisdictionSet","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"jurisdiction_set":{"additionalProperties":false,"properties":{"code":{"pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]{0,39}$","type":"string"},"description":{"type":["string","null"]},"jurisdiction_ids":{"items":{"minimum":1,"type":"integer"},"minItems":1,"type":"array"},"name":{"minLength":1,"type":"string"}},"required":["code","name","jurisdiction_ids"],"type":"object"}},"required":["jurisdiction_set"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxJurisdictionSet"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Add a jurisdiction set","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/jurisdiction_sets/{id}":{"get":{"description":"Any accounting grant. Requires the accounting:read scope.","operationId":"getCompanyAccountingSalesTaxJurisdictionSet","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxJurisdictionSet"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Show a jurisdiction set","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Documents already taxed keep their jurisdictions. Needs manage_coa; audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingSalesTaxJurisdictionSet","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"jurisdiction_set":{"additionalProperties":false,"properties":{"description":{"type":["string","null"]},"jurisdiction_ids":{"items":{"minimum":1,"type":"integer"},"minItems":1,"type":"array"},"name":{"type":"string"}},"required":[],"type":"object"}},"required":["jurisdiction_set"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxJurisdictionSet"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Change a jurisdiction set","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/jurisdictions":{"get":{"description":"State, county, city and special-district jurisdictions the company maintains. Any accounting grant. Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxJurisdictions","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter by state","in":"query","name":"state_code","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxJurisdiction"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"List tax jurisdictions","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Needs manage_coa over every entity; audited. State code ZZ marks fictional demo data. Requires the accounting:write scope.","operationId":"createCompanyAccountingSalesTaxJurisdiction","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"jurisdiction":{"$ref":"#/components/schemas/accounting_SalesTaxJurisdictionInput"}},"required":["jurisdiction"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxJurisdiction"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Add a tax jurisdiction","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/jurisdictions/{id}":{"get":{"description":"With its rate history, newest first. Any accounting grant. Requires the accounting:read scope.","operationId":"getCompanyAccountingSalesTaxJurisdiction","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxJurisdictionDetail"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Show a tax jurisdiction","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Name, parent, files-with, filing frequency, liability accounts, active. Needs manage_coa; audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingSalesTaxJurisdiction","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"jurisdiction":{"$ref":"#/components/schemas/accounting_SalesTaxJurisdictionUpdate"}},"required":["jurisdiction"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxJurisdiction"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Change a tax jurisdiction","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/liability":{"get":{"description":"Tax collected and use tax accrued from GL lines tagged to determinations; taxable, exempt (with certificates) and nontaxable bases from documents posted or reversed in the period; rates; and the GL tie-out per liability account. Project-scoped grants refused. Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxLiability","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Period start","in":"query","name":"from","required":true,"schema":{"format":"date","type":"string"}},{"description":"Period end","in":"query","name":"to","required":true,"schema":{"format":"date","type":"string"}},{"description":"Entity","in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"A filing jurisdiction and those that file with it","in":"query","name":"jurisdiction_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxLiability"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Sales and use tax liability by jurisdiction","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/project_sites":{"get":{"description":"Each project's job-site address and chosen jurisdiction set. A project-scoped grant sees its projects only. Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxProjectSites","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxSite"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"List job sites","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/project_sites/{id}":{"get":{"description":"{id} is the project id. Requires the accounting:read scope.","operationId":"getCompanyAccountingSalesTaxProjectSite","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxSite"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Show a project's job site","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"The address as entered and the jurisdiction set the user chose (no geocoding), with the contract type and nature the rules key on. Needs manage_coa; audited. Requires the accounting:write scope.","operationId":"replaceCompanyAccountingSalesTaxProjectSite","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"site":{"additionalProperties":false,"properties":{"address_line1":{"minLength":1,"type":"string"},"city":{"minLength":1,"type":"string"},"contract_nature":{"enum":["real_property","retail_sale"],"type":"string"},"contract_type":{"enum":["lump_sum","time_and_materials"],"type":"string"},"default_category":{"enum":["material","fixture","labor","equipment"],"type":"string"},"jurisdiction_set_id":{"minimum":1,"type":"integer"},"postal_code":{"minLength":1,"type":"string"},"region":{"minLength":1,"type":"string"}},"required":["jurisdiction_set_id","address_line1","city","region","postal_code","contract_type","contract_nature"],"type":"object"}},"required":["site"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxSite"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Set a project's job site","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/rates":{"get":{"description":"Effective-dated sales and use rates (percent). A used rate is immutable. Any accounting grant. Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxRates","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter by jurisdiction","in":"query","name":"jurisdiction_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter by qualified-review state","in":"query","name":"needs_review","required":false,"schema":{"enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxRate"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"List tax rates","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/rates/import":{"post":{"description":"All or nothing. Columns jurisdiction_code, effective_from, sales_rate, use_rate, source_citation; plus jurisdiction_name, level, state_code, parent_code to create a missing jurisdiction. A real (non-ZZ) jurisdiction's rate needs a citation and is stored needing qualified review. Equal rows are unchanged (a repeat is a no-op); a changed row, a date on or before an already-taxed date, or inside a closed period is refused. Needs manage_coa over every entity; audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingSalesTaxRatesImport","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"import":{"additionalProperties":false,"properties":{"csv":{"minLength":1,"type":"string"},"dry_run":{"type":"boolean"}},"required":["csv"],"type":"object"}},"required":["import"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxRateImportResult"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Import tax rates from CSV","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/rates/provider_sync":{"post":{"description":"Only the fake provider ships (no network call; fictional ZZ rates). Imported under the CSV rules. Needs manage_coa over every entity. Requires the accounting:write scope.","operationId":"createCompanyAccountingSalesTaxRatesProviderSync","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"sync":{"additionalProperties":false,"properties":{"as_of":{"format":"date","type":"string"},"dry_run":{"type":"boolean"},"jurisdiction_codes":{"items":{"type":"string"},"minItems":1,"type":"array"},"provider":{"enum":["fake"],"type":"string"}},"required":["provider","as_of","jurisdiction_codes"],"type":"object"}},"required":["sync"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxRateImportResult"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Import rates from a provider adapter","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/rates/{id}":{"delete":{"description":"A mistaken import; a rate a determination used is locked (409). Needs manage_coa; audited. Requires the accounting:write scope.","operationId":"deleteCompanyAccountingSalesTaxRate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Deleted"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Delete an unused tax rate","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/rates/{id}/review":{"post":{"description":"By a different user than the one who imported it; once. Demo (ZZ) rates are never reviewed. Needs manage_coa; audited. Requires the accounting:write scope.","operationId":"reviewCompanyAccountingSalesTaxRate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"review":{"additionalProperties":false,"properties":{"note":{"minLength":3,"type":"string"}},"required":["note"],"type":"object"}},"required":["review"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxRate"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Record a qualified review of a rate","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/rules":{"get":{"description":"Per jurisdiction (and its descendants), contract nature and type, and category: contractor role and whether sales and use tax apply. Any accounting grant. Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxRules","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter by jurisdiction","in":"query","name":"jurisdiction_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxRule"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"List taxability rules","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"A real jurisdiction's rule needs a source citation and is stored needing qualified review; it may not take effect on or before a date already taxed. Needs manage_coa; audited. Requires the accounting:write scope.","operationId":"createCompanyAccountingSalesTaxRule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"rule":{"additionalProperties":false,"properties":{"category":{"enum":["material","fixture","labor","equipment","any"],"type":"string"},"contract_nature":{"enum":["real_property","retail_sale","any"],"type":"string"},"contract_type":{"enum":["lump_sum","time_and_materials","any"],"type":"string"},"contractor_role":{"enum":["consumer","retailer"],"type":"string"},"effective_from":{"format":"date","type":"string"},"effective_to":{"format":"date","type":["string","null"]},"jurisdiction_id":{"minimum":1,"type":"integer"},"note":{"type":["string","null"]},"sales_taxable":{"type":"boolean"},"source_citation":{"type":["string","null"]},"use_taxable":{"type":"boolean"}},"required":["jurisdiction_id","category","contractor_role","sales_taxable","use_taxable","effective_from"],"type":"object"}},"required":["rule"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxRule"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Add a taxability rule","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/rules/{id}":{"patch":{"description":"An unused rule may change; a used rule may only be ended (effective_to) on or after its last use. Needs manage_coa; audited. Requires the accounting:write scope.","operationId":"updateCompanyAccountingSalesTaxRule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"rule":{"additionalProperties":false,"properties":{"contractor_role":{"enum":["consumer","retailer"],"type":"string"},"effective_to":{"format":"date","type":["string","null"]},"note":{"type":["string","null"]},"sales_taxable":{"type":"boolean"},"source_citation":{"type":["string","null"]},"use_taxable":{"type":"boolean"}},"required":[],"type":"object"}},"required":["rule"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxRule"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Change or end a taxability rule","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/settings":{"get":{"description":"Rounding method (line or invoice) and default sales and use tax payable accounts; unset accounts fall back to the chart's SALES_TAX_PAYABLE and USE_TAX_PAYABLE. Any accounting grant. Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxSettings"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Sales tax settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"Needs manage_coa over every entity; audited. Requires the accounting:write scope.","operationId":"replaceCompanyAccountingSalesTaxSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"settings":{"$ref":"#/components/schemas/accounting_SalesTaxSettingsInput"}},"required":["settings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxSettings"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Update sales tax settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/use_tax/accruals":{"get":{"description":"Project-scoped grants refused; entity-scoped grants see their entities. Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxUseTaxAccruals","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Filter by bill","in":"query","name":"bill_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxAccrual"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"List use tax accruals","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Dr each line's cost (job cost or expense) / Cr each jurisdiction's use tax payable, on the bill's posting date or the date given (closed periods refused). vendor_tax_charged is credited against the tax owed. Overrides (exclude or include a line) need a reason and are audited. One posted accrual per bill: the same request returns it (200), a different one is 409. Needs post_journal. Requires the accounting:write scope.","operationId":"createCompanyAccountingSalesTaxUseTaxAccrual","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"accrual":{"additionalProperties":false,"properties":{"bill_id":{"minimum":1,"type":"integer"},"overrides":{"items":{"additionalProperties":false,"properties":{"action":{"enum":["exclude","include"],"type":"string"},"bill_line_id":{"minimum":1,"type":"integer"},"reason":{"minLength":5,"type":"string"}},"required":["bill_line_id","action","reason"],"type":"object"},"type":"array"},"posting_date":{"format":"date","type":["string","null"]},"vendor_tax_charged":{"pattern":"^\\d{1,13}(\\.\\d{1,2})?$","type":"string"}},"required":["bill_id"],"type":"object"}},"required":["accrual"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxAccrual"}}},"description":"Existing record returned (same request)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxAccrual"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Accrue use tax on a posted bill","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/use_tax/accruals/{id}":{"get":{"description":"With its determinations. Project-scoped grants refused. Requires the accounting:read scope.","operationId":"getCompanyAccountingSalesTaxUseTaxAccrual","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxAccrual"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Show a use tax accrual","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/use_tax/accruals/{id}/reverse":{"post":{"description":"Posts the reversal on the date given; the bill may then be accrued again. Needs approve_journal; audited. Requires the accounting:write scope.","operationId":"reverseCompanyAccountingSalesTaxUseTaxAccrual","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"reversal":{"additionalProperties":false,"properties":{"date":{"format":"date","type":"string"},"reason":{"minLength":3,"type":"string"}},"required":["date","reason"],"type":"object"}},"required":["reversal"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_SalesTaxAccrual"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body or Idempotency-Key header"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Conflict: a used rate or rule, a standing accrual, a filed return, changed figures, or an Idempotency-Key reuse"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Reverse a use tax accrual","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sales_tax/use_tax/candidates":{"get":{"description":"Posted bills in [from, to] with no accrual, each with the line review and the use tax owed if the vendor charged none. Preview only. Project-scoped grants refused. Requires the accounting:read scope.","operationId":"listCompanyAccountingSalesTaxUseTaxCandidates","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Posting date from","in":"query","name":"from","required":true,"schema":{"format":"date","type":"string"}},{"description":"Posting date to","in":"query","name":"to","required":true,"schema":{"format":"date","type":"string"}},{"description":"Entity","in":"query","name":"entity_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_SalesTaxCandidate"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity outside the grant, a project-scoped grant, or read-only token"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, a setup gap, a closed period, or a refused import"}},"summary":"Bills that may owe use tax","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/settings":{"get":{"description":"Base currency, fiscal year start month, default entity, the manual journal approval threshold and the control-account map (one account per system role such as AP_CONTROL or RETAINED_EARNINGS). Any accounting grant can read it. Requires the accounting:read scope.","operationId":"listCompanyAccountingSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Settings"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"Show accounting settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Changes settings and remaps control accounts: `control_accounts` maps a system role to a postable account id (null clears it). Needs the manage_coa permission. Audited in the same transaction. Requires the accounting:write scope. Changing require_mfa_for, require_mfa_for_accounting or step_up_minutes needs an accounting owner or manage_grants (403), is audited as mfa_policy_changed, and, like a sod_mode change, needs step-up. Step-up: from a browser session this needs an authenticator code re-entered within settings step_up_minutes (401 step_up_required); a user without a factor is refused (403 mfa_required) unless the MFA policy is off entirely (require_mfa_for empty and require_mfa_for_accounting off). An API token cannot re-enter a code: it passes only when it holds the accounting:step_up scope (403 step_up_required otherwise; the MFA policy still applies to its user); each such use writes a step_up_token audit row.","operationId":"updateCompanyAccountingSettings","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"settings":{"properties":{"base_currency":{"maxLength":3,"minLength":3,"type":"string"},"cecl_policy":{"additionalProperties":false,"description":"ASC 326 (CECL) loss-rate policy used by the cecl_allowance report and posting; null = not set (the allowance refuses with 422).","properties":{"ar_rates":{"additionalProperties":false,"properties":{"current":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"},"d1_30":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"},"d31_60":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"},"d61_90":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"},"d91_plus":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"},"disputed":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"}},"required":["current","d1_30","d31_60","d61_90","d91_plus","disputed"],"type":"object"},"contract_asset_rate":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"},"retainage_rate":{"description":"Loss rate as a fraction of amortized cost (0.015 = 1.5%)","pattern":"^(0(\\.\\d{1,6})?|1(\\.0{1,6})?)$","type":"string"}},"required":["ar_rates","retainage_rate","contract_asset_rate"],"type":["object","null"]},"control_accounts":{"additionalProperties":{"minimum":1,"type":["integer","null"]},"type":"object"},"default_entity_id":{"minimum":1,"type":["integer","null"]},"finance_charge_account_id":{"description":"Income account finance-charge invoices credit","type":["integer","null"]},"finance_charge_grace_days":{"description":"Days past due before a finance charge applies","type":"integer"},"finance_charge_monthly_pct":{"description":"Monthly finance charge percent on past-due AR; null = none","type":["string","null"]},"fiscal_year_start_month":{"maximum":12,"minimum":1,"type":"integer"},"loss_provision_unit":{"description":"Loss provision unit of account (ASU 2016-20 election), recorded on each WIP row (lossProvisionUnit). Each WIP row is one contract with a single performance obligation.","enum":["contract","performance_obligation"],"type":"string"},"reclass_control_accounts":{"description":"Allow moving a system role off an account that already has posted activity (a deliberate reclass).","type":"boolean"},"recon_adjustment_limit":{"description":"Largest bank reconciliation difference one person may post as an adjustment; null = under require_approval_above (none when that is null). Owner or manage_grants only.","type":["string","null"]},"require_approval_above":{"type":["string","null"]},"require_mfa_for":{"items":{"enum":["view_ledger","post_journal","approve_journal","manage_coa","close_period","ap_enter","ap_approve","release_payments","manage_vendor_banking","ar_enter","ar_approve","payroll_view","payroll_run","view_payroll_pii","bank_reconcile","manage_integrations","manage_grants","job_forecast_edit"]},"type":"array"},"require_mfa_for_accounting":{"type":"boolean"},"scheduler_user_id":{"description":"User the daily accounting jobs (recurring entries, auto-reversals, lease runs) run and are audited as; null = the first active company admin, flagged on the accounting home page. Must be an active company user with post_journal for every entity (422); only an accounting owner or a user who manages grants may change it (403).","type":["integer","null"]},"sod_mode":{"description":"Only a user with manage_coa and unrestricted entity access may change it (audited as sod_mode_changed).","enum":["strict","small_team"]},"step_up_minutes":{"maximum":60,"minimum":1,"type":"integer"},"timezone":{"description":"IANA time zone that decides the company's today: recurring and auto-reversal runs and every date default (form dates, report and REST as_of/to, void and reversal dates), never the UTC date. E.g. America/Los_Angeles","type":"string"},"transfer_approval_above":{"description":"Bank transfers at or above this amount wait for a second person holding release_payments; null = require_approval_above when that is set, else no amount rule. Owner or manage_grants only; audited.","type":["string","null"]},"transfer_approval_cross_entity":{"description":"Bank transfers between entities wait for a second person holding release_payments (default true). Owner or manage_grants only; audited.","type":"boolean"}},"type":"object"}},"required":["settings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Settings"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Update accounting settings","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/settings/edition":{"get":{"description":"The edition, its areas with admin overrides, the control policies in force, kept controls, recommended roles and the edition catalog. Any accounting grant (view_ledger). Requires the accounting:read scope.","operationId":"listCompanyAccountingSettingsEdition","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctEdition"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, an entity-restricted or project-scoped grant writing, wrong company, read-only workspace, or (edition changes) missing step-up or MFA"}},"summary":"Get the accounting edition","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"patch":{"description":"Shows or hides individual areas on top of the edition (setting an area back to its edition default clears the override) and switches AR dunning reminders (written to the collections settings; a reason is needed to switch them off, and switching off is refused while invoices are mid-cadence). Areas are navigation only. Audited (edition_overridden). Needs manage_coa on an unrestricted grant and an edition. Requires the accounting:write scope.","operationId":"updateCompanyAccountingSettingsEdition","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"edition":{"additionalProperties":false,"properties":{"dunning":{"description":"AR collections dunning switch (acct_ar_collection_settings.dunning_enabled). Changing it needs ar_approve too. Switching it on creates the default policy when the company has none; switching it off needs reason and is refused (422 edition_downgrade_blocked) while open invoices are part-way through a dunning cadence.","type":"boolean"},"features":{"additionalProperties":false,"properties":{"apAutomation":{"type":"boolean"},"closeCockpit":{"type":"boolean"},"collections":{"type":"boolean"},"commitments":{"type":"boolean"},"consolidation":{"type":"boolean"},"customerPortal":{"type":"boolean"},"dimensions":{"type":"boolean"},"fixedAssets":{"type":"boolean"},"fpa":{"type":"boolean"},"intercompany":{"type":"boolean"},"leases":{"type":"boolean"},"multiCurrency":{"type":"boolean"},"multiEntity":{"type":"boolean"},"qualifiedReviews":{"type":"boolean"},"reportBuilder":{"type":"boolean"},"retainage":{"type":"boolean"},"wip":{"type":"boolean"}},"type":"object"},"reason":{"description":"Required when switching dunning off (422 edition_weaker_reason_required otherwise); audited.","maxLength":2000,"type":"string"}},"required":[],"type":"object"}},"required":["edition"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctEdition"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, an entity-restricted or project-scoped grant writing, wrong company, read-only workspace, or (edition changes) missing step-up or MFA"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No edition chosen yet, or an invalid body"}},"summary":"Override edition areas","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"Applies the edition previewed with GET settings/edition/preview: confirm_hash must equal that preview's hash (409 edition_preview_stale otherwise). A weaker control needs a reason (422 edition_weaker_reason_required) unless keep_controls keeps every weaker control at its current value; an in-use control (required reconciliations or close tasks in open periods, or dunning while open invoices are mid-cadence) is refused (422 edition_downgrade_blocked) unless keep_controls. Area overrides reset to the edition. Dunning is written to the AR collections settings (ar_approve), creating the default policy when switched on in a company with none. Never deletes data. Audited (edition_applied, plus the settings control actions). Needs manage_coa and manage_grants on an unrestricted grant, and step-up. Requires the accounting:write scope.","operationId":"replaceCompanyAccountingSettingsEdition","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"edition":{"additionalProperties":false,"properties":{"confirm_hash":{"maxLength":64,"minLength":1,"type":"string"},"keep_controls":{"type":"boolean"},"key":{"enum":["essentials","professional","enterprise"],"type":"string"},"reason":{"maxLength":2000,"type":"string"}},"required":["key","confirm_hash"],"type":"object"}},"required":["edition"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctEdition"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, an entity-restricted or project-scoped grant writing, wrong company, read-only workspace, or (edition changes) missing step-up or MFA"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"The edition change differs from the confirmed preview"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Weaker controls without a reason, or an in-use control the edition would switch off"}},"summary":"Apply an edition","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/settings/edition/preview":{"get":{"description":"Every area and policy the edition would change, the direction of each control change (stronger or weaker), warnings for hidden areas that hold data, blocked in-use controls, and the hash to confirm with. `edition` defaults to the current edition. Needs manage_coa. Requires the accounting:read scope.","operationId":"listCompanyAccountingSettingsEditionPreview","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"edition","required":false,"schema":{"enum":["essentials","professional","enterprise"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctEditionDiff"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, an entity-restricted or project-scoped grant writing, wrong company, read-only workspace, or (edition changes) missing step-up or MFA"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Unknown edition"}},"summary":"Preview an edition change","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/settings/setup":{"get":{"description":"Each step's status (an explicit mark, else what the data proves), the first open step, the profile and its recommendation, and the go-live checklist. Needs manage_coa. Requires the accounting:read scope.","operationId":"listCompanyAccountingSettingsSetup","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctSetup"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, an entity-restricted or project-scoped grant writing, wrong company, read-only workspace, or (edition changes) missing step-up or MFA"}},"summary":"Get guided setup progress","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"put":{"description":"Marks a step done, skipped (bank accounts, opening balances, users only) or pending again. Idempotent: the same mark again writes nothing. Steps proved by data (edition, chart, entities, bank accounts, opening balances) are done only when the data exists; go_live only when every checklist item passes. Audited (setup_step_recorded, setup_completed). Needs manage_coa on an unrestricted grant. Requires the accounting:write scope.","operationId":"replaceCompanyAccountingSettingsSetup","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"setup":{"additionalProperties":false,"properties":{"profile":{"$ref":"#/components/schemas/accounting_AcctSetupProfile"},"status":{"enum":["done","skipped","pending"],"type":"string"},"step":{"enum":["profile","edition","coa","entities","bank_accounts","opening_balances","approvals","users","go_live"],"type":"string"}},"required":["step","status"],"type":"object"}},"required":["setup"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_AcctSetup"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, an entity-restricted or project-scoped grant writing, wrong company, read-only workspace, or (edition changes) missing step-up or MFA"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"A step that cannot be skipped, unfinished data, or a failing go-live checklist"}},"summary":"Record a setup step","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sod_conflicts":{"get":{"description":"Every member whose effective duties (grant flags plus approval flags reached through active or scheduled delegations) match an enabled rule, with each duty's source and the evidence: the grant, its last audited change and SoD reason, and the delegations completing the combination. Company administrators are implicit owners. Needs manage_grants on an unrestricted grant. Requires accounting:read.","operationId":"listCompanyAccountingSodConflicts","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GovConflictReport"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants, a restricted grant, wrong company or a token without the required scope"}},"summary":"Segregation of duties conflict report","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sod_rules":{"get":{"description":"The built-in default rules (source default, or customized when the company changed their severity, wording or on/off) followed by the company's custom rules. Needs manage_grants on an unrestricted grant. Requires accounting:read.","operationId":"listCompanyAccountingSodRules","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_GovSodRule"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants, a restricted grant, wrong company or a token without the required scope"}},"summary":"List segregation of duties rules","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/sod_rules/{rule_key}":{"put":{"description":"Creates a custom rule (name, 2-4 duties, severity, risk) or changes one: a built-in rule's severity, wording and on/off (its duties are fixed), a custom rule's duties too. Every change needs a reason and is audited with before and after; weakening (block to warn, off, other duties) is flagged as sod_rule_weakened. Existing grants are never changed: current_holders lists who already holds the combination; their next grant change needs a reason. Needs manage_grants on an unrestricted grant and step-up (a token needs accounting:step_up). Requires accounting:write.","operationId":"replaceCompanyAccountingSodRule","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Rule key (lowercase letters, digits and underscores)","in":"path","name":"rule_key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"sod_rule":{"$ref":"#/components/schemas/accounting_GovSodRuleInput"}},"required":["sod_rule"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_GovSodRuleSaved"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Missing manage_grants, a restricted grant, step-up required or a read-only token"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed rule key"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Invalid body, changed duties on a built-in rule, or a new rule without duties, name or risk"}},"summary":"Create or change a segregation of duties rule","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/tax_codes":{"get":{"description":"Sales and use tax codes. Each code has one or more components, each with its own rate and liability account; `total_rate` is their sum. Requires the accounting:read scope.","operationId":"listCompanyAccountingTaxCodes","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_TaxCode"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List tax codes","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Adds a tax code with its components. Component accounts must be postable accounts of this company. Needs manage_coa. Requires the accounting:write scope.","operationId":"createCompanyAccountingTaxCode","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"tax_code":{"properties":{"code":{"type":"string"},"components":{"items":{"properties":{"account_id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"rate":{"description":"Percent, up to 6 dp","type":"string"}},"required":["name","rate","account_id"],"type":"object"},"minItems":1,"type":"array"},"is_active":{"type":"boolean"},"kind":{"enum":["sales","use"]},"name":{"type":"string"}},"required":["code","name","components"],"type":"object"}},"required":["tax_code"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_TaxCode"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Create a tax code","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/tax_codes/{id}":{"patch":{"description":"Edits a tax code; `components` replaces every component. Needs manage_coa. Requires the accounting:write scope.","operationId":"updateCompanyAccountingTaxCode","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"tax_code":{"properties":{"code":{"type":"string"},"components":{"items":{"properties":{"account_id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"rate":{"description":"Percent, up to 6 dp","type":"string"}},"required":["name","rate","account_id"],"type":"object"},"minItems":1,"type":"array"},"is_active":{"type":"boolean"},"kind":{"enum":["sales","use"]},"name":{"type":"string"}},"type":"object"}},"required":["tax_code"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_TaxCode"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Update a tax code","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/tax_exemption_certificates":{"get":{"description":"Up to 500, optionally for one customer. Requires the accounting:read scope.","operationId":"listCompanyAccountingTaxExemptionCertificates","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"customer_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_TaxExemptionCertificate"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity out of scope, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, or a named setup gap (state with no encoded contractor tax rule, missing job-site sales or use tax code)"}},"summary":"List customer tax exemption certificates","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"A certificate valid on the invoice date in the job state removes sales tax from pay-app invoices and blocks it on manual invoices; once expired, tax applies and the invoice carries a warning. Needs manage_coa. Requires the accounting:write scope.","operationId":"createCompanyAccountingTaxExemptionCertificate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"certificate":{"additionalProperties":false,"properties":{"certificate_number":{"maxLength":100,"minLength":1,"type":"string"},"customer_id":{"type":"integer"},"effective_from":{"format":"date","type":"string"},"expires_on":{"format":"date","nullable":true,"type":"string"},"reason":{"maxLength":500,"minLength":3,"type":"string"},"state_code":{"type":"string"}},"required":["customer_id","state_code","certificate_number","reason","effective_from"],"type":"object"}},"required":["certificate"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_TaxExemptionCertificate"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity out of scope, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, or a named setup gap (state with no encoded contractor tax rule, missing job-site sales or use tax code)"}},"summary":"Record a customer tax exemption certificate","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/tax_exemption_certificates/{id}":{"patch":{"description":"Only expires_on changes; enter a new certificate for other corrections. Needs manage_coa. Requires the accounting:write scope.","operationId":"updateCompanyAccountingTaxExemptionCertificate","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"certificate":{"additionalProperties":false,"properties":{"expires_on":{"format":"date","nullable":true,"type":"string"}},"required":["expires_on"],"type":"object"}},"required":["certificate"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_TaxExemptionCertificate"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, entity out of scope, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed, or a named setup gap (state with no encoded contractor tax rule, missing job-site sales or use tax code)"}},"summary":"Change a certificate expiry","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/terms":{"get":{"description":"Company payment terms with due days and optional early-payment discount. Requires the accounting:read scope.","operationId":"listCompanyAccountingTerms","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/accounting_Term"},"type":"array"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"}},"summary":"List payment terms","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false},"post":{"description":"Adds a term such as Net 30 or 2% 10, net 30. Needs manage_coa. Requires the accounting:write scope.","operationId":"createCompanyAccountingTerm","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Client retry key (a UUID is recommended); see the idempotency guide. The first successful response is stored and replayed (same status and body, header Idempotent-Replayed: true) for a repeat with the same key, body and caller; the same key with a different body or caller, or while the first request is still running, is 409. The key is marked committed in the same database transaction as the change, so a retry after a crash or timeout between commit and response replays instead of answering 409. A failed request frees the key. Keys are kept 30 days. On routes that take a body request_key (AR invoices, receipts, cash applications, reversals and deposits; payroll remittances) the header stands in for a missing request_key (a non-UUID key is mapped to a stable UUID) and a request_key that differs from it is 422. Strongly recommended: without it a retried POST can create a second document.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"term":{"properties":{"code":{"type":"string"},"discount_days":{"type":["integer","null"]},"discount_percent":{"type":["string","null"]},"due_days":{"minimum":0,"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"}},"required":["code","name","due_days"],"type":"object"}},"required":["term"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Term"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Create a payment term","tags":["accounting"],"x-os-idempotent":true,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/terms/{id}":{"patch":{"description":"Edits or deactivates a term. Needs manage_coa. Requires the accounting:write scope.","operationId":"updateCompanyAccountingTerm","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"term":{"properties":{"code":{"type":"string"},"discount_days":{"type":["integer","null"]},"discount_percent":{"type":["string","null"]},"due_days":{"minimum":0,"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"}},"type":"object"}},"required":["term"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Term"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Malformed JSON body, or the request was refused by a business rule (message list)"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"}},"summary":"Update a payment term","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/accounting/trial_balance":{"get":{"description":"Debit and credit totals and the net balance per account from posted lines up to `as_of` (default today), optionally from `from`. Split by a dimension with `group_by` (entity, project, department, cost_code), or restrict to one entity, project or department. Net debit and net credit totals are always equal. Requires the accounting:read scope.","operationId":"listCompanyAccountingTrialBalance","parameters":[{"description":"Company id; must be the token's company","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Inclusive end date (default today)","in":"query","name":"as_of","schema":{"format":"date","type":"string"}},{"description":"Inclusive start date (activity only)","in":"query","name":"from","schema":{"format":"date","type":"string"}},{"description":"One entity","in":"query","name":"entity_id","schema":{"minimum":1,"type":"integer"}},{"description":"One project","in":"query","name":"project_id","schema":{"minimum":1,"type":"integer"}},{"description":"One department","in":"query","name":"department_id","schema":{"minimum":1,"type":"integer"}},{"description":"Split rows by a dimension. `dimension:<code>` groups by a user-defined dimension: dimension_id on each row is then the value id (null = lines with no value), rolled up by dimension_level; the rows of each account sum to its ungrouped balance.","in":"query","name":"group_by","schema":{"pattern":"^(entity|project|department|cost_code|dimension:[A-Za-z0-9][A-Za-z0-9_.\\-]{0,19})$","type":"string"}},{"description":"With group_by=dimension:<code>: roll values up to this hierarchy level (1 = top-level values); omitted = the posted value.","in":"query","name":"dimension_level","schema":{"maximum":20,"minimum":1,"type":"integer"}},{"description":"Comma-separated dimension value ids: lines carrying one of them or a child value (values of one dimension OR, dimensions AND).","in":"query","name":"dimension_value_ids","schema":{"pattern":"^\\d{1,10}(,\\d{1,10}){0,49}$","type":"string"}},{"description":"Also list postable accounts with no activity","in":"query","name":"include_zero","schema":{"enum":["true","false"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_TrialBalance"}}},"description":"OK"},"401":{"description":"Missing or invalid bearer token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"No accounting access, missing permission, wrong company, or read-only workspace"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Not found in this company"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Validation failed (field errors) or the ledger refused the change (message list)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounting_Errors"}}},"description":"Company heavy-read budget spent (ACCT_HEAVY_BUDGET units per minute); retry after the Retry-After seconds"}},"summary":"Trial balance","tags":["accounting"],"x-os-idempotent":false,"x-os-module":"accounting","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/action_plans/plan_templates":{"get":{"operationId":"listCompanyActionPlansPlanTemplates","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/action_plans_TemplateListItem"},"type":"array"}}}}},"summary":"GET /rest/v1.0/companies/{company_id}/action_plans/plan_templates","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false},"post":{"operationId":"createCompanyActionPlansPlanTemplate","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_TemplateShow"}}}}},"summary":"POST /rest/v1.0/companies/{company_id}/action_plans/plan_templates","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/action_plans/plan_templates/recycle_bin":{"get":{"description":"Requires action_plans:read. Requires authentication and a matching token company. Returns soft-deleted company templates ordered by ID, including deleted=true and deleted_at. Catalog presence does not grant authorization.","operationId":"listCompanyActionPlansPlanTemplatesRecycleBin","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Comma-separated or repeated draft, in_revision, published values; unsupported values are ignored.","in":"query","name":"filters[status]","schema":{"type":"string"}},{"description":"First supplied value searches title or description case-insensitively.","in":"query","name":"filters[query]","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/action_plans_TemplateListItem"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination Link","schema":{"type":"string"}},"Per-Page":{"description":"Pagination Per-Page","schema":{"type":"string"}},"Total":{"description":"Pagination Total","schema":{"type":"string"}}}},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"List recycled action plan templates","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/action_plans/plan_templates/{id}":{"delete":{"description":"Requires action_plans:write. Requires matching token company and company delete permission. Soft-deletes the company template. Returns HTTP 200 with no body. Catalog presence does not grant authorization.","operationId":"deleteCompanyActionPlansPlanTemplate","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"description":"Success with an empty response body"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Recycle an action plan template","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false},"get":{"operationId":"getCompanyActionPlansPlanTemplate","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_TemplateShow"}}}}},"summary":"GET /rest/v1.0/companies/{company_id}/action_plans/plan_templates/{id}","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false},"patch":{"operationId":"updateCompanyActionPlansPlanTemplate","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_TemplateShow"}}}}},"summary":"PATCH /rest/v1.0/companies/{company_id}/action_plans/plan_templates/{id}","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/action_plans/plan_templates/{id}/publish":{"patch":{"description":"Requires action_plans:write. Requires matching token company and company edit permission. Sets status to published so the template can be used to create plans. Catalog presence does not grant authorization.","operationId":"publishCompanyActionPlansPlanTemplate","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_TemplateShow"}}},"description":"Success"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Publish an action plan template","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/action_plans/plan_templates/{id}/revise":{"patch":{"description":"Requires action_plans:write. Requires matching token company and company edit permission. Sets status to in_revision, allowing edits to assignments and blocking configuration. Catalog presence does not grant authorization.","operationId":"reviseCompanyActionPlansPlanTemplate","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_TemplateShow"}}},"description":"Success"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Revise an action plan template","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/agent_activity":{"get":{"description":"Calls by service accounts, agents and partner apps, newest first. actor_type=agent&writes=true&outcome=allowed lists agent proposals awaiting human review; outcome=denied lists refused attempts.","operationId":"listCompanyAgentActivity","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"actor_type","schema":{"enum":["service_account","agent","partner_app"],"type":"string"}},{"in":"query","name":"outcome","schema":{"enum":["allowed","denied"],"type":"string"}},{"in":"query","name":"writes","schema":{"type":"boolean"}},{"in":"query","name":"before","schema":{"type":"string"}},{"in":"query","name":"per_page","schema":{"default":50,"maximum":200,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/identity_ApiCall"},"type":"array"}}},"description":"Calls"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"Non-human API activity","tags":["identity"],"x-os-idempotent":false,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/activity":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsActivity","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"User id","in":"query","name":"filters[actor_id]","required":false,"schema":{"type":"integer"}},{"description":"e.g. updated, viewed, exported","in":"query","name":"filters[action]","required":false,"schema":{"type":"string"}},{"description":"analytics_dashboard | analytics_exploration | analytics_alert | analytics_schedule | analytics_setting | analytics_export","in":"query","name":"filters[item_type]","required":false,"schema":{"type":"string"}},{"description":"YYYY-MM-DD (inclusive)","in":"query","name":"filters[from]","required":false,"schema":{"type":"string"}},{"description":"YYYY-MM-DD (inclusive)","in":"query","name":"filters[to]","required":false,"schema":{"type":"string"}},{"description":"1-based page","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size (default 100, max 1000)","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":[{"action":"exported","actor_id":1,"actor_name":"Charley Forey","changes":null,"created_at":"2026-10-26T04:50:25.782Z","id":51,"item_id":0,"item_type":"analytics_export","project_id":null,"summary":"Exported query \"RFIs\" as CSV"},{"action":"created","actor_id":1,"actor_name":"Charley Forey","changes":null,"created_at":"2026-10-26T04:50:14.499Z","id":47,"item_id":3,"item_type":"analytics_exploration","project_id":2,"summary":"Saved exploration \"Data X 1792990213661\" (table)"}],"schema":{"items":{"$ref":"#/components/schemas/analytics_ActivityEvent"},"type":"array"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Analytics audit trail (company admins only)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/analytics/admin/orphaned":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsAdminOrphaned","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":[],"schema":{"items":{"$ref":"#/components/schemas/analytics_OrphanedItem"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Content owned by inactive users (company admins only)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/alerts":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsAlerts","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"1-based page","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size (default 100, max 1000)","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":[],"schema":{"items":{"$ref":"#/components/schemas/analytics_AlertRule"},"type":"array"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List KPI alert rules","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":true},"post":{"description":"Evaluated per recipient with the recipient's own permissions; recipients must be active company users with analytics view. Token scope: `analytics:write`.","operationId":"createCompanyAnalyticsAlert","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"alert":{"channel":"in_app","enabled":true,"filters":[{}],"metric_key":"pm.rfis_open","name":"PM weekly overview","op":"gt","per_project":false,"recipient_ids":[6],"threshold":12.5,"window":"open"}},"schema":{"properties":{"alert":{"$ref":"#/components/schemas/analytics_AlertRuleInput"}},"required":["alert"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"channel":"in_app","company_id":1,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"enabled":true,"filters":[{}],"id":42,"last_evaluated_at":"2026-10-20T14:32:00.000Z","last_fired_at":"2026-10-20T14:32:00.000Z","last_value":12.5,"metric_key":"pm.rfis_open","name":"PM weekly overview","op":"gt","per_project":false,"project_id":2,"recipient_ids":[6],"threshold":12.5,"updated_at":"2026-10-20T14:32:00.000Z","window":"open"},"schema":{"$ref":"#/components/schemas/analytics_AlertRule"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Create a KPI alert rule","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/alerts/{id}":{"delete":{"description":"Token scope: `analytics:write`.","operationId":"deleteCompanyAnalyticsAlert","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Delete a KPI alert rule","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false},"get":{"description":"Token scope: `analytics:read`.","operationId":"getCompanyAnalyticsAlert","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"channel":"in_app","company_id":1,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"enabled":true,"filters":[{}],"id":42,"last_evaluated_at":"2026-10-20T14:32:00.000Z","last_fired_at":"2026-10-20T14:32:00.000Z","last_value":12.5,"metric_key":"pm.rfis_open","name":"PM weekly overview","op":"gt","per_project":false,"project_id":2,"recipient_ids":[6],"threshold":12.5,"updated_at":"2026-10-20T14:32:00.000Z","window":"open"},"schema":{"$ref":"#/components/schemas/analytics_AlertRule"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Show a KPI alert rule","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"patch":{"description":"Token scope: `analytics:write`.","operationId":"updateCompanyAnalyticsAlert","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"alert":{"channel":"in_app","enabled":true,"filters":[{}],"name":"PM weekly overview","op":"gt","per_project":false,"recipient_ids":[6],"threshold":12.5,"window":"open"}},"schema":{"properties":{"alert":{"$ref":"#/components/schemas/analytics_AlertRulePatch"}},"required":["alert"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"channel":"in_app","company_id":1,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"enabled":true,"filters":[{}],"id":42,"last_evaluated_at":"2026-10-20T14:32:00.000Z","last_fired_at":"2026-10-20T14:32:00.000Z","last_value":12.5,"metric_key":"pm.rfis_open","name":"PM weekly overview","op":"gt","per_project":false,"project_id":2,"recipient_ids":[6],"threshold":12.5,"updated_at":"2026-10-20T14:32:00.000Z","window":"open"},"schema":{"$ref":"#/components/schemas/analytics_AlertRule"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Update a KPI alert rule","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/alerts/{id}/transfer":{"post":{"description":"Token scope: `analytics:write`.","operationId":"transferCompanyAnalyticsAlert","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"owner_id":6},"schema":{"properties":{"owner_id":{"type":"integer"}},"required":["owner_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"channel":"in_app","company_id":1,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"enabled":true,"filters":[{}],"id":42,"last_evaluated_at":"2026-10-20T14:32:00.000Z","last_fired_at":"2026-10-20T14:32:00.000Z","last_value":12.5,"metric_key":"pm.rfis_open","name":"PM weekly overview","op":"gt","per_project":false,"project_id":2,"recipient_ids":[6],"threshold":12.5,"updated_at":"2026-10-20T14:32:00.000Z","window":"open"},"schema":{"$ref":"#/components/schemas/analytics_AlertRule"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Transfer an alert to a new owner (analytics admin only)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/ask":{"post":{"description":"Read semantics: token scope `analytics:read` (not :write) plus analytics view. Every metric additionally needs read access to its source tool, the tool enabled, and the source's token scope; metrics failing that are listed in `unavailable` with null values, never 0. POST is unavailable (403) on read-only (expired trial / suspended) workspaces; use the GET form with `?q=`. The answer is a QuerySpec run through the normal engine; only permission-filtered catalog metadata is used to resolve it.","operationId":"createCompanyAnalyticsAsk","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"question":"How many RFIs are open by project?"},"schema":{"properties":{"project_id":{"type":"integer"},"question":{"maxLength":500,"minLength":1,"type":"string"}},"required":["question"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"alternatives":[{"key":"pm.rfis_open","label":"Open RFIs"}],"chips":[{"kind":"metric","label":"Open RFIs","value":"open"}],"engine":"ai","explanation":"open","mapped":false,"result":{"columns":[{"key":"pm.rfis_open","label":"Open RFIs","role":"dim","type":"string"}],"labels":{},"meta":{"asOf":"open","cached":false,"ms":12.5,"plans":[{"source":"open","via":"base"}],"timezone":"America/Chicago"},"partial":[{"excludedProjectIds":[1],"metrics":["pm.rfis_open"],"reason":"Open RFIs older than 14 days are trending up on two projects."}],"rows":[["open"]],"totals":[12],"truncated":false,"unavailable":[{"metric":"pm.rfis_open","reason":"forbidden"}]},"spec":{"metrics":["pm.rfis_open"]},"viz":{"type":"kpi"}},"schema":{"$ref":"#/components/schemas/analytics_AskAnswer"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Answer a question with a governed query","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/catalog":{"get":{"description":"Read semantics: token scope `analytics:read` (not :write) plus analytics view. Every metric additionally needs read access to its source tool, the tool enabled, and the source's token scope; metrics failing that are listed in `unavailable` with null values, never 0.","operationId":"listCompanyAnalyticsCatalog","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"compat":{"pm.rfis_late":["project","program"],"pm.rfis_open":["project","program"],"pm.rfis_total":["project","program"]},"dimensions":[{"description":"The project the record belongs to.","entity":"project","key":"project","label":"Project","type":"category"},{"description":"Portfolio program grouping projects.","entity":"program","key":"program","label":"Program","type":"category"}],"metrics":[{"additive":true,"description":"Number of rfis (excluding deleted).","direction":"neutral","domain":"pm","key":"pm.rfis_total","kind":"agg","label":"RFIs","source":"rfis","synonyms":["rfi","rfis"],"unit":"count"},{"additive":true,"description":"RFIs not yet closed.","direction":"lower_better","domain":"pm","key":"pm.rfis_open","kind":"agg","label":"Open rfis","snapshot":true,"source":"rfis","synonyms":["rfi","rfis"],"unit":"count"}],"sources":[{"defaultTime":"created","dims":["project","program"],"key":"rfis","label":"RFIs","privacy":"row","scopes":["rfis:read"],"tool":"rfis"},{"defaultTime":"created","dims":["project","program"],"key":"submittals","label":"Submittals","privacy":"row","scopes":["submittals:read"],"tool":"submittals"}]},"schema":{"$ref":"#/components/schemas/analytics_Catalog"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Catalog of metrics and dimensions readable by the caller (company)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/catalog/{key}/usage":{"get":{"description":"Read semantics: analytics view. Dashboards, explorations, alert rules, schedules (directly or through the dashboard / exploration they deliver), company metrics and packs that reference the key, in this company only (bound, LIKE-escaped match). Analytics admins get the items; everyone else gets the count with items []. Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsCatalogUsage","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Metric (domain.metric) or dimension key.","in":"path","name":"key","required":true,"schema":{"maxLength":80,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"count":3,"items":[{"href":"/companies/1/projects/2/tools/analytics/d/2","id":2,"name":"Riverside PM","project_id":2,"type":"dashboard"},{"href":"/companies/1/analytics/d/pack/project-management","id":"project-management","name":"Project management","project_id":null,"type":"pack"}],"key":"pm.rfis_open"},"schema":{"$ref":"#/components/schemas/analytics_Usage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Where a metric or dimension key is used","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/comments":{"get":{"description":"404 unless the caller can open the target (dashboards/explorations: scope + visibility + shares; insights: the feed gate; goals: the goal gate). Comments can quote numbers, so the thread is visible exactly to those people. Token scope analytics:read.","operationId":"listCompanyAnalyticsComments","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"dashboard:<id> | exploration:<id> | insight:<id> | goal:<id>","in":"query","name":"target","required":true,"schema":{"pattern":"^(dashboard|exploration|insight|goal):[1-9][0-9]{0,9}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":[],"schema":{"items":{"$ref":"#/components/schemas/analytics_Comment"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"A thread (oldest first)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"post":{"description":"Same gate as GET. Mentioned people who can open the target get a `mentioned` notification (target title and link only). Token scope analytics:write.","operationId":"createCompanyAnalyticsComment","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"dashboard:<id> | exploration:<id> | insight:<id> | goal:<id>","in":"query","name":"target","required":true,"schema":{"pattern":"^(dashboard|exploration|insight|goal):[1-9][0-9]{0,9}$","type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"comment":{"anchor":{"dims":{}},"body":"Open RFIs older than 14 days are trending up on two projects.","tile_id":"status"}},"schema":{"properties":{"comment":{"$ref":"#/components/schemas/analytics_CommentInput"}},"required":["comment"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"anchor":{"dims":{}},"author_id":6,"author_name":"open","body":"Open RFIs older than 14 days are trending up on two projects.","can_delete":false,"can_edit":true,"created_at":"2026-10-20T14:32:00.000Z","id":42,"mentions":[{"id":42,"name":"PM weekly overview"}],"project_id":2,"resolved_at":"2026-10-20T14:32:00.000Z","resolved_by_id":6,"target_id":6,"target_type":"dashboard","tile_id":"open","updated_at":"2026-10-20T14:32:00.000Z"},"schema":{"$ref":"#/components/schemas/analytics_Comment"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Comment on a dashboard, exploration, insight or goal","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/comments/mentionable":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsCommentsMentionable","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"dashboard:<id> | exploration:<id> | insight:<id> | goal:<id>","in":"query","name":"target","required":true,"schema":{"pattern":"^(dashboard|exploration|insight|goal):[1-9][0-9]{0,9}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":[{"id":42,"name":"PM weekly overview"}],"schema":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"People who can open the target (mention and assignee picker)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/comments/{id}":{"delete":{"description":"Token scope: `analytics:write`.","operationId":"deleteCompanyAnalyticsComment","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Delete a comment (author, or analytics admin at the target's scope)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false},"patch":{"description":"Token scope: `analytics:write`.","operationId":"updateCompanyAnalyticsComment","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"comment":{"body":"Open RFIs older than 14 days are trending up on two projects.","resolved":false}},"schema":{"properties":{"comment":{"$ref":"#/components/schemas/analytics_CommentPatch"}},"required":["comment"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"anchor":{"dims":{}},"author_id":6,"author_name":"open","body":"Open RFIs older than 14 days are trending up on two projects.","can_delete":false,"can_edit":true,"created_at":"2026-10-20T14:32:00.000Z","id":42,"mentions":[{"id":42,"name":"PM weekly overview"}],"project_id":2,"resolved_at":"2026-10-20T14:32:00.000Z","resolved_by_id":6,"target_id":6,"target_type":"dashboard","tile_id":"open","updated_at":"2026-10-20T14:32:00.000Z"},"schema":{"$ref":"#/components/schemas/analytics_Comment"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Edit (author) or resolve / reopen (anyone who can open the target) a comment","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dashboards":{"get":{"description":"Visible = own private dashboards + project/company-visible ones the caller can view. Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsDashboards","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"private | project | company","in":"query","name":"filters[visibility]","required":false,"schema":{"type":"string"}},{"description":"Certified only","in":"query","name":"filters[certified]","required":false,"schema":{"type":"boolean"}},{"description":"Caller's favorites only","in":"query","name":"filters[favorite]","required":false,"schema":{"type":"boolean"}},{"description":"Only dashboards shared with you or a role you hold (not your own).","in":"query","name":"filters[shared_with_me]","required":false,"schema":{"type":"boolean"}},{"description":"1-based page","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size (default 100, max 1000)","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Trash: your deleted items (all of them for analytics admins).","in":"query","name":"filters[deleted]","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"example":[{"can_edit":true,"certified":true,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.334Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data","description":"Contract value, forecast margin, WIP, cash and safety across every active project, ranked by where to look first.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?format=csv","favorite":false,"id":1,"name":"Executive Portfolio","owner_id":1,"pack_key":"executive-portfolio","project_id":null,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"region","key":"region","kind":"multi","label":"Region"}],"tabs":[{"key":"overview","label":"Overview"},{"key":"wip","label":"WIP & cash"}],"tiles":[{"filterMap":{"period":null},"id":"contract","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_contract_value"],"sort":[]},"tab":"overview","title":"Revised contract value","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"revised-budget","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"overview","title":"Revised budget","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.334Z","version":1,"view_count":0,"visibility":"company","web_url":"/companies/1/analytics/d/1"}],"schema":{"items":{"$ref":"#/components/schemas/analytics_Dashboard"},"type":"array"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List dashboards (company)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":true},"post":{"description":"Requires analytics standard. `spec` is a DashboardSpec, validated on write and read. Token scope: `analytics:write`.","operationId":"createCompanyAnalyticsDashboard","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"dashboard":{"description":"Open RFIs and their status mix","name":"PM weekly overview","spec":{"filters":[{"default":{"preset":"last_12m"},"dim":"created","key":"period","kind":"date_range","label":"Created"},{"dim":"status","key":"status","kind":"multi","label":"Status"}],"tiles":[{"id":"open","kind":"query","layout":{"h":2,"w":3,"x":0,"y":0},"query":{"metrics":["pm.rfis_open"]},"title":"Open RFIs","viz":{"options":{},"type":"kpi"}},{"id":"by_status","kind":"query","layout":{"h":4,"w":9,"x":3,"y":0},"query":{"dimensions":[{"key":"status"}],"metrics":["pm.rfis_total"]},"title":"RFIs by status","viz":{"options":{},"type":"bar"}}],"version":1},"visibility":"company"}},"schema":{"properties":{"dashboard":{"$ref":"#/components/schemas/analytics_DashboardInput"}},"required":["dashboard"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"can_edit":true,"certified":true,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.334Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data","description":"Contract value, forecast margin, WIP, cash and safety across every active project, ranked by where to look first.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?format=csv","favorite":false,"id":1,"name":"Executive Portfolio","owner_id":1,"pack_key":"executive-portfolio","project_id":null,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"region","key":"region","kind":"multi","label":"Region"}],"tabs":[{"key":"overview","label":"Overview"},{"key":"wip","label":"WIP & cash"}],"tiles":[{"filterMap":{"period":null},"id":"contract","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_contract_value"],"sort":[]},"tab":"overview","title":"Revised contract value","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"revised-budget","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"overview","title":"Revised budget","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.334Z","version":1,"view_count":0,"visibility":"company","web_url":"/companies/1/analytics/d/1"},"schema":{"$ref":"#/components/schemas/analytics_Dashboard"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Create a dashboard (company)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dashboards/{id}":{"delete":{"description":"Soft delete. Owner or analytics admin. Token scope: `analytics:write`.","operationId":"deleteCompanyAnalyticsDashboard","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Delete a dashboard (company)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false},"get":{"description":"Token scope: `analytics:read`.","operationId":"getCompanyAnalyticsDashboard","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"certified":true,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.334Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data","description":"Contract value, forecast margin, WIP, cash and safety across every active project, ranked by where to look first.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?format=csv","favorite":false,"id":1,"name":"Executive Portfolio","owner_id":1,"pack_key":"executive-portfolio","project_id":null,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"region","key":"region","kind":"multi","label":"Region"}],"tabs":[{"key":"overview","label":"Overview"},{"key":"wip","label":"WIP & cash"}],"tiles":[{"filterMap":{"period":null},"id":"contract","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_contract_value"],"sort":[]},"tab":"overview","title":"Revised contract value","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"revised-budget","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"overview","title":"Revised budget","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.334Z","version":1,"view_count":0,"visibility":"company","web_url":"/companies/1/analytics/d/1"},"schema":{"$ref":"#/components/schemas/analytics_Dashboard"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Show a dashboard (company)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"patch":{"description":"Owner (standard) or analytics admin. `certified` is admin-only. Token scope: `analytics:write`.","operationId":"updateCompanyAnalyticsDashboard","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"dashboard":{"name":"PM weekly overview (FY27)","version":3}},"schema":{"properties":{"dashboard":{"$ref":"#/components/schemas/analytics_DashboardPatch"}},"required":["dashboard"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"certified":true,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.334Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data","description":"Contract value, forecast margin, WIP, cash and safety across every active project, ranked by where to look first.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?format=csv","favorite":false,"id":1,"name":"Executive Portfolio","owner_id":1,"pack_key":"executive-portfolio","project_id":null,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"region","key":"region","kind":"multi","label":"Region"}],"tabs":[{"key":"overview","label":"Overview"},{"key":"wip","label":"WIP & cash"}],"tiles":[{"filterMap":{"period":null},"id":"contract","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_contract_value"],"sort":[]},"tab":"overview","title":"Revised contract value","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"revised-budget","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"overview","title":"Revised budget","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.334Z","version":1,"view_count":0,"visibility":"company","web_url":"/companies/1/analytics/d/1"},"schema":{"$ref":"#/components/schemas/analytics_Dashboard"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Conflict"}}},"description":"Edited by someone else since `version`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Update a dashboard (company)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dashboards/{id}/clone":{"post":{"description":"Token scope: `analytics:write`.","operationId":"cloneCompanyAnalyticsDashboard","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"PM weekly overview"},"schema":{"properties":{"name":{"type":"string"}},"required":[],"type":"object"}}},"required":false},"responses":{"201":{"content":{"application/json":{"example":{"can_edit":true,"certified":true,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.334Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data","description":"Contract value, forecast margin, WIP, cash and safety across every active project, ranked by where to look first.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?format=csv","favorite":false,"id":1,"name":"Executive Portfolio","owner_id":1,"pack_key":"executive-portfolio","project_id":null,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"region","key":"region","kind":"multi","label":"Region"}],"tabs":[{"key":"overview","label":"Overview"},{"key":"wip","label":"WIP & cash"}],"tiles":[{"filterMap":{"period":null},"id":"contract","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_contract_value"],"sort":[]},"tab":"overview","title":"Revised contract value","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"revised-budget","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"overview","title":"Revised budget","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.334Z","version":1,"view_count":0,"visibility":"company","web_url":"/companies/1/analytics/d/1"},"schema":{"$ref":"#/components/schemas/analytics_Dashboard"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Clone a dashboard into a new private copy","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dashboards/{id}/data":{"get":{"description":"Computed data of a saved dashboard (company- or project-scoped: the scope comes from the dashboard): every tile runs as the token's user with the screen's own tile query (global filters, chips, date ranges), plain query tiles share one scan. Tiles the user cannot fully read report `unavailable` / `partial` on their result; a failed tile carries `error` and never fails the call. Read: `analytics:read`. Stable URL: use it from Excel / Power BI / Sheets (`format=csv`).","operationId":"listCompanyAnalyticsDashboardData","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"base64url(JSON FilterState): dashboard filter values and cross-filter chips, as in the app URL.","in":"query","name":"f","required":false,"schema":{"type":"string"}},{"description":"Value(s) for one of the dashboard's global filters (`spec.filters[].key`), comma-separated for several; merged over `f`.","example":"open,draft","in":"query","name":"filters[<filter key>]","required":false,"schema":{"type":"string"}},{"description":"Time window for every tile (keeps each tile's time dimension). Use either this or from/to.","in":"query","name":"time_preset","required":false,"schema":{"enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"}},{"description":"Time window start (YYYY-MM-DD), every tile.","example":"2026-01-01","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"Time window end (YYYY-MM-DD), every tile.","example":"2026-09-30","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"Only this tile (`spec.tiles[].id`); 404 when there is no such tile.","example":"open","in":"query","name":"tile","required":false,"schema":{"type":"string"}},{"description":"`json` (default): per-tile results. `csv` | `xlsx` | `pdf`: the rendered file, exactly as an export (a single tile is a plain CSV table; audited).","in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","csv","xlsx","pdf"],"type":"string"}},{"description":"A saved filter view of this dashboard the caller can read (own or shared; anything else is 422). Applied first; `f` and `filters[...]` values win per key.","example":7,"in":"query","name":"view_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"as_of":"2026-10-26","filters_applied":["Period: Last 12 months"],"generated_at":"2026-10-26T04:55:00.974Z","project_id":null,"scope":"os.construction · Portfolio","target":{"id":1,"name":"Executive Portfolio","type":"dashboard"},"tiles":[{"error":null,"export_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?tile=contract&format=csv","id":"contract","kind":"query","query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_contract_value"],"sort":[]},"records":null,"result":{"columns":[{"direction":"neutral","key":"financials.revised_contract_value","label":"Revised contract value","role":"metric","type":"number","unit":"currency"}],"labels":{},"meta":{"asOf":"2026-10-26T04:55:00.974Z","cached":false,"ms":1071,"plans":[{"source":"prime_contracts","via":"base"},{"source":"prime_cos","via":"base"}],"projects":1,"timezone":"UTC"},"partial":[],"rows":[[49300000]],"totals":null,"truncated":false,"unavailable":[]},"tab":"overview","title":"Revised contract value","url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?tile=contract"},{"error":null,"export_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?tile=revised-budget&format=csv","id":"revised-budget","kind":"query","query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"records":null,"result":{"columns":[{"direction":"neutral","key":"financials.revised_budget","label":"Revised budget","role":"metric","type":"number","unit":"currency"}],"labels":{},"meta":{"asOf":"2026-10-26T04:55:00.974Z","cached":false,"ms":1966,"plans":[{"source":"budget","via":"computed"}],"projects":1,"timezone":"UTC"},"partial":[],"rows":[[43679800]],"totals":null,"truncated":false,"unavailable":[]},"tab":"overview","title":"Revised budget","url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?tile=revised-budget"}],"timezone":"UTC","url":"/rest/v1.0/companies/1/analytics/dashboards/1/data"},"schema":{"$ref":"#/components/schemas/analytics_DashboardData"}},"application/pdf":{"schema":{"format":"binary","type":"string"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}},"text/csv":{"example":"﻿Status,Open RFIs\r\nOpen,4\r\nDraft,2\r\n","schema":{"type":"string"}}},"description":"Computed data (JSON), or the rendered file for format=csv|xlsx|pdf"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"408":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Get a dashboard's computed tile data (company)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dashboards/{id}/restore":{"post":{"description":"Token scope: `analytics:write`.","operationId":"restoreCompanyAnalyticsDashboard","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"certified":true,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.334Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data","description":"Contract value, forecast margin, WIP, cash and safety across every active project, ranked by where to look first.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?format=csv","favorite":false,"id":1,"name":"Executive Portfolio","owner_id":1,"pack_key":"executive-portfolio","project_id":null,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"region","key":"region","kind":"multi","label":"Region"}],"tabs":[{"key":"overview","label":"Overview"},{"key":"wip","label":"WIP & cash"}],"tiles":[{"filterMap":{"period":null},"id":"contract","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_contract_value"],"sort":[]},"tab":"overview","title":"Revised contract value","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"revised-budget","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"overview","title":"Revised budget","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.334Z","version":1,"view_count":0,"visibility":"company","web_url":"/companies/1/analytics/d/1"},"schema":{"$ref":"#/components/schemas/analytics_Dashboard"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Restore a deleted dashboard from trash (owner or analytics admin)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dashboards/{id}/revisions":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsDashboardRevisions","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":[],"schema":{"items":{"$ref":"#/components/schemas/analytics_Revision"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List saved versions of a dashboard (newest first, max 50)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dashboards/{id}/revisions/{v}/restore":{"post":{"description":"Token scope: `analytics:write`.","operationId":"restoreCompanyAnalyticsDashboardRevision","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Revision / version number.","example":3,"in":"path","name":"v","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"version":3},"schema":{"properties":{"version":{"description":"The version you loaded; a mismatch returns 409 with edited_by / edited_at. Omit to skip the check.","minimum":1,"type":"integer"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"certified":true,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.334Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data","description":"Contract value, forecast margin, WIP, cash and safety across every active project, ranked by where to look first.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?format=csv","favorite":false,"id":1,"name":"Executive Portfolio","owner_id":1,"pack_key":"executive-portfolio","project_id":null,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"region","key":"region","kind":"multi","label":"Region"}],"tabs":[{"key":"overview","label":"Overview"},{"key":"wip","label":"WIP & cash"}],"tiles":[{"filterMap":{"period":null},"id":"contract","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_contract_value"],"sort":[]},"tab":"overview","title":"Revised contract value","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"revised-budget","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"overview","title":"Revised budget","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.334Z","version":1,"view_count":0,"visibility":"company","web_url":"/companies/1/analytics/d/1"},"schema":{"$ref":"#/components/schemas/analytics_Dashboard"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Conflict"}}},"description":"Edited by someone else since `version`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Restore a saved version of a dashboard (as a new version)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dashboards/{id}/shares":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsDashboardShares","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"shares":[]},"schema":{"$ref":"#/components/schemas/analytics_ShareList"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List who a dashboard is shared with (owner or analytics admin)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"put":{"description":"Token scope: `analytics:write`.","operationId":"replaceCompanyAnalyticsDashboardShares","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"shares":[{"principal_id":6,"principal_type":"user"}]},"schema":{"$ref":"#/components/schemas/analytics_ShareSet"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"shares":[]},"schema":{"$ref":"#/components/schemas/analytics_ShareList"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Replace the dashboard share set (owner or analytics admin; audited). Grants the dashboard, never data.","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dashboards/{id}/transfer":{"post":{"description":"Token scope: `analytics:write`.","operationId":"transferCompanyAnalyticsDashboard","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"owner_id":6},"schema":{"properties":{"owner_id":{"type":"integer"}},"required":["owner_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"certified":true,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.334Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data","description":"Contract value, forecast margin, WIP, cash and safety across every active project, ranked by where to look first.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?format=csv","favorite":false,"id":1,"name":"Executive Portfolio","owner_id":1,"pack_key":"executive-portfolio","project_id":null,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"region","key":"region","kind":"multi","label":"Region"}],"tabs":[{"key":"overview","label":"Overview"},{"key":"wip","label":"WIP & cash"}],"tiles":[{"filterMap":{"period":null},"id":"contract","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_contract_value"],"sort":[]},"tab":"overview","title":"Revised contract value","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"revised-budget","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"overview","title":"Revised budget","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.334Z","version":1,"view_count":0,"visibility":"company","web_url":"/companies/1/analytics/d/1"},"schema":{"$ref":"#/components/schemas/analytics_Dashboard"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Transfer a dashboard to a new owner (analytics admin; reaches private items of inactive owners only)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dashboards/{id}/views":{"get":{"description":"Token scope: `analytics:read`. Personal views are visible to their owner only (anyone else: 404); shared views to everyone who can open the dashboard. A view holds filter values, never data.","operationId":"listCompanyAnalyticsDashboardViews","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":[{"can_edit":true,"created_at":"2026-10-20T14:32:00.000Z","dashboard_id":42,"id":7,"name":"Open, Riverside","owner_id":6,"shared":false,"state":{"chips":[],"values":{"status":["open"]}},"updated_at":"2026-10-20T14:32:00.000Z"}],"schema":{"items":{"$ref":"#/components/schemas/analytics_SavedView"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List the dashboard's saved filter views you can see (your own and shared ones)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"post":{"description":"Token scope: `analytics:write`. Anyone who can open the dashboard may save a personal view (at most 50 per dashboard).","operationId":"createCompanyAnalyticsDashboardView","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"view":{"name":"Open, Riverside","shared":false,"state":{"chips":[],"values":{"status":["open"]}}}},"schema":{"properties":{"view":{"$ref":"#/components/schemas/analytics_SavedViewInput"}},"required":["view"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"can_edit":true,"created_at":"2026-10-20T14:32:00.000Z","dashboard_id":42,"id":7,"name":"Open, Riverside","owner_id":6,"shared":false,"state":{"chips":[],"values":{"status":["open"]}},"updated_at":"2026-10-20T14:32:00.000Z"},"schema":{"$ref":"#/components/schemas/analytics_SavedView"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Save a filter view on a dashboard (personal unless shared by a dashboard editor)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dashboards/{id}/views/{view_id}":{"delete":{"description":"Token scope: `analytics:write`. Own personal views; shared views need dashboard edit rights. Schedules that use it stop with last_status failed until edited.","operationId":"deleteCompanyAnalyticsDashboardView","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Saved view id.","example":7,"in":"path","name":"view_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Delete a saved filter view","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false},"get":{"description":"Token scope: `analytics:read`. Personal views are visible to their owner only (anyone else: 404); shared views to everyone who can open the dashboard. A view holds filter values, never data.","operationId":"getCompanyAnalyticsDashboardView","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Saved view id.","example":7,"in":"path","name":"view_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"created_at":"2026-10-20T14:32:00.000Z","dashboard_id":42,"id":7,"name":"Open, Riverside","owner_id":6,"shared":false,"state":{"chips":[],"values":{"status":["open"]}},"updated_at":"2026-10-20T14:32:00.000Z"},"schema":{"$ref":"#/components/schemas/analytics_SavedView"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Show a saved filter view","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"patch":{"description":"Token scope: `analytics:write`. Own personal views; shared views need dashboard edit rights.","operationId":"updateCompanyAnalyticsDashboardView","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Saved view id.","example":7,"in":"path","name":"view_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"view":{"name":"Open, all projects"}},"schema":{"properties":{"view":{"$ref":"#/components/schemas/analytics_SavedViewPatch"}},"required":["view"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"created_at":"2026-10-20T14:32:00.000Z","dashboard_id":42,"id":7,"name":"Open, Riverside","owner_id":6,"shared":false,"state":{"chips":[],"values":{"status":["open"]}},"updated_at":"2026-10-20T14:32:00.000Z"},"schema":{"$ref":"#/components/schemas/analytics_SavedView"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Rename, change or (un)share a saved filter view","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dimensions":{"get":{"description":"Company value groups (grp_ dimensions). Admins also see archived ones. Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsDimensions","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"value_groups":[]},"schema":{"properties":{"value_groups":{"items":{"$ref":"#/components/schemas/analytics_ValueGroup"},"type":"array"}},"required":["value_groups"],"type":"object"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List company value groups","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"post":{"description":"Analytics admin (company level). Every write is audited (analytics_value_group) and invalidates the company catalog overlay. Buckets a base dimension (static or cf_) into named groups of values, or numeric bands (max inclusive, last may be open-ended). Never SQL: values and labels are bound parameters. Live immediately. Token scope: `analytics:write`.","operationId":"createCompanyAnalyticsDimension","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"dimension":{"base":"open","description":"Open RFIs older than 14 days are trending up on two projects.","groups":[{"label":"Open RFIs","values":["open"]}],"label":"Open RFIs","other_label":"open","slug":"status"}},"schema":{"properties":{"dimension":{"$ref":"#/components/schemas/analytics_ValueGroupInput"}},"required":["dimension"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"base":"open","base_label":"open","description":"Open RFIs older than 14 days are trending up on two projects.","groups":[{"label":"Open RFIs","values":["open"]}],"id":42,"key":"grp_contract_size","label":"Open RFIs","other_label":"open","status":"published","updated_at":"2026-10-20T14:32:00.000Z","updated_by_id":6,"version":3},"schema":{"$ref":"#/components/schemas/analytics_ValueGroup"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Create a value group","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dimensions/values":{"get":{"description":"Read semantics: analytics view. The most common values (at most 500) of a dimension, run through the engine as the caller, so only values on records they can read. Feeds the value-group editor. Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsDimensionsValues","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"dim","required":true,"schema":{"maxLength":64,"type":"string"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"dim":"status","metric":"financials.prime_cos_total","values":[{"count":20,"label":"Approved","value":"approved"},{"count":9,"label":"Open","value":"open"}]},"schema":{"properties":{"dim":{"type":"string"},"metric":{"description":"The count metric holding most of the values.","type":["string","null"]},"values":{"items":{"$ref":"#/components/schemas/analytics_DimensionValue"},"type":"array"}},"required":["dim","values","metric"],"type":"object"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Distinct values of a dimension","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dimensions/{id}":{"delete":{"description":"Analytics admin (company level). Every write is audited (analytics_value_group) and invalidates the company catalog overlay. Blocked with 409 and the usage list while dashboards, explorations, alerts or schedules use it, unless force=true. Saved tiles then get 422 \"unknown dimension\", never a 500. Publish to restore. Token scope: `analytics:write`.","operationId":"deleteCompanyAnalyticsDimension","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Archive even while saved content uses it.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"base":"open","base_label":"open","description":"Open RFIs older than 14 days are trending up on two projects.","groups":[{"label":"Open RFIs","values":["open"]}],"id":42,"key":"grp_contract_size","label":"Open RFIs","other_label":"open","status":"published","updated_at":"2026-10-20T14:32:00.000Z","updated_by_id":6,"version":3},"schema":{"$ref":"#/components/schemas/analytics_ValueGroup"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_InUse"}}},"description":"In use: archive anyway with force=true"}},"summary":"Archive a value group","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false},"get":{"description":"Token scope: `analytics:read`.","operationId":"getCompanyAnalyticsDimension","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"base":"open","base_label":"open","description":"Open RFIs older than 14 days are trending up on two projects.","groups":[{"label":"Open RFIs","values":["open"]}],"id":42,"key":"grp_contract_size","label":"Open RFIs","other_label":"open","status":"published","updated_at":"2026-10-20T14:32:00.000Z","updated_by_id":6,"version":3},"schema":{"$ref":"#/components/schemas/analytics_ValueGroup"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Get a value group","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"patch":{"description":"Analytics admin (company level). Every write is audited (analytics_value_group) and invalidates the company catalog overlay. Send the version you loaded: a stale one is 409. Token scope: `analytics:write`.","operationId":"updateCompanyAnalyticsDimension","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"dimension":{"base":"open","description":"Open RFIs older than 14 days are trending up on two projects.","groups":[{"label":"Open RFIs","values":["open"]}],"label":"Open RFIs","other_label":"open"},"version":3},"schema":{"properties":{"dimension":{"$ref":"#/components/schemas/analytics_ValueGroupPatch"},"version":{"minimum":1,"type":"integer"}},"required":["dimension"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"base":"open","base_label":"open","description":"Open RFIs older than 14 days are trending up on two projects.","groups":[{"label":"Open RFIs","values":["open"]}],"id":42,"key":"grp_contract_size","label":"Open RFIs","other_label":"open","status":"published","updated_at":"2026-10-20T14:32:00.000Z","updated_by_id":6,"version":3},"schema":{"$ref":"#/components/schemas/analytics_ValueGroup"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Conflict"}}},"description":"Stale version (edit conflict)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Edit a value group","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/dimensions/{id}/publish":{"post":{"description":"Analytics admin (company level). Every write is audited (analytics_value_group) and invalidates the company catalog overlay. Token scope: `analytics:write`.","operationId":"publishCompanyAnalyticsDimension","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"base":"open","base_label":"open","description":"Open RFIs older than 14 days are trending up on two projects.","groups":[{"label":"Open RFIs","values":["open"]}],"id":42,"key":"grp_contract_size","label":"Open RFIs","other_label":"open","status":"published","updated_at":"2026-10-20T14:32:00.000Z","updated_by_id":6,"version":3},"schema":{"$ref":"#/components/schemas/analytics_ValueGroup"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Restore an archived value group","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/explorations":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsExplorations","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"1-based page","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size (default 100, max 1000)","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Trash: your deleted items (all of them for analytics admins).","in":"query","name":"filters[deleted]","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"example":[],"schema":{"items":{"$ref":"#/components/schemas/analytics_Exploration"},"type":"array"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List saved explorations","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":true},"post":{"description":"Token scope: `analytics:write`.","operationId":"createCompanyAnalyticsExploration","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"exploration":{"name":"RFIs by status","query":{"dimensions":[{"key":"status"}],"metrics":["pm.rfis_total"]},"viz":{"options":{},"type":"bar"}}},"schema":{"properties":{"exploration":{"$ref":"#/components/schemas/analytics_ExplorationInput"}},"required":["exploration"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"can_edit":true,"company_id":1,"created_at":"2026-10-20T14:32:00.000Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","description":"Open RFIs older than 14 days are trending up on two projects.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","favorite":false,"id":42,"name":"PM weekly overview","owner_id":6,"project_id":2,"query":{"compare":"previous_period","dimensions":[{"key":"status"}],"filters":[{"dim":"status","op":"eq"}],"limit":1,"metrics":["pm.rfis_open"],"sort":[{"dir":"asc","key":"pm.rfis_open"}],"time":{},"topN":{"n":1}},"updated_at":"2026-10-20T14:32:00.000Z","version":3,"view_count":12,"visibility":"private","viz":{"calcs":[{"a":"open","key":"calc_1","label":"Open RFIs","op":"pct_of_total"}],"options":{},"type":"kpi"},"web_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data"},"schema":{"$ref":"#/components/schemas/analytics_Exploration"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Save an exploration","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/explorations/{id}":{"delete":{"description":"Token scope: `analytics:write`.","operationId":"deleteCompanyAnalyticsExploration","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Delete an exploration","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false},"get":{"description":"Token scope: `analytics:read`.","operationId":"getCompanyAnalyticsExploration","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"company_id":1,"created_at":"2026-10-20T14:32:00.000Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","description":"Open RFIs older than 14 days are trending up on two projects.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","favorite":false,"id":42,"name":"PM weekly overview","owner_id":6,"project_id":2,"query":{"compare":"previous_period","dimensions":[{"key":"status"}],"filters":[{"dim":"status","op":"eq"}],"limit":1,"metrics":["pm.rfis_open"],"sort":[{"dir":"asc","key":"pm.rfis_open"}],"time":{},"topN":{"n":1}},"updated_at":"2026-10-20T14:32:00.000Z","version":3,"view_count":12,"visibility":"private","viz":{"calcs":[{"a":"open","key":"calc_1","label":"Open RFIs","op":"pct_of_total"}],"options":{},"type":"kpi"},"web_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data"},"schema":{"$ref":"#/components/schemas/analytics_Exploration"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Show an exploration","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"patch":{"description":"Token scope: `analytics:write`.","operationId":"updateCompanyAnalyticsExploration","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"exploration":{"description":"Open RFIs older than 14 days are trending up on two projects.","favorite":false,"name":"PM weekly overview","query":{"metrics":["pm.rfis_open"]},"version":3,"visibility":"private","viz":{"type":"kpi"}}},"schema":{"properties":{"exploration":{"$ref":"#/components/schemas/analytics_ExplorationPatch"}},"required":["exploration"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"company_id":1,"created_at":"2026-10-20T14:32:00.000Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","description":"Open RFIs older than 14 days are trending up on two projects.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","favorite":false,"id":42,"name":"PM weekly overview","owner_id":6,"project_id":2,"query":{"compare":"previous_period","dimensions":[{"key":"status"}],"filters":[{"dim":"status","op":"eq"}],"limit":1,"metrics":["pm.rfis_open"],"sort":[{"dir":"asc","key":"pm.rfis_open"}],"time":{},"topN":{"n":1}},"updated_at":"2026-10-20T14:32:00.000Z","version":3,"view_count":12,"visibility":"private","viz":{"calcs":[{"a":"open","key":"calc_1","label":"Open RFIs","op":"pct_of_total"}],"options":{},"type":"kpi"},"web_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data"},"schema":{"$ref":"#/components/schemas/analytics_Exploration"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Conflict"}}},"description":"Edited by someone else since `version`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Update an exploration","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/explorations/{id}/data":{"get":{"description":"Computed data of a saved exploration (one tile, id `result`): every tile runs as the token's user with the screen's own tile query (global filters, chips, date ranges), plain query tiles share one scan. Tiles the user cannot fully read report `unavailable` / `partial` on their result; a failed tile carries `error` and never fails the call. Read: `analytics:read`. Project-scoped explorations need their `project_id`.","operationId":"listCompanyAnalyticsExplorationData","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Time window for every tile (keeps each tile's time dimension). Use either this or from/to.","in":"query","name":"time_preset","required":false,"schema":{"enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"}},{"description":"Time window start (YYYY-MM-DD), every tile.","example":"2026-01-01","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"Time window end (YYYY-MM-DD), every tile.","example":"2026-09-30","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"`json` (default): per-tile results. `csv` | `xlsx` | `pdf`: the rendered file, exactly as an export (a single tile is a plain CSV table; audited).","in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","csv","xlsx","pdf"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"as_of":"2026-10-26","filters_applied":[],"generated_at":"2026-10-26T04:55:00.974Z","project_id":2,"scope":"Riverside Medical Center","target":{"id":17,"name":"RFIs by status","type":"exploration"},"tiles":[{"error":null,"export_url":"/rest/v1.0/companies/1/analytics/explorations/17/data?project_id=2&tile=result&format=csv","id":"result","kind":"query","query":{"dimensions":[{"key":"status"}],"filters":[],"limit":1000,"metrics":["pm.rfis_open","pm.rfis_total"],"sort":[]},"records":null,"result":{"columns":[{"key":"status","label":"Status","role":"dim","type":"string"},{"direction":"lower_better","key":"pm.rfis_open","label":"Open rfis","role":"metric","type":"number","unit":"count"}],"labels":{"status":{"closed":"Closed","draft":"Draft","open":"Open"}},"meta":{"asOf":"2026-10-26T04:51:43.045Z","cached":false,"ms":391,"plans":[{"source":"rfis","via":"base"}],"projects":1,"timezone":"UTC"},"partial":[],"rows":[["open",4],["closed",0],["draft",0]],"totals":[4,8],"truncated":false,"unavailable":[]},"tab":null,"title":"RFIs by status","url":"/rest/v1.0/companies/1/analytics/explorations/17/data?project_id=2&tile=result"}],"timezone":"UTC","url":"/rest/v1.0/companies/1/analytics/explorations/17/data?project_id=2"},"schema":{"$ref":"#/components/schemas/analytics_DashboardData"}},"application/pdf":{"schema":{"format":"binary","type":"string"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}},"text/csv":{"example":"﻿Status,Open RFIs\r\nOpen,4\r\nDraft,2\r\n","schema":{"type":"string"}}},"description":"Computed data (JSON), or the rendered file for format=csv|xlsx|pdf"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"408":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Get a saved exploration's result","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/explorations/{id}/restore":{"post":{"description":"Token scope: `analytics:write`.","operationId":"restoreCompanyAnalyticsExploration","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"company_id":1,"created_at":"2026-10-20T14:32:00.000Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","description":"Open RFIs older than 14 days are trending up on two projects.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","favorite":false,"id":42,"name":"PM weekly overview","owner_id":6,"project_id":2,"query":{"compare":"previous_period","dimensions":[{"key":"status"}],"filters":[{"dim":"status","op":"eq"}],"limit":1,"metrics":["pm.rfis_open"],"sort":[{"dir":"asc","key":"pm.rfis_open"}],"time":{},"topN":{"n":1}},"updated_at":"2026-10-20T14:32:00.000Z","version":3,"view_count":12,"visibility":"private","viz":{"calcs":[{"a":"open","key":"calc_1","label":"Open RFIs","op":"pct_of_total"}],"options":{},"type":"kpi"},"web_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data"},"schema":{"$ref":"#/components/schemas/analytics_Exploration"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Restore a deleted exploration from trash (owner or analytics admin)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/explorations/{id}/revisions":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsExplorationRevisions","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":[{"actor_id":6,"actor_name":"open","created_at":"2026-10-20T14:32:00.000Z","current":false,"name":"PM weekly overview","summary":"Open RFIs older than 14 days are trending up on two projects.","version":3}],"schema":{"items":{"$ref":"#/components/schemas/analytics_Revision"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List saved versions of a exploration (newest first, max 50)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/explorations/{id}/revisions/{v}/restore":{"post":{"description":"Token scope: `analytics:write`.","operationId":"restoreCompanyAnalyticsExplorationRevision","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Revision / version number.","example":3,"in":"path","name":"v","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"version":3},"schema":{"properties":{"version":{"description":"The version you loaded; a mismatch returns 409 with edited_by / edited_at. Omit to skip the check.","minimum":1,"type":"integer"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"company_id":1,"created_at":"2026-10-20T14:32:00.000Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","description":"Open RFIs older than 14 days are trending up on two projects.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","favorite":false,"id":42,"name":"PM weekly overview","owner_id":6,"project_id":2,"query":{"compare":"previous_period","dimensions":[{"key":"status"}],"filters":[{"dim":"status","op":"eq"}],"limit":1,"metrics":["pm.rfis_open"],"sort":[{"dir":"asc","key":"pm.rfis_open"}],"time":{},"topN":{"n":1}},"updated_at":"2026-10-20T14:32:00.000Z","version":3,"view_count":12,"visibility":"private","viz":{"calcs":[{"a":"open","key":"calc_1","label":"Open RFIs","op":"pct_of_total"}],"options":{},"type":"kpi"},"web_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data"},"schema":{"$ref":"#/components/schemas/analytics_Exploration"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Conflict"}}},"description":"Edited by someone else since `version`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Restore a saved version of a exploration (as a new version)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/explorations/{id}/shares":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsExplorationShares","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"shares":[]},"schema":{"$ref":"#/components/schemas/analytics_ShareList"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List who a exploration is shared with (owner or analytics admin)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"put":{"description":"Token scope: `analytics:write`.","operationId":"replaceCompanyAnalyticsExplorationShares","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"shares":[{"principal_id":6,"principal_type":"user"}]},"schema":{"$ref":"#/components/schemas/analytics_ShareSet"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"shares":[]},"schema":{"$ref":"#/components/schemas/analytics_ShareList"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Replace the exploration share set (owner or analytics admin; audited). Grants the exploration, never data.","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/explorations/{id}/transfer":{"post":{"description":"Token scope: `analytics:write`.","operationId":"transferCompanyAnalyticsExploration","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"owner_id":6},"schema":{"properties":{"owner_id":{"type":"integer"}},"required":["owner_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"company_id":1,"created_at":"2026-10-20T14:32:00.000Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","description":"Open RFIs older than 14 days are trending up on two projects.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","favorite":false,"id":42,"name":"PM weekly overview","owner_id":6,"project_id":2,"query":{"compare":"previous_period","dimensions":[{"key":"status"}],"filters":[{"dim":"status","op":"eq"}],"limit":1,"metrics":["pm.rfis_open"],"sort":[{"dir":"asc","key":"pm.rfis_open"}],"time":{},"topN":{"n":1}},"updated_at":"2026-10-20T14:32:00.000Z","version":3,"view_count":12,"visibility":"private","viz":{"calcs":[{"a":"open","key":"calc_1","label":"Open RFIs","op":"pct_of_total"}],"options":{},"type":"kpi"},"web_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data"},"schema":{"$ref":"#/components/schemas/analytics_Exploration"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Transfer a exploration to a new owner (analytics admin; reaches private items of inactive owners only)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/exports":{"post":{"description":"CSV / XLSX / PDF of a query, detail, dashboard or pack, rendered with the caller's permissions. Audited.\n\nB2: `export.cover` (PDF) prepends a cover page (title, company, project or scope, every filter applied, data as-of). PDFs show the company name as the eyebrow, its JPEG logo when the company has one (data: URL, passed through as /DCTDecode; PNG skipped), and the filters applied in every page footer. Token scope: `analytics:read`.","operationId":"createCompanyAnalyticsExport","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"export":{"dashboard_id":42,"format":"csv","kind":"dashboard","tile_id":"by_status","time":{"preset":"ytd"}}},"schema":{"properties":{"export":{"$ref":"#/components/schemas/analytics_ExportRequest"}},"required":["export"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"example":{"download_url":null,"error":null,"id":311,"percent_complete":0,"status":"queued"},"schema":{"$ref":"#/components/schemas/analytics_ExportJob"}}},"description":"Accepted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Start an export job","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/exports/{id}":{"get":{"description":"Your export jobs and scheduled deliveries addressed to you. download_url is set once succeeded and points at exports/{id}/download. Token scope: `analytics:read`.","operationId":"getCompanyAnalyticsExport","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"download_url":"/rest/v1.0/companies/1/analytics/exports/311/download","error":null,"id":311,"percent_complete":100,"status":"succeeded"},"schema":{"$ref":"#/components/schemas/analytics_ExportJob"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Export job status","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/exports/{id}/download":{"get":{"description":"The file rendered for the caller. A scoped token may only download files rendered within its own scopes (403 otherwise). Access to the export's scope is re-checked. Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsExportDownload","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"The file"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Download your copy of an export or scheduled delivery","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/goals":{"get":{"description":"Goals the caller can open: company goals (company analytics) and goals on projects where the caller has analytics; private goals only for their owner, creator and share grantees. With project_id, that project's goals only. Values are not included (GET …/goals/{id}/value computes one). Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsGoals","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"1-based page","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size (default 100, max 1000)","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":[],"schema":{"items":{"$ref":"#/components/schemas/analytics_Goal"},"type":"array"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List goals","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":true},"post":{"description":"Needs analytics standard at the scope. The metric must be readable by the caller there. alert_when_behind creates a linked KPI alert (owner and caller as recipients) that is deleted with the goal. Audited. Token scope: `analytics:write`.","operationId":"createCompanyAnalyticsGoal","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"goal":{"alert_when_behind":false,"due_date":"2026-10-01","filters":[{}],"metric_key":"pm.rfis_open","name":"PM weekly overview","op":"gte","owner_id":6,"target":12.5,"visibility":"private","window":"last_7d"}},"schema":{"properties":{"goal":{"$ref":"#/components/schemas/analytics_GoalInput"}},"required":["goal"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"alert_rule_id":6,"alert_when_behind":false,"can_edit":true,"can_manage":false,"company_id":1,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"due_date":"2026-10-01","filters":[{}],"id":42,"latest_check_in":{"as_of":"2026-10-01","author_id":6,"author_name":"open","created_at":"2026-10-20T14:32:00.000Z","goal_id":6,"id":42,"note":"Open RFIs older than 14 days are trending up on two projects.","status":"on_track"},"metric_key":"pm.rfis_open","name":"PM weekly overview","op":"gte","owner_id":6,"owner_name":"open","project_id":2,"setting_key":"open","target":12.5,"updated_at":"2026-10-20T14:32:00.000Z","visibility":"private","window":"open"},"schema":{"$ref":"#/components/schemas/analytics_Goal"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Create a goal","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/goals/{id}":{"delete":{"description":"Owner / creator (standard) or analytics admin. Deletes the linked alert rule and the goal's shares. Audited. Token scope: `analytics:write`.","operationId":"deleteCompanyAnalyticsGoal","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Delete a goal","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false},"get":{"description":"404 unless the caller can open the goal (scope gate, then private visibility). Token scope: `analytics:read`.","operationId":"getCompanyAnalyticsGoal","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"alert_rule_id":6,"alert_when_behind":false,"can_edit":true,"can_manage":false,"company_id":1,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"due_date":"2026-10-01","filters":[{}],"id":42,"latest_check_in":{"as_of":"2026-10-01","author_id":6,"author_name":"open","created_at":"2026-10-20T14:32:00.000Z","goal_id":6,"id":42,"note":"Open RFIs older than 14 days are trending up on two projects.","status":"on_track"},"metric_key":"pm.rfis_open","name":"PM weekly overview","op":"gte","owner_id":6,"owner_name":"open","project_id":2,"setting_key":"open","target":12.5,"updated_at":"2026-10-20T14:32:00.000Z","visibility":"private","window":"open"},"schema":{"$ref":"#/components/schemas/analytics_Goal"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Get a goal","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"patch":{"description":"Owner, creator or edit grantee with analytics standard, or an analytics admin. Visibility, owner and alert_when_behind are for the owner / creator / admin only. A goal with setting_key mirrors that settings target: its target is changed in Analytics settings (422 here). Audited. Token scope: `analytics:write`.","operationId":"updateCompanyAnalyticsGoal","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"goal":{"alert_when_behind":false,"due_date":"2026-10-01","filters":[{}],"name":"PM weekly overview","op":"gte","owner_id":6,"target":12.5,"visibility":"private","window":"last_7d"}},"schema":{"properties":{"goal":{"$ref":"#/components/schemas/analytics_GoalPatch"}},"required":["goal"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"alert_rule_id":6,"alert_when_behind":false,"can_edit":true,"can_manage":false,"company_id":1,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"due_date":"2026-10-01","filters":[{}],"id":42,"latest_check_in":{"as_of":"2026-10-01","author_id":6,"author_name":"open","created_at":"2026-10-20T14:32:00.000Z","goal_id":6,"id":42,"note":"Open RFIs older than 14 days are trending up on two projects.","status":"on_track"},"metric_key":"pm.rfis_open","name":"PM weekly overview","op":"gte","owner_id":6,"owner_name":"open","project_id":2,"setting_key":"open","target":12.5,"updated_at":"2026-10-20T14:32:00.000Z","visibility":"private","window":"open"},"schema":{"$ref":"#/components/schemas/analytics_Goal"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Update a goal","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/goals/{id}/checkins":{"get":{"description":"Newest first. Notes can quote numbers, so this is 404 to anyone who cannot open the goal. Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsGoalCheckins","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"1-based page","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size (default 100, max 1000)","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":[{"as_of":"2026-10-01","author_id":6,"author_name":"open","created_at":"2026-10-20T14:32:00.000Z","goal_id":6,"id":42,"note":"Open RFIs older than 14 days are trending up on two projects.","status":"on_track"}],"schema":{"items":{"$ref":"#/components/schemas/analytics_GoalCheckIn"},"type":"array"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List a goal's check-ins","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":true},"post":{"description":"Owner, creator, edit grantee (standard) or analytics admin. A status overrides the automatic status until the next check-in; a null status is a note only. as_of defaults to today and cannot be in the future. Audited (status only, never the note). Token scope: `analytics:write`.","operationId":"createCompanyAnalyticsGoalCheckin","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"check_in":{"as_of":"2026-10-01","note":"Open RFIs older than 14 days are trending up on two projects.","status":"on_track"}},"schema":{"properties":{"check_in":{"$ref":"#/components/schemas/analytics_GoalCheckInInput"}},"required":["check_in"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"as_of":"2026-10-01","author_id":6,"author_name":"open","created_at":"2026-10-20T14:32:00.000Z","goal_id":6,"id":42,"note":"Open RFIs older than 14 days are trending up on two projects.","status":"on_track"},"schema":{"$ref":"#/components/schemas/analytics_GoalCheckIn"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Check in on a goal","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/goals/{id}/value":{"get":{"description":"Never stored: the metric runs through the engine with the caller's permissions (and token scopes). Any unreadable input gives value null with an unavailable reason, never 0 or a partial total. history is the weekly as_of snapshot series (last 12 weeks), only for unfiltered snapshot metrics. Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsGoalValue","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"as_of":"2026-10-01","auto_status":"met","goal_id":6,"history":[{"as_of":"2026-10-20T14:32:00.000Z","value":12.5}],"history_note":"Open RFIs older than 14 days are trending up on two projects.","op":"gte","status":"met","status_source":"auto","target":12.5,"unavailable":"forbidden","value":12.5},"schema":{"$ref":"#/components/schemas/analytics_GoalValue"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"A goal's value, computed now as the caller","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/health":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsHealth","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"generated_at":"2026-10-26T04:52:36.850Z","scope":{"company_id":1,"project_id":null,"projects":1},"slow_queries":[{"at":"2026-10-26T04:46:37.728Z","ms":549,"sql":"SELECT g.key AS grain, sum(g.value::bigint)::float8 AS rows, sum(split_part(s.fingerprint, ':', 1)::bigint)::float8 AS src FROM analytics_rollup_state s CROSS JOIN LATERAL jsonb_each_text(COALESCE(s.grain_rows, '{}'::jsonb)) g WHERE s.so..."},{"at":"2026-10-26T04:46:37.707Z","ms":528,"sql":"SELECT d0,SUM(v0)::float8 AS m0, GROUPING(d0)::int AS g FROM (SELECT to_char(date_trunc($1, (cp.paid_at)::timestamp), 'YYYY-MM-DD') AS d0,(cp.amount) AS v0 FROM contract_payments cp JOIN projects p ON p.id = cp.project_id WHERE (p.is_tes..."}],"slow_threshold_ms":500,"snapshots":{"coverage_pct":100,"expected_metrics":49,"latest_as_of":"2026-10-26","metrics":49,"projects_covered":1,"projects_total":1,"rows":49},"sources":[{"label":"RFIs","last_updated_at":"2026-10-26T04:16:53.817Z","projects":1,"rows":8,"source":"rfis","tool":"rfis"},{"label":"Submittals","last_updated_at":"2026-10-26T04:16:34.799Z","projects":1,"rows":5,"source":"submittals","tool":"submittals"}]},"schema":{"$ref":"#/components/schemas/analytics_Health"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Analytics data health","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/insights":{"get":{"description":"Visible when the caller can read `tool` on the insight's project, and is that tool's admin when the insight derives from row-private data. Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsInsights","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"info | warn | crit | good","in":"query","name":"filters[severity]","required":false,"schema":{"type":"string"}},{"description":"Domain key","in":"query","name":"filters[domain]","required":false,"schema":{"type":"string"}},{"description":"open (default) | dismissed | resolved","in":"query","name":"filters[status]","required":false,"schema":{"type":"string"}},{"description":"1-based page","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size (default 100, max 1000)","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":[{"action":"Review the late activities with their owners and update forecasts in the schedule.","assignee_id":null,"company_id":1,"data":{"adminTools":["schedule"],"domain":"schedule","drill":{"dimensions":[{"key":"assignee"}],"metrics":["schedule.tasks_late"]},"facts":[{"label":"Late tasks","value":"3"},{"label":"Incomplete tasks","value":"8"}],"series":{"label":"Late tasks","points":[{"x":"2025-10-31","y":0},{"x":"2025-11-30","y":0}],"unit":"count"},"threshold":10,"tools":["schedule"],"unit":"pct","value":37.5},"dismiss_reason":null,"dismissed_by_id":null,"domain":"schedule","first_seen_at":"2026-10-26T04:40:53.362Z","id":2,"last_seen_at":"2026-10-26T04:40:53.362Z","magnitude":2.75,"metric_keys":["schedule.tasks_late","schedule.tasks_total"],"modeled":false,"narrative":"24-118 - Riverside Medical Center has 3 late tasks out of 8 incomplete.","project_id":2,"rule_key":"late_task_surge","score":0.565,"severity":"warn","status":"open","task_item_id":null,"title":"3 late tasks (38% of remaining work)","tool":"schedule","type":"trend"},{"action":"Make the daily log part of the superintendent's end-of-day routine.","assignee_id":null,"company_id":1,"data":{"adminTools":[],"domain":"field","drill":{"dimensions":[{"grain":"week","key":"date"}],"metrics":["field.log_compliance"],"time":{"preset":"last_90d"}},"threshold":95,"tools":["daily_log"],"unit":"pct","value":0},"dismiss_reason":null,"dismissed_by_id":null,"domain":"field","first_seen_at":"2026-10-26T04:40:53.362Z","id":3,"last_seen_at":"2026-10-26T04:40:53.362Z","magnitude":1,"metric_keys":["field.log_compliance"],"modeled":false,"narrative":"Only 0.0% of expected daily logs on 24-118 - Riverside Medical Center were completed in the last 30 days. Missing logs weaken delay claims and hide field problems.","project_id":2,"rule_key":"log_compliance_low","score":0.401,"severity":"warn","status":"open","task_item_id":null,"title":"Daily logs 0% complete (target 95%)","tool":"daily_log","type":"threshold"}],"schema":{"items":{"$ref":"#/components/schemas/analytics_Insight"},"type":"array"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List insights visible to the caller","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/analytics/insights/evaluate":{"post":{"description":"Token scope: `analytics:write`.","operationId":"createCompanyAnalyticsInsightsEvaluate","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"202":{"content":{"application/json":{"example":{"download_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","error":"Open RFIs older than 14 days are trending up on two projects.","id":42,"percent_complete":100,"status":"queued"},"schema":{"$ref":"#/components/schemas/analytics_ExportJob"}}},"description":"Queued"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Evaluate insight rules now (analytics admin)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/insights/{id}":{"patch":{"description":"Needs analytics standard on the insight's project (or company admin). The assignee must be able to see the insight (analytics view, read on every input tool, tool admin when row-private); otherwise 422. The assignee is notified (`assigned`, title and link only). A dismiss reason needs the insight dismissed; reopening clears it. Token scope: `analytics:write`.","operationId":"updateCompanyAnalyticsInsight","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"insight":{"assignee_id":6,"dismiss_reason":"Open RFIs older than 14 days are trending up on two projects.","status":"open"}},"schema":{"additionalProperties":false,"properties":{"insight":{"additionalProperties":false,"minProperties":1,"properties":{"assignee_id":{"minimum":1,"type":["integer","null"]},"dismiss_reason":{"maxLength":280,"type":["string","null"]},"status":{"enum":["open","dismissed"],"type":"string"}},"type":"object"}},"required":["insight"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"action":"Review the late activities with their owners and update forecasts in the schedule.","assignee_id":null,"company_id":1,"data":{"adminTools":["schedule"],"domain":"schedule","drill":{"dimensions":[{"key":"assignee"}],"metrics":["schedule.tasks_late"]},"facts":[{"label":"Late tasks","value":"3"},{"label":"Incomplete tasks","value":"8"}],"series":{"label":"Late tasks","points":[{"x":"2025-10-31","y":0},{"x":"2025-11-30","y":0}],"unit":"count"},"threshold":10,"tools":["schedule"],"unit":"pct","value":37.5},"dismiss_reason":null,"dismissed_by_id":null,"domain":"schedule","first_seen_at":"2026-10-26T04:40:53.362Z","id":2,"last_seen_at":"2026-10-26T04:40:53.362Z","magnitude":2.75,"metric_keys":["schedule.tasks_late","schedule.tasks_total"],"modeled":false,"narrative":"24-118 - Riverside Medical Center has 3 late tasks out of 8 incomplete.","project_id":2,"rule_key":"late_task_surge","score":0.565,"severity":"warn","status":"open","task_item_id":null,"title":"3 late tasks (38% of remaining work)","tool":"schedule","type":"trend"},"schema":{"$ref":"#/components/schemas/analytics_Insight"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Dismiss / reopen an insight, give it a reason, or assign it","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/insights/{id}/task":{"post":{"description":"Tasks create permission on the insight's project (tokens: analytics:write and tasks:write). One task per insight: a repeat call returns it (200). Company-level insights are 422. The task is private, titled with the insight, and links back to it.","operationId":"taskCompanyAnalyticsInsight","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"created":false,"number":"open","project_id":2,"task_item_id":6,"title":"PM weekly overview","url":"/rest/v1.0/companies/1/analytics/dashboards/42/data"},"schema":{"$ref":"#/components/schemas/analytics_InsightTask"}}},"description":"The existing task"},"201":{"content":{"application/json":{"example":{"created":false,"number":"open","project_id":2,"task_item_id":6,"title":"PM weekly overview","url":"/rest/v1.0/companies/1/analytics/dashboards/42/data"},"schema":{"$ref":"#/components/schemas/analytics_InsightTask"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Create (or return) the task for a project insight","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/metrics":{"get":{"description":"Analytics admins see drafts and archived metrics; everyone else sees published ones. Published metrics also appear in GET catalog for viewers who can read every input. Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsMetrics","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"status","required":false,"schema":{"enum":["draft","published","archived"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"metrics":[]},"schema":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/analytics_CustomMetric"},"type":"array"}},"required":["metrics"],"type":"object"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List company custom metrics","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"post":{"description":"Analytics admin (company level). Every write is audited (analytics_custom_metric) and invalidates the company catalog overlay. The definition is validated against the company catalog: unknown or incompatible dims, depth or size overflow and custom-in-custom refs are 422. Token scope: `analytics:write`.","operationId":"createCompanyAnalyticsMetric","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"metric":{"definition":{"base":"open","kind":"segment"},"description":"Open RFIs older than 14 days are trending up on two projects.","direction":"higher_better","domain":"open","label":"Open RFIs","slug":"status","synonyms":["open"],"unit":"count"}},"schema":{"properties":{"metric":{"$ref":"#/components/schemas/analytics_CustomMetricInput"}},"required":["metric"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"certified":false,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"definition":{"base":"open","kind":"segment"},"description":"Open RFIs older than 14 days are trending up on two projects.","direction":"open","domain":"open","id":42,"key":"pm.rfis_open","label":"Open RFIs","status":"draft","summary":"Open RFIs older than 14 days are trending up on two projects.","synonyms":["open"],"unit":"open","updated_at":"2026-10-20T14:32:00.000Z","updated_by_id":6,"version":3},"schema":{"$ref":"#/components/schemas/analytics_CustomMetric"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Create a custom metric (draft)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/metrics/preview":{"post":{"description":"Runs the draft through the engine as the caller (analytics admin), with the same tenancy, row privacy and fail-closed rules as a published metric. Nothing is saved. Token scope: `analytics:read`.","operationId":"createCompanyAnalyticsMetricsPreview","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"definition":{"base":"open","kind":"segment"},"label":"Open RFIs","query":{},"unit":"count"},"schema":{"properties":{"definition":{"$ref":"#/components/schemas/analytics_CustomMetricDefinition"},"label":{"type":"string"},"query":{"additionalProperties":true,"description":"dimensions, filters, time and limit of the preview (QueryBody subset).","type":"object"},"unit":{"enum":["count","currency","hours","days","pct","ratio","rate","sqft","currency_per_sqft"],"type":"string"}},"required":["definition"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"columns":[{"key":"status","label":"Status","role":"dim","type":"string"},{"direction":"lower_better","key":"pm.rfis_open","label":"Open rfis","role":"metric","type":"number","unit":"count"}],"labels":{"status":{"closed":"Closed","draft":"Draft","open":"Open"}},"meta":{"asOf":"2026-10-26T04:51:43.045Z","cached":false,"ms":391,"plans":[{"source":"rfis","via":"base"}],"projects":1,"timezone":"UTC"},"partial":[],"rows":[["open",4],["closed",0],["draft",0]],"totals":[4,8],"truncated":false,"unavailable":[]},"schema":{"$ref":"#/components/schemas/analytics_QueryResult"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"408":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Preview an unsaved custom metric definition","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/metrics/{id}":{"delete":{"description":"Analytics admin (company level). Every write is audited (analytics_custom_metric) and invalidates the company catalog overlay. C2: blocked with 409 and the usage list while saved content uses it, unless force=true. Saved tiles, alerts and exports that use it then get 422 \"the custom metric was archived\", never a 500. Publish again to restore it. Token scope: `analytics:write`.","operationId":"deleteCompanyAnalyticsMetric","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Archive even while saved content uses it.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"certified":false,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"definition":{"base":"open","kind":"segment"},"description":"Open RFIs older than 14 days are trending up on two projects.","direction":"open","domain":"open","id":42,"key":"pm.rfis_open","label":"Open RFIs","status":"draft","summary":"Open RFIs older than 14 days are trending up on two projects.","synonyms":["open"],"unit":"open","updated_at":"2026-10-20T14:32:00.000Z","updated_by_id":6,"version":3},"schema":{"$ref":"#/components/schemas/analytics_CustomMetric"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_InUse"}}},"description":"In use: archive anyway with force=true"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Archive a custom metric","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false},"get":{"description":"Token scope: `analytics:read`.","operationId":"getCompanyAnalyticsMetric","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"certified":false,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"definition":{"base":"open","kind":"segment"},"description":"Open RFIs older than 14 days are trending up on two projects.","direction":"open","domain":"open","id":42,"key":"pm.rfis_open","label":"Open RFIs","status":"draft","summary":"Open RFIs older than 14 days are trending up on two projects.","synonyms":["open"],"unit":"open","updated_at":"2026-10-20T14:32:00.000Z","updated_by_id":6,"version":3},"schema":{"$ref":"#/components/schemas/analytics_CustomMetric"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Get a custom metric","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"patch":{"description":"Analytics admin (company level). Every write is audited (analytics_custom_metric) and invalidates the company catalog overlay. Saves a new version and clears certification. A stale `version` is 409. Token scope: `analytics:write`.","operationId":"updateCompanyAnalyticsMetric","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"metric":{},"version":3},"schema":{"properties":{"metric":{"description":"Any CustomMetricInput field except slug.","type":"object"},"version":{"minimum":1,"type":"integer"}},"required":["metric"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"certified":false,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"definition":{"base":"open","kind":"segment"},"description":"Open RFIs older than 14 days are trending up on two projects.","direction":"open","domain":"open","id":42,"key":"pm.rfis_open","label":"Open RFIs","status":"draft","summary":"Open RFIs older than 14 days are trending up on two projects.","synonyms":["open"],"unit":"open","updated_at":"2026-10-20T14:32:00.000Z","updated_by_id":6,"version":3},"schema":{"$ref":"#/components/schemas/analytics_CustomMetric"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Conflict"}}},"description":"Edited by someone else since `version`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Edit a custom metric (new version)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/metrics/{id}/publish":{"post":{"description":"Analytics admin (company level). Every write is audited (analytics_custom_metric) and invalidates the company catalog overlay. Re-validates the definition first. Token scope: `analytics:write`.","operationId":"publishCompanyAnalyticsMetric","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"certified":false,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"definition":{"base":"open","kind":"segment"},"description":"Open RFIs older than 14 days are trending up on two projects.","direction":"open","domain":"open","id":42,"key":"pm.rfis_open","label":"Open RFIs","status":"draft","summary":"Open RFIs older than 14 days are trending up on two projects.","synonyms":["open"],"unit":"open","updated_at":"2026-10-20T14:32:00.000Z","updated_by_id":6,"version":3},"schema":{"$ref":"#/components/schemas/analytics_CustomMetric"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Publish a custom metric","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/metrics/{id}/versions":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsMetricVersions","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"versions":[{"changed_by":{"id":42,"name":"PM weekly overview"},"created_at":"2026-10-20T14:32:00.000Z","definition":{"base":"open","kind":"segment"},"direction":"open","label":"Open RFIs","summary":"Open RFIs older than 14 days are trending up on two projects.","unit":"open","version":3}]},"schema":{"properties":{"versions":{"items":{"$ref":"#/components/schemas/analytics_CustomMetricVersion"},"type":"array"}},"required":["versions"],"type":"object"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Custom metric version history (newest first)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/metrics/{id}/versions/{v}/restore":{"post":{"description":"Token scope: `analytics:write`.","operationId":"restoreCompanyAnalyticsMetricVersion","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Revision / version number.","example":3,"in":"path","name":"v","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"version":3},"schema":{"properties":{"version":{"description":"The version you loaded; a mismatch returns 409.","minimum":1,"type":"integer"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"example":{"certified":false,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"definition":{"base":"open","kind":"segment"},"description":"Open RFIs older than 14 days are trending up on two projects.","direction":"open","domain":"open","id":42,"key":"pm.rfis_open","label":"Open RFIs","status":"draft","summary":"Open RFIs older than 14 days are trending up on two projects.","synonyms":["open"],"unit":"open","updated_at":"2026-10-20T14:32:00.000Z","updated_by_id":6,"version":3},"schema":{"$ref":"#/components/schemas/analytics_CustomMetric"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Conflict"}}},"description":"Edited by someone else since `version`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Restore a custom metric version (as a new version)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/packs":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsPacks","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"company | project","in":"query","name":"filters[scope]","required":false,"schema":{"type":"string"}},{"description":"Domain key","in":"query","name":"filters[domain]","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":[{"dashboard":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"region","key":"region","kind":"multi","label":"Region"}],"tabs":[{"key":"overview","label":"Overview"},{"key":"wip","label":"WIP & cash"}],"tiles":[{"filterMap":{"period":null},"id":"contract","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_contract_value"],"sort":[]},"tab":"overview","title":"Revised contract value","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"revised-budget","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"overview","title":"Revised budget","viz":{"options":{},"type":"kpi"}}],"version":1},"description":"Contract value, forecast margin, WIP, cash and safety across every active project, ranked by where to look first.","domain":"portfolio","key":"executive-portfolio","persona":"Executive","scope":"company","title":"Executive portfolio"},{"dashboard":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"division","key":"division","kind":"multi","label":"Division"}],"tabs":[{"key":"forecast","label":"Forecast"},{"key":"codes","label":"Cost codes"}],"tiles":[{"filterMap":{"period":null},"id":"revised","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"forecast","title":"Revised budget","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"projected-costs","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.projected_costs"],"sort":[]},"tab":"forecast","title":"Projected costs","viz":{"options":{},"type":"kpi"}}],"version":1},"description":"From original budget to forecast at completion: the budget bridge, where costs are committed, which cost codes are burning fastest, and the spend curve.","domain":"financials","key":"budget-cost","persona":"Project manager","scope":"both","title":"Budget & cost"}],"schema":{"items":{"$ref":"#/components/schemas/analytics_Pack"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List report packs","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/packs/{key}":{"get":{"description":"Token scope: `analytics:read`.","operationId":"getCompanyAnalyticsPack","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"dashboard":{"filters":[{"default":{"preset":"last_12m"},"dim":"created","key":"period","kind":"date_range","label":"Created"},{"dim":"project","key":"project","kind":"multi","label":"Project"}],"tiles":[{"id":"rfis-open","kind":"query","layout":{"h":2,"w":3,"x":0,"y":0},"query":{"compare":"previous_period","dimensions":[],"filters":[],"limit":1000,"metrics":["pm.rfis_open"],"sort":[]},"title":"Open RFIs","viz":{"options":{"sparkline":true},"type":"kpi"}},{"id":"rfis-late","kind":"query","layout":{"h":2,"w":3,"x":3,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["pm.rfis_late"],"sort":[]},"title":"Late RFIs","viz":{"options":{},"type":"kpi"}}],"version":1},"description":"Open and late RFIs, submittals and punch items, who holds the ball, and how fast items close.","domain":"pm","key":"sample-pm-overview","persona":"Project manager","scope":"both","title":"PM overview"},"schema":{"$ref":"#/components/schemas/analytics_Pack"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Show a report pack","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/packs/{key}/clone":{"post":{"description":"Token scope: `analytics:write`.","operationId":"cloneCompanyAnalyticsPack","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"PM weekly overview"},"schema":{"properties":{"name":{"type":"string"}},"required":[],"type":"object"}}},"required":false},"responses":{"201":{"content":{"application/json":{"example":{"can_edit":true,"certified":true,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.334Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data","description":"Contract value, forecast margin, WIP, cash and safety across every active project, ranked by where to look first.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?format=csv","favorite":false,"id":1,"name":"Executive Portfolio","owner_id":1,"pack_key":"executive-portfolio","project_id":null,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"region","key":"region","kind":"multi","label":"Region"}],"tabs":[{"key":"overview","label":"Overview"},{"key":"wip","label":"WIP & cash"}],"tiles":[{"filterMap":{"period":null},"id":"contract","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_contract_value"],"sort":[]},"tab":"overview","title":"Revised contract value","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"revised-budget","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"overview","title":"Revised budget","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.334Z","version":1,"view_count":0,"visibility":"company","web_url":"/companies/1/analytics/d/1"},"schema":{"$ref":"#/components/schemas/analytics_Dashboard"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Clone a pack into a saved dashboard (a copy; pack_key set)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/packs/{key}/data":{"get":{"description":"Computed data of a curated report pack: every tile runs as the token's user with the screen's own tile query (global filters, chips, date ranges), plain query tiles share one scan. Tiles the user cannot fully read report `unavailable` / `partial` on their result; a failed tile carries `error` and never fails the call. Read: `analytics:read`.","operationId":"listCompanyAnalyticsPackData","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":"sample-pm-overview","in":"path","name":"key","required":true,"schema":{"type":"string"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"base64url(JSON FilterState): dashboard filter values and cross-filter chips, as in the app URL.","in":"query","name":"f","required":false,"schema":{"type":"string"}},{"description":"Value(s) for one of the dashboard's global filters (`spec.filters[].key`), comma-separated for several; merged over `f`.","example":"open,draft","in":"query","name":"filters[<filter key>]","required":false,"schema":{"type":"string"}},{"description":"Time window for every tile (keeps each tile's time dimension). Use either this or from/to.","in":"query","name":"time_preset","required":false,"schema":{"enum":["last_7d","last_30d","last_90d","mtd","qtd","ytd","last_12m","all"],"type":"string"}},{"description":"Time window start (YYYY-MM-DD), every tile.","example":"2026-01-01","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"Time window end (YYYY-MM-DD), every tile.","example":"2026-09-30","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"Only this tile (`spec.tiles[].id`); 404 when there is no such tile.","example":"open","in":"query","name":"tile","required":false,"schema":{"type":"string"}},{"description":"`json` (default): per-tile results. `csv` | `xlsx` | `pdf`: the rendered file, exactly as an export (a single tile is a plain CSV table; audited).","in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","csv","xlsx","pdf"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"as_of":"2026-10-26T04:55:03.942Z","filters_applied":["Created: Last 12 months"],"generated_at":"2026-10-26T04:55:03.942Z","project_id":null,"scope":"os.construction · Portfolio","target":{"key":"sample-pm-overview","name":"PM overview","type":"pack"},"tiles":[{"error":null,"export_url":"/rest/v1.0/companies/1/analytics/packs/sample-pm-overview/data?tile=rfis-open&format=csv","id":"rfis-open","kind":"query","query":{"compare":"previous_period","dimensions":[],"filters":[],"limit":1000,"metrics":["pm.rfis_open"],"sort":[],"time":{"dim":"created","preset":"last_12m"}},"records":null,"result":{"columns":[{"direction":"lower_better","key":"pm.rfis_open","label":"Open rfis","role":"metric","type":"number","unit":"count"}],"compare":{"from":"2024-10-27","rows":[[0]],"to":"2025-10-26","totals":null},"labels":{},"meta":{"asOf":"2026-10-26T04:55:03.942Z","cached":false,"ms":655,"plans":[{"source":"rfis","via":"base"}],"projects":1,"timezone":"UTC"},"partial":[],"rows":[[4]],"totals":null,"truncated":false,"unavailable":[]},"tab":null,"title":"Open RFIs","url":"/rest/v1.0/companies/1/analytics/packs/sample-pm-overview/data?tile=rfis-open"},{"error":null,"export_url":"/rest/v1.0/companies/1/analytics/packs/sample-pm-overview/data?tile=rfis-late&format=csv","id":"rfis-late","kind":"query","query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["pm.rfis_late"],"sort":[],"time":{"dim":"created","preset":"last_12m"}},"records":null,"result":{"columns":[{"direction":"lower_better","key":"pm.rfis_late","label":"Late rfis","role":"metric","type":"number","unit":"count"}],"labels":{},"meta":{"asOf":"2026-10-26T04:55:03.942Z","cached":false,"ms":455,"plans":[{"source":"rfis","via":"base"}],"projects":1,"timezone":"UTC"},"partial":[],"rows":[[1]],"totals":null,"truncated":false,"unavailable":[]},"tab":null,"title":"Late RFIs","url":"/rest/v1.0/companies/1/analytics/packs/sample-pm-overview/data?tile=rfis-late"}],"timezone":"UTC","url":"/rest/v1.0/companies/1/analytics/packs/sample-pm-overview/data"},"schema":{"$ref":"#/components/schemas/analytics_DashboardData"}},"application/pdf":{"schema":{"format":"binary","type":"string"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}},"text/csv":{"example":"﻿Status,Open RFIs\r\nOpen,4\r\nDraft,2\r\n","schema":{"type":"string"}}},"description":"Computed data (JSON), or the rendered file for format=csv|xlsx|pdf"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"408":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Get a report pack's computed tile data","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/query":{"get":{"description":"Read semantics: token scope `analytics:read` (not :write) plus analytics view. Every metric additionally needs read access to its source tool, the tool enabled, and the source's token scope; metrics failing that are listed in `unavailable` with null values, never 0. Supports ETag / If-None-Match (304).","operationId":"listCompanyAnalyticsQuery","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"base64url(JSON QuerySpec): the shared ?q= codec","in":"query","name":"q","required":true,"schema":{"type":"string"}},{"description":"`json` (default) or `csv` (the result as a CSV table, audited like an export).","in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","csv"],"type":"string"}},{"description":"An ETag from a previous response: 304 when the result is unchanged.","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"columns":[{"key":"status","label":"Status","role":"dim","type":"string"},{"direction":"lower_better","key":"pm.rfis_open","label":"Open rfis","role":"metric","type":"number","unit":"count"}],"labels":{"status":{"closed":"Closed","draft":"Draft","open":"Open"}},"meta":{"asOf":"2026-10-26T04:51:43.045Z","cached":false,"ms":391,"plans":[{"source":"rfis","via":"base"}],"projects":1,"timezone":"UTC"},"partial":[],"rows":[["open",4],["closed",0],["draft",0]],"totals":[4,8],"truncated":false,"unavailable":[]},"schema":{"$ref":"#/components/schemas/analytics_QueryResult"}},"text/csv":{"example":"﻿Status,Open RFIs\r\nOpen,4\r\nDraft,2\r\n","schema":{"type":"string"}}},"description":"OK","headers":{"Cache-Control":{"description":"`private, no-cache`","schema":{"type":"string"}},"ETag":{"description":"Weak validator over the result (timing excluded). Send it back as If-None-Match.","schema":{"type":"string"}}}},"304":{"description":"Not modified: the ETag sent in If-None-Match still matches (no body).","headers":{"ETag":{"schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"408":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Run an analytics query (company, GET form)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"post":{"description":"Read semantics: token scope `analytics:read` (not :write) plus analytics view. Every metric additionally needs read access to its source tool, the tool enabled, and the source's token scope; metrics failing that are listed in `unavailable` with null values, never 0. POST is unavailable (403) on read-only (expired trial / suspended) workspaces; use the GET form with `?q=`. No ETag on POST.","operationId":"createCompanyAnalyticsQuery","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"query":{"dimensions":[{"key":"status"}],"metrics":["pm.rfis_open","pm.rfis_total"],"time":{"preset":"last_90d"}}},"schema":{"properties":{"query":{"$ref":"#/components/schemas/analytics_QuerySpec"}},"required":["query"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"columns":[{"key":"status","label":"Status","role":"dim","type":"string"},{"direction":"lower_better","key":"pm.rfis_open","label":"Open rfis","role":"metric","type":"number","unit":"count"}],"labels":{"status":{"closed":"Closed","draft":"Draft","open":"Open"}},"meta":{"asOf":"2026-10-26T04:51:43.045Z","cached":false,"ms":391,"plans":[{"source":"rfis","via":"base"}],"projects":1,"timezone":"UTC"},"partial":[],"rows":[["open",4],["closed",0],["draft",0]],"totals":[4,8],"truncated":false,"unavailable":[]},"schema":{"$ref":"#/components/schemas/analytics_QueryResult"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"408":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Run an analytics query (company)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/query/batch":{"post":{"description":"Read semantics: token scope `analytics:read`. 1 to 24 QuerySpecs run as the token's user, sharing scans; each counts against the rate limit. The response has one item per query, in order: the QueryResult, or the status and errors POST query would have returned for it.","operationId":"createCompanyAnalyticsQueryBatch","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"queries":[{"metrics":["pm.rfis_open"]},{"dimensions":[{"key":"status"}],"metrics":["pm.rfis_open","pm.rfis_total"],"time":{"preset":"last_90d"}}]},"schema":{"properties":{"queries":{"items":{"$ref":"#/components/schemas/analytics_QuerySpec"},"maxItems":24,"minItems":1,"type":"array"}},"required":["queries"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"items":[{"ok":true,"result":{"columns":[{"key":"status","label":"Status","role":"dim","type":"string"},{"direction":"lower_better","key":"pm.rfis_open","label":"Open rfis","role":"metric","type":"number","unit":"count"}],"labels":{"status":{"closed":"Closed","draft":"Draft","open":"Open"}},"meta":{"asOf":"2026-10-26T04:51:43.045Z","cached":false,"ms":391,"plans":[{"source":"rfis","via":"base"}],"projects":1,"timezone":"UTC"},"partial":[],"rows":[["open",4],["closed",0],["draft",0]],"totals":[4,8],"truncated":false,"unavailable":[]}},{"errors":["unknown metric: pm.rfis_opn"],"ok":false,"status":422}]},"schema":{"$ref":"#/components/schemas/analytics_QueryBatchResult"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Run several analytics queries in one call","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/query/detail":{"post":{"description":"Read semantics: token scope `analytics:read` (not :write) plus analytics view. Every metric additionally needs read access to its source tool, the tool enabled, and the source's token scope; metrics failing that are listed in `unavailable` with null values, never 0. POST is unavailable (403) on read-only (expired trial / suspended) workspaces; use the GET form with `?q=`. Keyset paging, 200 rows per page; each row deep-links to the record.","operationId":"createCompanyAnalyticsQueryDetail","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"cell":[{"dim":"status","value":"open"}],"metric":"pm.rfis_open","query":{"dimensions":[{"key":"status"}],"metrics":["pm.rfis_open"]}},"schema":{"$ref":"#/components/schemas/analytics_DetailRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"columns":[{"key":"pm.rfis_open","label":"Open RFIs","type":"string"}],"next_cursor":"open","rows":[{"href":"/rest/v1.0/companies/1/analytics/dashboards/42/data","id":42,"project_id":2,"values":{}}],"source":"open","total":12},"schema":{"$ref":"#/components/schemas/analytics_DetailPage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"408":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Records behind a result cell (company)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/report-links":{"get":{"description":"Analytics admins see every link in the company; everyone else sees the links they created. ?status=active narrows to live links. Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsReportLinks","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":[],"schema":{"items":{"$ref":"#/components/schemas/analytics_ReportLink"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List report links","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"post":{"description":"Renders the dashboard or pack AS THE CALLER with the locked filters (PDF + scene JSON in storage) and returns the public URL once. Needs the company setting report_links_enabled (403 when off); owner or editor of the dashboard (packs: analytics admins). A dashboard outside the caller's company or scope is 404. Audited. Token scope: `analytics:write`.","operationId":"createCompanyAnalyticsReportLink","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"link":{"expires_in_days":1,"filters":{},"pack_key":"open","refresh":"none","target_id":6,"target_type":"dashboard"}},"schema":{"properties":{"link":{"$ref":"#/components/schemas/analytics_ReportLinkInput"}},"required":["link"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"created_at":"2026-10-20T14:32:00.000Z","created_by":{"id":42,"name":"PM weekly overview"},"expires_at":"2026-10-20T14:32:00.000Z","id":42,"last_viewed_at":"2026-10-20T14:32:00.000Z","pack_key":"open","project_id":2,"refresh":"none","rendered_at":"2026-10-20T14:32:00.000Z","revoke_reason":"Open RFIs older than 14 days are trending up on two projects.","revoked_at":"2026-10-20T14:32:00.000Z","status":"active","target_id":6,"target_type":"dashboard","title":"PM weekly overview","token":"rl_9f2c1d7e","url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","view_count":12},"schema":{"$ref":"#/components/schemas/analytics_ReportLinkCreated"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Publish a report link","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/report-links/revoke-all":{"post":{"description":"Analytics admins: turn off every live link in the company. Audited per link. Token scope: `analytics:write`.","operationId":"createCompanyAnalyticsReportLinksRevokeAll","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"revoked":1},"schema":{"properties":{"revoked":{"type":"integer"}},"required":["revoked"],"type":"object"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Revoke every report link","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/report-links/{id}":{"delete":{"description":"Creator or analytics admin. Deletes the snapshot files; the public link then answers 410. Idempotent. Audited. Token scope: `analytics:write`.","operationId":"deleteCompanyAnalyticsReportLink","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"created_at":"2026-10-20T14:32:00.000Z","created_by":{"id":42,"name":"PM weekly overview"},"expires_at":"2026-10-20T14:32:00.000Z","id":42,"last_viewed_at":"2026-10-20T14:32:00.000Z","pack_key":"open","project_id":2,"refresh":"none","rendered_at":"2026-10-20T14:32:00.000Z","revoke_reason":"Open RFIs older than 14 days are trending up on two projects.","revoked_at":"2026-10-20T14:32:00.000Z","status":"active","target_id":6,"target_type":"dashboard","title":"PM weekly overview","view_count":12},"schema":{"$ref":"#/components/schemas/analytics_ReportLink"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Revoke a report link","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/schedules":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsSchedules","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"1-based page","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size (default 100, max 1000)","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":[],"schema":{"items":{"$ref":"#/components/schemas/analytics_Schedule"},"type":"array"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List scheduled deliveries","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":true},"post":{"description":"Rendered per recipient, as that recipient; the creator's token scopes are frozen as a ceiling. Recipients must be active company users with analytics view. Audited.\n\nB2: `schedule.burst` = \"project\" delivers one file per project each recipient can read (as that recipient, the project filter set; at most 50 per run, the rest named as \"+N more\" in the email). Company scope only: a project-scoped schedule with burst \"project\" returns 422. PDF bursts carry a cover page. Token scope: `analytics:write`.","operationId":"createCompanyAnalyticsSchedule","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"schedule":{"burst":"none","cadence":"daily","enabled":true,"filters":{},"format":"csv","hour":6,"monthday":1,"name":"PM weekly overview","pack_key":"open","recipient_ids":[6],"target_id":6,"target_type":"dashboard","timezone":"America/Chicago","weekday":0}},"schema":{"properties":{"schedule":{"$ref":"#/components/schemas/analytics_ScheduleInput"}},"required":["schedule"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"burst":"none","cadence":"daily","company_id":1,"condition":null,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"download_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","enabled":true,"filters":{"chips":[{"dim":"status","value":"open"}],"values":{}},"format":"csv","hour":6,"id":42,"last_error":"Open RFIs older than 14 days are trending up on two projects.","last_run_at":"2026-10-20T14:32:00.000Z","last_status":"open","monthday":1,"name":"PM weekly overview","next_run_at":"2026-10-20T14:32:00.000Z","pack_key":"open","project_id":2,"recipient_ids":[6],"target_id":6,"target_type":"dashboard","timezone":"America/Chicago","updated_at":"2026-10-20T14:32:00.000Z","view_id":null,"webhook":false,"weekday":1},"schema":{"$ref":"#/components/schemas/analytics_Schedule"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Create a scheduled delivery","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/schedules/{id}":{"delete":{"description":"Token scope: `analytics:write`.","operationId":"deleteCompanyAnalyticsSchedule","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Delete a scheduled delivery","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false},"get":{"description":"Token scope: `analytics:read`.","operationId":"getCompanyAnalyticsSchedule","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"burst":"none","cadence":"daily","company_id":1,"condition":null,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"download_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","enabled":true,"filters":{"chips":[{"dim":"status","value":"open"}],"values":{}},"format":"csv","hour":6,"id":42,"last_error":"Open RFIs older than 14 days are trending up on two projects.","last_run_at":"2026-10-20T14:32:00.000Z","last_status":"open","monthday":1,"name":"PM weekly overview","next_run_at":"2026-10-20T14:32:00.000Z","pack_key":"open","project_id":2,"recipient_ids":[6],"target_id":6,"target_type":"dashboard","timezone":"America/Chicago","updated_at":"2026-10-20T14:32:00.000Z","view_id":null,"webhook":false,"weekday":1},"schema":{"$ref":"#/components/schemas/analytics_Schedule"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Show a scheduled delivery","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"patch":{"description":"B2: `schedule.burst` may be changed (\"none\" | \"project\"); 422 at project scope. Token scope: `analytics:write`.","operationId":"updateCompanyAnalyticsSchedule","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"schedule":{"burst":"none","cadence":"daily","enabled":true,"filters":{},"format":"csv","hour":6,"monthday":1,"name":"PM weekly overview","recipient_ids":[6],"timezone":"America/Chicago","weekday":0}},"schema":{"properties":{"schedule":{"$ref":"#/components/schemas/analytics_SchedulePatch"}},"required":["schedule"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"burst":"none","cadence":"daily","company_id":1,"condition":null,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"download_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","enabled":true,"filters":{"chips":[{"dim":"status","value":"open"}],"values":{}},"format":"csv","hour":6,"id":42,"last_error":"Open RFIs older than 14 days are trending up on two projects.","last_run_at":"2026-10-20T14:32:00.000Z","last_status":"open","monthday":1,"name":"PM weekly overview","next_run_at":"2026-10-20T14:32:00.000Z","pack_key":"open","project_id":2,"recipient_ids":[6],"target_id":6,"target_type":"dashboard","timezone":"America/Chicago","updated_at":"2026-10-20T14:32:00.000Z","view_id":null,"webhook":false,"weekday":1},"schema":{"$ref":"#/components/schemas/analytics_Schedule"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Update a scheduled delivery","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/schedules/{id}/file":{"get":{"description":"No API token needed: the signed, expiring token is the credential (hand it only to systems that may see the schedule owner's view). The file was rendered once AS THE SCHEDULE OWNER. 403 bad signature; 410 expired, schedule deleted or webhook turned off, owner no longer active or without analytics, report_links_enabled off, or the file purged by retention. Token scope: `analytics:read` (when a bearer token is sent it is ignored).","operationId":"listCompanyAnalyticsScheduleFile","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"The signed token from an `analytics.schedule.delivered` webhook (`data.file.download_url`).","in":"query","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"The file"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Download the file behind an analytics.schedule.delivered webhook","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/schedules/{id}/run":{"post":{"description":"Token scope: `analytics:write`.","operationId":"runCompanyAnalyticsSchedule","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"202":{"content":{"application/json":{"example":{"download_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","error":"Open RFIs older than 14 days are trending up on two projects.","id":42,"percent_complete":100,"status":"queued"},"schema":{"$ref":"#/components/schemas/analytics_ExportJob"}}},"description":"Queued"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Deliver a schedule now","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/schedules/{id}/transfer":{"post":{"description":"Token scope: `analytics:write`.","operationId":"transferCompanyAnalyticsSchedule","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"owner_id":6},"schema":{"properties":{"owner_id":{"type":"integer"}},"required":["owner_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"burst":"none","cadence":"daily","company_id":1,"condition":null,"created_at":"2026-10-20T14:32:00.000Z","created_by_id":6,"download_url":"/rest/v1.0/companies/1/analytics/dashboards/42/data","enabled":true,"filters":{"chips":[{"dim":"status","value":"open"}],"values":{}},"format":"csv","hour":6,"id":42,"last_error":"Open RFIs older than 14 days are trending up on two projects.","last_run_at":"2026-10-20T14:32:00.000Z","last_status":"open","monthday":1,"name":"PM weekly overview","next_run_at":"2026-10-20T14:32:00.000Z","pack_key":"open","project_id":2,"recipient_ids":[6],"target_id":6,"target_type":"dashboard","timezone":"America/Chicago","updated_at":"2026-10-20T14:32:00.000Z","view_id":null,"webhook":false,"weekday":1},"schema":{"$ref":"#/components/schemas/analytics_Schedule"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Transfer a schedule to a new owner (admin only)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/settings":{"get":{"description":"Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsSettings","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"company_id":1,"project_id":null,"settings":[{"default":"UTC","description":"IANA zone used to bucket timestamps into days, weeks and months.","group":"general","inherited":"UTC","key":"timezone","label":"Reporting time zone","origin":"company","scope":"company","unit":null,"value":"UTC"},{"default":[1,2],"description":"Weekdays (0 = Sunday) on which a daily log is expected.","group":"general","inherited":[1,2],"key":"working_weekdays","label":"Working days","origin":"company","scope":"both","unit":null,"value":[1,2]}]},"schema":{"$ref":"#/components/schemas/analytics_Settings"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Effective analytics settings","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"patch":{"description":"Company defaults without project_id; project overrides with it. A null value removes the override. Token scope: `analytics:write`.","operationId":"updateCompanyAnalyticsSettings","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"settings":{}},"schema":{"properties":{"settings":{"additionalProperties":true,"type":"object"}},"required":["settings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"company_id":1,"project_id":null,"settings":[{"default":"UTC","description":"IANA zone used to bucket timestamps into days, weeks and months.","group":"general","inherited":"UTC","key":"timezone","label":"Reporting time zone","origin":"company","scope":"company","unit":null,"value":"UTC"},{"default":[1,2],"description":"Weekdays (0 = Sunday) on which a daily log is expected.","group":"general","inherited":[1,2],"key":"working_weekdays","label":"Working days","origin":"company","scope":"both","unit":null,"value":[1,2]}]},"schema":{"$ref":"#/components/schemas/analytics_Settings"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Update analytics settings (analytics admin)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/analytics/story":{"get":{"description":"Deterministic, cited sentences composed as the caller: week = what changed and why it matters; today = the superintendent's board (\"Me\" items bind to the caller). Requires analytics view on the project. Token scope: `analytics:read`.","operationId":"listCompanyAnalyticsStory","parameters":[{"description":"Your company id (the token must belong to it, else 403).","example":1,"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Project scope; omit for company scope. Requires analytics view on that project.","example":2,"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"horizon","required":false,"schema":{"default":"week","enum":["week","today"],"type":"string"}},{"description":"Story date (YYYY-MM-DD); default today in the company time zone.","in":"query","name":"as_of","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"asOf":"2026-10-26","horizon":"week","magnitude":0.878,"projectId":2,"projectName":"24-118 - Riverside Medical Center","sections":[{"heading":"Headline","key":"headline","sentences":[{"href":"/companies/1/projects/2/tools/analytics/explore?q=eyJkaW1lbnNpb25zIjpbeyJrZXkiOiJhc19vZiIsImdyYWluIjoid2VlayJ9XSwiZmlsdGVycyI6W10sInNvcnQiOltdLCJsaW1pdCI6MTAwMCwibWV0cmljcyI6WyJwb3J0Zm9saW8uaGVhbHRoX3Njb3JlIl0sInRpbWUiOnsiZGltIjoiYXNfb2Y...","key":"health","metricKeys":["portfolio.health_score"],"score":0.192,"text":"Project health is 55.6%, down 2.8 points from last week.","tone":"risk"},{"href":"/companies/1/projects/2/tools/analytics/explore?q=eyJkaW1lbnNpb25zIjpbXSwiZmlsdGVycyI6W10sInNvcnQiOltdLCJsaW1pdCI6MTAwMCwibWV0cmljcyI6WyJxdWFsaXR5X3NhZmV0eS5pbmNpZGVudHNfdG90YWwiLCJxdWFsaXR5X3NhZmV0eS5yZWNvcmRhYmxlX2luY2lkZW50cyJdLCJ0aW1...","key":"mover_incidents","metricKeys":["quality_safety.incidents_total","quality_safety.recordable_incidents"],"score":0.878,"text":"Biggest mover: 1 incident reported in the last 7 days, 1 recordable.","tone":"risk"}]},{"heading":"Money","key":"money","sentences":[{"href":"/companies/1/projects/2/tools/analytics/explore?q=eyJkaW1lbnNpb25zIjpbeyJrZXkiOiJhc19vZiIsImdyYWluIjoid2VlayJ9XSwiZmlsdGVycyI6W10sInNvcnQiOltdLCJsaW1pdCI6MTAwMCwibWV0cmljcyI6WyJmaW5hbmNpYWxzLmNoYW5nZV9ldmVudHNfcm9tIl0sInRpbWUiOnsiZGltIjo...","key":"rom","metricKeys":["financials.change_events_rom"],"score":0.376,"text":"Open change exposure is $116K, up $54.2K this week.","tone":"risk"},{"href":"/companies/1/projects/2/tools/analytics/explore?q=eyJkaW1lbnNpb25zIjpbeyJrZXkiOiJhc19vZiIsImdyYWluIjoid2VlayJ9XSwiZmlsdGVycyI6W10sInNvcnQiOltdLCJsaW1pdCI6MTAwMCwibWV0cmljcyI6WyJmaW5hbmNpYWxzLm92ZXJfdW5kZXJfYmlsbGluZyJdLCJ0aW1lIjp7ImRpbSI...","key":"billing","metricKeys":["financials.over_under_billing"],"score":0.043,"text":"Billing runs $14.3M ahead of earned revenue (over-billed), +$693K on last week.","tone":"neutral"}]}],"title":"24-118 - Riverside Medical Center: the week to Oct 26, 2026"},"schema":{"$ref":"#/components/schemas/analytics_Story"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Project Story (weekly brief or Today)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/approvals":{"get":{"operationId":"listCompanyApprovalWorkflowsApprovals","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"filter","schema":{"default":"pending","enum":["pending","decided","submitted"],"type":"string"}},{"in":"query","name":"object_type","schema":{"enum":["change_order","commitment_change_order","payment_application","purchase_request","subcontract","purchase_order","ap_bill","payment_batch","ar_invoice","submittal","expense_report","budget_change","contingency_draw"],"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/approvals_Approval"},"type":"array"}}},"description":"Success","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"My approvals: runs waiting on me, decided by me, or submitted by me","tags":["approvals"],"x-os-idempotent":false,"x-os-module":"approvals","x-os-paginated":true},"post":{"operationId":"createCompanyApprovalWorkflowsApproval","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"comment":{"type":"string"},"object_id":{"type":"integer"},"object_type":{"enum":["change_order","commitment_change_order","payment_application","purchase_request","subcontract","purchase_order","ap_bill","payment_batch","ar_invoice","submittal","expense_report","budget_change","contingency_draw"],"type":"string"},"policy_id":{"type":"integer"}},"required":["object_type","object_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_StartResult"}}},"description":"Success"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_StartResult"}}},"description":"Run started"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Submit a record for approval (agents may submit; only people decide)","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/approvals/bulk_decision":{"post":{"operationId":"createCompanyApprovalWorkflowsApprovalsBulkDecision","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"comment":{"type":"string"},"instance_ids":{"items":{"type":"integer"},"type":"array"}},"required":["instance_ids"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_BulkResult"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Approve several runs (per-item results; not every type allows bulk)","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/approvals/{id}":{"get":{"operationId":"getCompanyApprovalWorkflowsApproval","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_Approval"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Show a run with tasks and audit trail","tags":["approvals"],"x-os-idempotent":false,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/approvals/{id}/cancel":{"post":{"operationId":"cancelCompanyApprovalWorkflowsApproval","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reason":{"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_Approval"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Withdraw a pending run (submitter or admin)","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/approvals/{id}/comments":{"post":{"operationId":"createCompanyApprovalWorkflowsApprovalComment","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"comment":{"type":"string"}},"required":["comment"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_Approval"}}},"description":"Created"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Comment on a run","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/approvals/{id}/decision":{"post":{"operationId":"decisionCompanyApprovalWorkflowsApproval","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"comment":{"type":"string"},"decision":{"enum":["approve","reject"],"type":"string"}},"required":["decision"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_DecisionResult"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Approve or reject (reject needs a comment)","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/cost_code_owners":{"get":{"operationId":"listCompanyApprovalWorkflowsCostCodeOwners","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/approvals_CostCodeOwner"},"type":"array"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Cost code owners of a project","tags":["approvals"],"x-os-idempotent":false,"x-os-module":"approvals","x-os-paginated":false},"post":{"operationId":"createCompanyApprovalWorkflowsCostCodeOwner","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"cost_code_id":{"type":"integer"},"project_id":{"type":"integer"},"user_id":{"type":"integer"}},"required":["project_id","cost_code_id","user_id"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_CostCodeOwner"}}},"description":"Created"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Assign a cost code owner (company admins)","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/cost_code_owners/{id}":{"delete":{"operationId":"deleteCompanyApprovalWorkflowsCostCodeOwner","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Removed"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Remove a cost code owner","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/delegations":{"get":{"operationId":"listCompanyApprovalWorkflowsDelegations","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/approvals_Delegation"},"type":"array"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Approval delegations (own; admins see all)","tags":["approvals"],"x-os-idempotent":false,"x-os-module":"approvals","x-os-paginated":false},"post":{"operationId":"createCompanyApprovalWorkflowsDelegation","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"ends_at":{"format":"date-time","type":"string"},"from_user_id":{"type":"integer"},"object_types":{"items":{"enum":["change_order","commitment_change_order","payment_application","purchase_request","subcontract","purchase_order","ap_bill","payment_batch","ar_invoice","submittal","expense_report","budget_change","contingency_draw"],"type":"string"},"type":"array"},"reason":{"type":"string"},"starts_at":{"format":"date-time","type":"string"},"to_user_id":{"type":"integer"}},"required":["to_user_id","starts_at","ends_at","reason"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_Delegation"}}},"description":"Created"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Delegate approvals while out of office","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/delegations/{id}":{"delete":{"operationId":"deleteCompanyApprovalWorkflowsDelegation","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_Delegation"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Revoke a delegation","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/object_types":{"get":{"operationId":"listCompanyApprovalWorkflowsObjectTypes","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/approvals_ObjectType"},"type":"array"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Record types covered and their mandatory domain controls","tags":["approvals"],"x-os-idempotent":false,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/policies":{"get":{"operationId":"listCompanyApprovalWorkflowsPolicies","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"object_type","schema":{"enum":["change_order","commitment_change_order","payment_application","purchase_request","subcontract","purchase_order","ap_bill","payment_batch","ar_invoice","submittal","expense_report","budget_change","contingency_draw"],"type":"string"}},{"description":"A project id, or `company` for company-wide policies only","in":"query","name":"project_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/approvals_Policy"},"type":"array"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"List approval policies","tags":["approvals"],"x-os-idempotent":false,"x-os-module":"approvals","x-os-paginated":false},"post":{"operationId":"createCompanyApprovalWorkflowsPolicy","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"approval_policy":{"$ref":"#/components/schemas/approvals_PolicyInput"}},"required":["approval_policy"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_Policy"}}},"description":"Created"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Create an approval policy (company admins)","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/policies/{id}":{"delete":{"operationId":"deleteCompanyApprovalWorkflowsPolicy","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Delete an approval policy","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false},"get":{"operationId":"getCompanyApprovalWorkflowsPolicy","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_Policy"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Show an approval policy","tags":["approvals"],"x-os-idempotent":false,"x-os-module":"approvals","x-os-paginated":false},"patch":{"operationId":"updateCompanyApprovalWorkflowsPolicy","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"approval_policy":{"$ref":"#/components/schemas/approvals_PolicyInput"}},"required":["approval_policy"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_Policy"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Update an approval policy (bumps version; runs in flight keep their plan)","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/policy_templates":{"get":{"operationId":"listCompanyApprovalWorkflowsPolicyTemplates","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/approvals_Template"},"type":"array"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Starter policies","tags":["approvals"],"x-os-idempotent":false,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/policy_templates/{key}/apply":{"post":{"operationId":"applyCompanyApprovalWorkflowsPolicyTemplate","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"activate":{"type":"boolean"},"project_id":{"nullable":true,"type":"integer"}},"type":"object"}}},"required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_Policy"}}},"description":"Created"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Create a policy from a template (inactive unless activate)","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/record_status":{"get":{"operationId":"listCompanyApprovalWorkflowsRecordStatus","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"object_type","required":true,"schema":{"enum":["change_order","commitment_change_order","payment_application","purchase_request","subcontract","purchase_order","ap_bill","payment_batch","ar_invoice","submittal","expense_report","budget_change","contingency_draw"],"type":"string"}},{"in":"query","name":"object_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_RecordStatus"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"A record's runs and whether its domain decision may proceed","tags":["approvals"],"x-os-idempotent":false,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/approval_workflows/simulate":{"post":{"operationId":"createCompanyApprovalWorkflowsSimulate","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"facts":{"type":"object"},"object_id":{"type":"integer"},"object_type":{"enum":["change_order","commitment_change_order","payment_application","purchase_request","subcontract","purchase_order","ap_bill","payment_batch","ar_invoice","submittal","expense_report","budget_change","contingency_draw"],"type":"string"},"policy":{"$ref":"#/components/schemas/approvals_PolicyInput"}},"required":["object_type"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvals_Simulation"}}},"description":"Success"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"Not allowed: company admin required, not an approver, ineligible approver (maker-checker, missing grant), or an agent/service-account principal trying to decide"},"404":{"description":"Not found in this company"},"409":{"description":"approval_closed, already_decided, approval_in_progress, approver_unresolved or reapproval_required"},"422":{"description":"Invalid body"}},"summary":"Who would approve this record? (read-only)","tags":["approvals"],"x-os-idempotent":true,"x-os-module":"approvals","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/automations":{"get":{"operationId":"listCompanyAutomations","parameters":[{"description":"Rules of one project","in":"query","name":"filters[project_id]","required":false,"schema":{"type":"string"}},{"description":"With filters[project_id]: also company-wide rules","in":"query","name":"filters[include_company]","required":false,"schema":{"type":"string"}},{"description":"true or false","in":"query","name":"filters[enabled]","required":false,"schema":{"type":"string"}},{"description":"Name contains","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/automations_Automation"},"type":"array"}}},"description":"OK"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"}},"summary":"List automations","tags":["automations"],"x-os-idempotent":false,"x-os-module":"automations","x-os-paginated":true},"post":{"operationId":"createCompanyAutomation","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"automation":{"properties":{"actions":{"items":{"oneOf":[{"description":"In-app notification and/or email. Text may use {{placeholders}}.","properties":{"body":{"maxLength":4000,"type":"string"},"channels":{"items":{"enum":["in_app","email"],"type":"string"},"type":"array"},"recipients":{"description":"Who to notify or assign. Everyone resolves to active people in the company; each must be able to open the record.","properties":{"assignees":{"type":"boolean"},"company_admins":{"type":"boolean"},"creator":{"type":"boolean"},"distribution_groups":{"items":{"type":"integer"},"type":"array"},"manager":{"type":"boolean"},"roles":{"description":"Project team roles, e.g. Project Manager, Superintendent.","items":{"type":"string"},"type":"array"},"rule_owner":{"type":"boolean"},"users":{"items":{"type":"integer"},"type":"array"}},"type":"object"},"subject":{"maxLength":200,"type":"string"},"type":{"enum":["notify"],"type":"string"}},"required":["type","channels","recipients","subject"],"title":"notify","type":"object"},{"description":"Create a project task.","properties":{"assignees":{"description":"Who to notify or assign. Everyone resolves to active people in the company; each must be able to open the record.","properties":{"assignees":{"type":"boolean"},"company_admins":{"type":"boolean"},"creator":{"type":"boolean"},"distribution_groups":{"items":{"type":"integer"},"type":"array"},"manager":{"type":"boolean"},"roles":{"description":"Project team roles, e.g. Project Manager, Superintendent.","items":{"type":"string"},"type":"array"},"rule_owner":{"type":"boolean"},"users":{"items":{"type":"integer"},"type":"array"}},"type":"object"},"description":{"type":"string"},"due_in_days":{"type":"integer"},"private":{"type":"boolean"},"title":{"type":"string"},"type":{"enum":["create_task"],"type":"string"}},"required":["type","title"],"title":"create_task","type":"object"},{"description":"Create a draft RFI.","properties":{"assignees":{"description":"Who to notify or assign. Everyone resolves to active people in the company; each must be able to open the record.","properties":{"assignees":{"type":"boolean"},"company_admins":{"type":"boolean"},"creator":{"type":"boolean"},"distribution_groups":{"items":{"type":"integer"},"type":"array"},"manager":{"type":"boolean"},"roles":{"description":"Project team roles, e.g. Project Manager, Superintendent.","items":{"type":"string"},"type":"array"},"rule_owner":{"type":"boolean"},"users":{"items":{"type":"integer"},"type":"array"}},"type":"object"},"due_in_days":{"type":"integer"},"question":{"type":"string"},"subject":{"type":"string"},"type":{"enum":["create_draft_rfi"],"type":"string"}},"required":["type","subject","question"],"title":"create_draft_rfi","type":"object"},{"description":"Change event triggers only: draft a potential change order from the change event.","properties":{"contract_id":{"type":"integer"},"contract_type":{"enum":["PrimeContract","WorkOrderContract","PurchaseOrderContract"],"type":"string"},"title":{"type":"string"},"type":{"enum":["create_draft_change_order"],"type":"string"}},"required":["type"],"title":"create_draft_change_order","type":"object"},{"description":"Insurance policy triggers only: open a renewal follow-up owned by a company admin.","properties":{"due_in_days":{"type":"integer"},"note":{"type":"string"},"owner_user_id":{"type":"integer"},"type":{"enum":["request_coi_renewal"],"type":"string"}},"required":["type","note"],"title":"request_coi_renewal","type":"object"},{"description":"Task, RFI, observation or punch item triggers: set the assignee (first match).","properties":{"assignee":{"description":"Who to notify or assign. Everyone resolves to active people in the company; each must be able to open the record.","properties":{"assignees":{"type":"boolean"},"company_admins":{"type":"boolean"},"creator":{"type":"boolean"},"distribution_groups":{"items":{"type":"integer"},"type":"array"},"manager":{"type":"boolean"},"roles":{"description":"Project team roles, e.g. Project Manager, Superintendent.","items":{"type":"string"},"type":"array"},"rule_owner":{"type":"boolean"},"users":{"items":{"type":"integer"},"type":"array"}},"type":"object"},"type":{"enum":["assign"],"type":"string"}},"required":["type","assignee"],"title":"assign","type":"object"},{"description":"Set an allowed field. Status is never settable.","properties":{"days_from_today":{"type":"integer"},"field":{"enum":["due_date","priority"],"type":"string"},"type":{"enum":["set_field"],"type":"string"},"value":{"type":"string"}},"required":["type","field"],"title":"set_field","type":"object"},{"description":"Task or punch item triggers: add a comment.","properties":{"body":{"type":"string"},"type":{"enum":["add_comment"],"type":"string"}},"required":["type","body"],"title":"add_comment","type":"object"},{"description":"Change order, payment application or submittal triggers: start the matching approval workflow (or return the run already in progress). Approvers decide.","properties":{"note":{"type":"string"},"policy_id":{"type":"integer"},"type":{"enum":["start_approval"],"type":"string"}},"required":["type"],"title":"start_approval","type":"object"},{"description":"Queue a signed automation.action delivery to a company webhook subscribed to automation.action.","properties":{"type":{"enum":["webhook"],"type":"string"},"webhook_id":{"type":"integer"}},"required":["type","webhook_id"],"title":"webhook","type":"object"}]},"maxItems":10,"minItems":1,"type":"array"},"conditions":{"description":"Conditions: match all (AND) or any (OR); rules may nest groups up to 3 deep, at most 25 conditions.","properties":{"match":{"enum":["all","any"],"type":"string"},"rules":{"items":{"description":"A condition, or a nested group with match and rules.","properties":{"field":{"description":"event.*, data.*, project.*, resource.* or custom_fields.<definition id>; see GET …/automations/catalog trigger_fields.","type":"string"},"match":{"type":"string"},"operator":{"enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","not_contains","is_empty","is_not_empty","includes_user"],"type":"string"},"rules":{"items":{"type":"object"},"type":"array"},"value":{"description":"String, number, boolean, null or a list. Dates accept YYYY-MM-DD, today, today+N, today-N.","nullable":true}},"type":"object"},"type":"array"}},"type":"object"},"description":{"nullable":true,"type":"string"},"enabled":{"description":"Defaults to false on create.","type":"boolean"},"max_runs_per_hour":{"maximum":500,"minimum":1,"type":"integer"},"name":{"maxLength":120,"type":"string"},"project_id":{"description":"null = every project in the company (company admins only).","nullable":true,"type":"integer"},"template_key":{"nullable":true,"type":"string"},"trigger":{"description":"event: { kind, event_type } (any project record event in the webhooks catalog). schedule: { kind, frequency, time, weekday?, timezone, scan? }; scan runs once per matching record per day.","properties":{"event_type":{"type":"string"},"frequency":{"enum":["daily","weekdays","weekly"],"type":"string"},"kind":{"enum":["event","schedule"],"type":"string"},"scan":{"nullable":true,"properties":{"days":{"type":"integer"},"match":{"enum":["overdue","date_offset","missing","threshold"],"type":"string"},"percent":{"type":"number"},"source":{"enum":["rfi","submittal","punch_item","task","observation","insurance_policy","daily_log","budget_line"],"type":"string"}},"type":"object"},"time":{"description":"HH:MM, 24-hour","type":"string"},"timezone":{"description":"IANA time zone","type":"string"},"weekday":{"maximum":6,"minimum":0,"type":"integer"}},"required":["kind"],"type":"object"}},"required":["name","trigger","actions"],"type":"object"}},"required":["automation"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/automations_Automation"}}},"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"422":{"description":"Validation failed"}},"summary":"Create an automation","tags":["automations"],"x-os-idempotent":true,"x-os-module":"automations","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/automations/catalog":{"get":{"description":"Triggers, the fields each trigger exposes (trigger_fields keyed event:<type>, scan:<source> or schedule), operators, actions with availability, templates and pickers.","operationId":"listCompanyAutomationsCatalog","parameters":[{"description":"Include this project's distribution groups","in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"}},"summary":"Automation builder catalog","tags":["automations"],"x-os-idempotent":false,"x-os-module":"automations","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/automations/runs":{"get":{"operationId":"listCompanyAutomationsRuns","parameters":[{"description":"queued, running, succeeded, partial, failed, skipped or dry_run","in":"query","name":"filters[status]","required":false,"schema":{"type":"string"}},{"description":"Runs for one project","in":"query","name":"filters[project_id]","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/automations_AutomationRun"},"type":"array"}}},"description":"OK"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"}},"summary":"List automation runs","tags":["automations"],"x-os-idempotent":false,"x-os-module":"automations","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/automations/runs/{run_id}":{"get":{"operationId":"getCompanyAutomationsRun","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"run_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/automations_AutomationRun"}}},"description":"OK"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}},"summary":"Show an automation run","tags":["automations"],"x-os-idempotent":false,"x-os-module":"automations","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/automations/{id}":{"delete":{"operationId":"deleteCompanyAutomation","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"}},"summary":"Delete an automation","tags":["automations"],"x-os-idempotent":true,"x-os-module":"automations","x-os-paginated":false},"get":{"operationId":"getCompanyAutomation","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/automations_Automation"}}},"description":"OK"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}},"summary":"Show an automation","tags":["automations"],"x-os-idempotent":false,"x-os-module":"automations","x-os-paginated":false},"patch":{"description":"Partial update. Saving makes the caller the owner; a changed definition creates a new version.","operationId":"updateCompanyAutomation","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"automation":{"properties":{"actions":{"items":{"oneOf":[{"description":"In-app notification and/or email. Text may use {{placeholders}}.","properties":{"body":{"maxLength":4000,"type":"string"},"channels":{"items":{"enum":["in_app","email"],"type":"string"},"type":"array"},"recipients":{"description":"Who to notify or assign. Everyone resolves to active people in the company; each must be able to open the record.","properties":{"assignees":{"type":"boolean"},"company_admins":{"type":"boolean"},"creator":{"type":"boolean"},"distribution_groups":{"items":{"type":"integer"},"type":"array"},"manager":{"type":"boolean"},"roles":{"description":"Project team roles, e.g. Project Manager, Superintendent.","items":{"type":"string"},"type":"array"},"rule_owner":{"type":"boolean"},"users":{"items":{"type":"integer"},"type":"array"}},"type":"object"},"subject":{"maxLength":200,"type":"string"},"type":{"enum":["notify"],"type":"string"}},"required":["type","channels","recipients","subject"],"title":"notify","type":"object"},{"description":"Create a project task.","properties":{"assignees":{"description":"Who to notify or assign. Everyone resolves to active people in the company; each must be able to open the record.","properties":{"assignees":{"type":"boolean"},"company_admins":{"type":"boolean"},"creator":{"type":"boolean"},"distribution_groups":{"items":{"type":"integer"},"type":"array"},"manager":{"type":"boolean"},"roles":{"description":"Project team roles, e.g. Project Manager, Superintendent.","items":{"type":"string"},"type":"array"},"rule_owner":{"type":"boolean"},"users":{"items":{"type":"integer"},"type":"array"}},"type":"object"},"description":{"type":"string"},"due_in_days":{"type":"integer"},"private":{"type":"boolean"},"title":{"type":"string"},"type":{"enum":["create_task"],"type":"string"}},"required":["type","title"],"title":"create_task","type":"object"},{"description":"Create a draft RFI.","properties":{"assignees":{"description":"Who to notify or assign. Everyone resolves to active people in the company; each must be able to open the record.","properties":{"assignees":{"type":"boolean"},"company_admins":{"type":"boolean"},"creator":{"type":"boolean"},"distribution_groups":{"items":{"type":"integer"},"type":"array"},"manager":{"type":"boolean"},"roles":{"description":"Project team roles, e.g. Project Manager, Superintendent.","items":{"type":"string"},"type":"array"},"rule_owner":{"type":"boolean"},"users":{"items":{"type":"integer"},"type":"array"}},"type":"object"},"due_in_days":{"type":"integer"},"question":{"type":"string"},"subject":{"type":"string"},"type":{"enum":["create_draft_rfi"],"type":"string"}},"required":["type","subject","question"],"title":"create_draft_rfi","type":"object"},{"description":"Change event triggers only: draft a potential change order from the change event.","properties":{"contract_id":{"type":"integer"},"contract_type":{"enum":["PrimeContract","WorkOrderContract","PurchaseOrderContract"],"type":"string"},"title":{"type":"string"},"type":{"enum":["create_draft_change_order"],"type":"string"}},"required":["type"],"title":"create_draft_change_order","type":"object"},{"description":"Insurance policy triggers only: open a renewal follow-up owned by a company admin.","properties":{"due_in_days":{"type":"integer"},"note":{"type":"string"},"owner_user_id":{"type":"integer"},"type":{"enum":["request_coi_renewal"],"type":"string"}},"required":["type","note"],"title":"request_coi_renewal","type":"object"},{"description":"Task, RFI, observation or punch item triggers: set the assignee (first match).","properties":{"assignee":{"description":"Who to notify or assign. Everyone resolves to active people in the company; each must be able to open the record.","properties":{"assignees":{"type":"boolean"},"company_admins":{"type":"boolean"},"creator":{"type":"boolean"},"distribution_groups":{"items":{"type":"integer"},"type":"array"},"manager":{"type":"boolean"},"roles":{"description":"Project team roles, e.g. Project Manager, Superintendent.","items":{"type":"string"},"type":"array"},"rule_owner":{"type":"boolean"},"users":{"items":{"type":"integer"},"type":"array"}},"type":"object"},"type":{"enum":["assign"],"type":"string"}},"required":["type","assignee"],"title":"assign","type":"object"},{"description":"Set an allowed field. Status is never settable.","properties":{"days_from_today":{"type":"integer"},"field":{"enum":["due_date","priority"],"type":"string"},"type":{"enum":["set_field"],"type":"string"},"value":{"type":"string"}},"required":["type","field"],"title":"set_field","type":"object"},{"description":"Task or punch item triggers: add a comment.","properties":{"body":{"type":"string"},"type":{"enum":["add_comment"],"type":"string"}},"required":["type","body"],"title":"add_comment","type":"object"},{"description":"Change order, payment application or submittal triggers: start the matching approval workflow (or return the run already in progress). Approvers decide.","properties":{"note":{"type":"string"},"policy_id":{"type":"integer"},"type":{"enum":["start_approval"],"type":"string"}},"required":["type"],"title":"start_approval","type":"object"},{"description":"Queue a signed automation.action delivery to a company webhook subscribed to automation.action.","properties":{"type":{"enum":["webhook"],"type":"string"},"webhook_id":{"type":"integer"}},"required":["type","webhook_id"],"title":"webhook","type":"object"}]},"maxItems":10,"minItems":1,"type":"array"},"conditions":{"description":"Conditions: match all (AND) or any (OR); rules may nest groups up to 3 deep, at most 25 conditions.","properties":{"match":{"enum":["all","any"],"type":"string"},"rules":{"items":{"description":"A condition, or a nested group with match and rules.","properties":{"field":{"description":"event.*, data.*, project.*, resource.* or custom_fields.<definition id>; see GET …/automations/catalog trigger_fields.","type":"string"},"match":{"type":"string"},"operator":{"enum":["eq","neq","gt","gte","lt","lte","in","not_in","contains","not_contains","is_empty","is_not_empty","includes_user"],"type":"string"},"rules":{"items":{"type":"object"},"type":"array"},"value":{"description":"String, number, boolean, null or a list. Dates accept YYYY-MM-DD, today, today+N, today-N.","nullable":true}},"type":"object"},"type":"array"}},"type":"object"},"description":{"nullable":true,"type":"string"},"enabled":{"description":"Defaults to false on create.","type":"boolean"},"max_runs_per_hour":{"maximum":500,"minimum":1,"type":"integer"},"name":{"maxLength":120,"type":"string"},"project_id":{"description":"null = every project in the company (company admins only).","nullable":true,"type":"integer"},"template_key":{"nullable":true,"type":"string"},"trigger":{"description":"event: { kind, event_type } (any project record event in the webhooks catalog). schedule: { kind, frequency, time, weekday?, timezone, scan? }; scan runs once per matching record per day.","properties":{"event_type":{"type":"string"},"frequency":{"enum":["daily","weekdays","weekly"],"type":"string"},"kind":{"enum":["event","schedule"],"type":"string"},"scan":{"nullable":true,"properties":{"days":{"type":"integer"},"match":{"enum":["overdue","date_offset","missing","threshold"],"type":"string"},"percent":{"type":"number"},"source":{"enum":["rfi","submittal","punch_item","task","observation","insurance_policy","daily_log","budget_line"],"type":"string"}},"type":"object"},"time":{"description":"HH:MM, 24-hour","type":"string"},"timezone":{"description":"IANA time zone","type":"string"},"weekday":{"maximum":6,"minimum":0,"type":"integer"}},"required":["kind"],"type":"object"}},"type":"object"}},"required":["automation"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/automations_Automation"}}},"description":"OK"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"422":{"description":"Validation failed"}},"summary":"Update an automation","tags":["automations"],"x-os-idempotent":true,"x-os-module":"automations","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/automations/{id}/runs":{"get":{"operationId":"listCompanyAutomationRuns","parameters":[{"description":"Run status","in":"query","name":"filters[status]","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/automations_AutomationRun"},"type":"array"}}},"description":"OK"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}},"summary":"List an automation's runs","tags":["automations"],"x-os-idempotent":false,"x-os-module":"automations","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/automations/{id}/test":{"post":{"description":"Evaluates the conditions and previews each action without side effects. Without a sample, uses the latest matching event (event rules) or the first record the schedule would pick today.","operationId":"testCompanyAutomation","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"test":{"properties":{"data":{"type":"object"},"event_id":{"format":"uuid","type":"string"},"project_id":{"type":"integer"},"resource_id":{"oneOf":[{"type":"integer"},{"type":"string"}]}},"type":"object"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/automations_AutomationDryRun"}}},"description":"OK"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"422":{"description":"Validation failed"}},"summary":"Dry-run an automation with a sample","tags":["automations"],"x-os-idempotent":true,"x-os-module":"automations","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/automations/{id}/versions":{"get":{"operationId":"listCompanyAutomationVersions","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"type":"object"},"snapshot":{"type":"object"},"version":{"type":"integer"}},"type":"object"},"type":"array"}}},"description":"OK"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}},"summary":"List an automation's versions","tags":["automations"],"x-os-idempotent":false,"x-os-module":"automations","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/connected_apps":{"get":{"description":"Live authorizations of partner apps and MCP clients held by your company's people.","operationId":"listCompanyConnectedApps","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/identity_Authorization"},"type":"array"}}},"description":"Authorizations"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"List every app authorization in your company","tags":["identity"],"x-os-idempotent":false,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/connected_apps/{grant_id}":{"delete":{"description":"Ends the authorization and all its tokens now.","operationId":"deleteCompanyConnectedApp","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Authorization id (uuid)","in":"path","name":"grant_id","required":true,"schema":{"type":"string"}},{"description":"Optional. Repeating a request with the same key within 24 hours replays the first 2xx response instead of running the write again.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"Revoke a person's app authorization","tags":["identity"],"x-os-idempotent":true,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/connectors":{"get":{"description":"Requires connectors:read for nonlegacy scoped tokens and an active same-company admin or superadmin. Suspended/expired workspace reads remain available. No cross-company support bypass.","operationId":"listCompanyConnectors","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"maximum":1000000,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":100,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Set to authentication to include safe persisted credential and refresh metadata. This does not verify provider authorization or token validity.","in":"query","name":"include","schema":{"enum":["authentication"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_ConnectionList"}}},"description":"Strict metadata projection. Staged/completed is not domain-applied or authorization verified.","headers":{"Cache-Control":{"schema":{"enum":["private, no-store"],"type":"string"}},"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"minimum":0,"type":"integer"}},"Total":{"schema":{"minimum":0,"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Invalid pagination"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Unauthenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Scope or admin/tenant access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Missing or foreign record"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Rate limited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Metadata unavailable; SQL details redacted"}},"summary":"List saved connection metadata","tags":["connectors"],"x-os-idempotent":false,"x-os-module":"connectors","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/connectors/{id}":{"get":{"description":"Requires connectors:read for nonlegacy scoped tokens and an active same-company admin or superadmin. Suspended/expired workspace reads remain available. No cross-company support bypass.","operationId":"getCompanyConnector","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Set to authentication to include safe persisted credential and refresh metadata. This does not verify provider authorization or token validity.","in":"query","name":"include","schema":{"enum":["authentication"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Connection"}}},"description":"Strict metadata projection. Staged/completed is not domain-applied or authorization verified.","headers":{"Cache-Control":{"schema":{"enum":["private, no-store"],"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Invalid pagination"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Unauthenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Scope or admin/tenant access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Missing or foreign record"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Rate limited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Metadata unavailable; SQL details redacted"}},"summary":"Read connection metadata","tags":["connectors"],"x-os-idempotent":false,"x-os-module":"connectors","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/connectors/{id}/runs":{"get":{"description":"Requires connectors:read for nonlegacy scoped tokens and an active same-company admin or superadmin. Suspended/expired workspace reads remain available. No cross-company support bypass.","operationId":"listCompanyConnectorRuns","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"page","schema":{"default":1,"maximum":1000000,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":100,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Set to authentication to include safe persisted credential and refresh metadata. This does not verify provider authorization or token validity.","in":"query","name":"include","schema":{"enum":["authentication"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_RunList"}}},"description":"Strict metadata projection. Staged/completed is not domain-applied or authorization verified.","headers":{"Cache-Control":{"schema":{"enum":["private, no-store"],"type":"string"}},"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"minimum":0,"type":"integer"}},"Total":{"schema":{"minimum":0,"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Invalid pagination"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Unauthenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Scope or admin/tenant access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Missing or foreign record"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Rate limited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Metadata unavailable; SQL details redacted"}},"summary":"List extraction run health","tags":["connectors"],"x-os-idempotent":false,"x-os-module":"connectors","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/connectors/{id}/runs/{run_id}":{"get":{"description":"Requires connectors:read for nonlegacy scoped tokens and an active same-company admin or superadmin. Suspended/expired workspace reads remain available. No cross-company support bypass.","operationId":"getCompanyConnectorRun","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"run_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Set to authentication to include safe persisted credential and refresh metadata. This does not verify provider authorization or token validity.","in":"query","name":"include","schema":{"enum":["authentication"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Run"}}},"description":"Strict metadata projection. Staged/completed is not domain-applied or authorization verified.","headers":{"Cache-Control":{"schema":{"enum":["private, no-store"],"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Invalid pagination"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Unauthenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Scope or admin/tenant access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Missing or foreign record"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Rate limited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/connectors_Error"}}},"description":"Metadata unavailable; SQL details redacted"}},"summary":"Read extraction run health","tags":["connectors"],"x-os-idempotent":false,"x-os-module":"connectors","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crews":{"get":{"operationId":"listCompanyCrews","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/workforce_Crew"},"type":"array"}}}}},"summary":"List crews","tags":["workforce"],"x-os-idempotent":false,"x-os-module":"workforce","x-os-paginated":false},"post":{"operationId":"createCompanyCrew","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"crew":{"properties":{"lead_party_id":{"type":"integer"},"name":{"type":"string"},"party_ids":{"items":{"type":"integer"},"type":"array"}},"required":["name"],"type":"object"}},"required":["crew"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/workforce_Crew"}}}},"422":{}},"summary":"Create a crew","tags":["workforce"],"x-os-idempotent":true,"x-os-module":"workforce","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crews/{id}":{"get":{"operationId":"getCompanyCrew","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/workforce_Crew"}}}},"404":{}},"summary":"Show a crew","tags":["workforce"],"x-os-idempotent":false,"x-os-module":"workforce","x-os-paginated":false},"patch":{"operationId":"updateCompanyCrew","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"crew":{"properties":{"lead_party_id":{"type":"integer"},"name":{"type":"string"},"party_ids":{"items":{"type":"integer"},"type":"array"}},"type":"object"}},"required":["crew"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/workforce_Crew"}}}}},"summary":"Update a crew","tags":["workforce"],"x-os-idempotent":true,"x-os-module":"workforce","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/activities":{"get":{"description":"Company administrators or explicit company CRM grantees only. Read-only grants allow view; standard grants allow view/create/edit. Company intake lists remain preproject records only. Project permissions are separate.","operationId":"listCompanyCrmActivities","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Comma-separated values: open, completed, overdue.","in":"query","name":"filters[status]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[contact_id]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[opportunity_id]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[owner_id]","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"completed_at":{"format":"date-time","type":["string","null"]},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"due_at":{"format":"date-time","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"outcome":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"project_id":{"type":"null"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","kind","contact_id","opportunity_id","owner_id","due_at","completed_at","notes","outcome","archived_at"],"type":"object"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List activities","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"description":"Company administrators or explicit company CRM grantees only. Read-only grants allow view; standard grants allow view/create/edit. Company intake lists remain preproject records only. Project permissions are separate.","operationId":"createCompanyCrmActivity","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"activity":{"additionalProperties":false,"properties":{"completed_at":{"description":"Log an interaction that already happened. Must not be in the future (60 seconds of clock skew is allowed). A logged interaction is created completed and sends no assignment notification or webhook.","format":"date-time","type":"string"},"contact_id":{"minimum":1,"type":["integer","null"]},"due_at":{"format":"date-time","type":["string","null"]},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"outcome":{"description":"Result of the completed interaction. Requires completed_at.","maxLength":2000,"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"title":{"type":"string"}},"required":["title"],"type":"object"}},"required":["activity"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"completed_at":{"format":"date-time","type":["string","null"]},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"due_at":{"format":"date-time","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"outcome":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"project_id":{"type":"null"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","kind","contact_id","opportunity_id","owner_id","due_at","completed_at","notes","outcome","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Create activity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/activities/calendar":{"get":{"description":"Requires Company CRM view and crm:read. Returns open, unarchived follow-ups with a due date as RFC 5545 VEVENTs (CRLF lines folded at 75 octets, UID crm-activity-<id>@os.construction). Date-only due dates are all-day events; other due instants are UTC. Events carry the title, related contact and opportunity names and a link back to the record, never notes. Takes the list's search and filters; at most 1000 events, earliest due first.","operationId":"listCompanyCrmActivitiesCalendar","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"}},{"description":"Comma-separated values: open, overdue. Completed follow-ups are never exported.","in":"query","name":"filters[status]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[contact_id]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[opportunity_id]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[owner_id]","schema":{"type":"string"}}],"responses":{"200":{"content":{"text/calendar":{"schema":{"type":"string"}}},"description":"iCalendar file"},"401":{"description":"Authentication required"},"403":{"description":"Company CRM view or crm:read denied"}},"summary":"Download open company intake CRM follow-ups as an iCalendar file","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/activities/{id}":{"delete":{"description":"Soft archive. Company administrators or standard company CRM grantees, as for PATCH. The follow-up stays readable by id (archived_at set) and in history, but leaves lists, summaries, forecasts, cohorts and exports, and can no longer be edited or newly linked. Repeating the request is a no-op. Records an archived history entry.","operationId":"deleteCompanyCrmActivity","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Archived"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Archive CRM follow-up","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false},"get":{"description":"Same access as the activity list. Archived follow-ups remain readable by id with archived_at set.","operationId":"getCompanyCrmActivity","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"completed_at":{"format":"date-time","type":["string","null"]},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"due_at":{"format":"date-time","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"outcome":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"project_id":{"type":"null"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","kind","contact_id","opportunity_id","owner_id","due_at","completed_at","notes","outcome","archived_at"],"type":"object"}}},"description":"Follow-up"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Get CRM follow-up","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"patch":{"description":"Only open follow-ups can be edited. The resulting contact, opportunity and owner must remain in the current CRM scope. A stale updated_at or completed activity returns 409. An unchanged patch returns the existing record without a history event.","operationId":"updateCompanyCrmActivity","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"activity":{"additionalProperties":false,"minProperties":2,"properties":{"contact_id":{"minimum":1,"type":["integer","null"]},"due_at":{"format":"date-time","type":["string","null"]},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"maxLength":10000,"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"title":{"maxLength":200,"minLength":1,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["updated_at"],"type":"object"}},"required":["activity"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"completed_at":{"format":"date-time","type":["string","null"]},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"due_at":{"format":"date-time","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"outcome":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"project_id":{"type":"null"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","kind","contact_id","opportunity_id","owner_id","due_at","completed_at","notes","outcome","archived_at"],"type":"object"}}},"description":"Updated follow-up"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"409":{"description":"Follow-up completed or update based on stale state"},"422":{"description":"Validation failed"}},"summary":"Edit an open CRM follow-up using its current updated_at value","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/activities/{id}/complete":{"post":{"description":"Company administrators or explicit company CRM grantees only. Read-only grants allow view; standard grants allow view/create/edit. Company intake lists remain preproject records only. Project permissions are separate.","operationId":"completeCompanyCrmActivity","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"completed_at":{"format":"date-time","type":["string","null"]},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"due_at":{"format":"date-time","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"outcome":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"project_id":{"type":"null"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","kind","contact_id","opportunity_id","owner_id","due_at","completed_at","notes","outcome","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Complete follow-up idempotently","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/activities/{id}/history":{"get":{"operationId":"listCompanyCrmActivityHistory","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor_id":{"minimum":1,"type":"integer"},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"item_id":{"minimum":1,"type":"integer"},"item_type":{"enum":["CrmContact","CrmOpportunity","CrmActivity"]},"project_id":{"type":["integer","null"]},"summary":{"type":"string"}},"required":["id","company_id","project_id","actor_id","item_type","item_id","action","summary","created_at"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator, token scope, or destination CRM permission denied"},"404":{"description":"Scoped intake or project record not found"},"409":{"description":"Linked aggregate cannot be associated independently"}},"summary":"Read retained company intake history for scoped CRM record","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/activities/{id}/restore":{"post":{"description":"Clears archived_at so the follow-up returns to lists, summaries and the action center. Company CRM edit grant and crm:write, as for DELETE. Repeating the request, or restoring an active record, is a no-op. Records a restored history entry.","operationId":"restoreCompanyCrmActivity","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Restored"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Restore archived CRM follow-up","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/contact_imports":{"post":{"description":"Requires company CRM create and crm:write. All rows create atomically under a company lock. Any invalid or already-linked external ID rejects the batch. Possible name/email duplicates require explicit acknowledgement and create distinct contacts; no automatic merge or update occurs. Exact request-key replay returns the prior receipt without creating contacts again.","operationId":"createCompanyCrmContactImport","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmContactImportCommitRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmContactImportReceipt"}}},"description":"Exact idempotent replay"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmContactImportReceipt"}}},"description":"Atomic import committed"},"400":{"description":"Malformed CSV or mapping"},"401":{"description":"Authentication required"},"403":{"description":"Company CRM create denied"},"409":{"description":"Review changed, duplicate acknowledgement missing, or request key reused"},"413":{"description":"Import exceeds byte or row limit"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid request or conflicting rows"}},"summary":"Commit a reviewed create-only company contact import","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/contact_imports/preview":{"post":{"description":"Requires company CRM create and crm:write. Maps explicit CSV headers, checks every row and source external ID, and suggests possible intake contact duplicates without merging. The SHA-256 review digest binds the CSV, mapping, row validation and candidate interpretation. No CSV is persisted.","operationId":"createCompanyCrmContactImportsPreview","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmContactImportPreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmContactImportPreview"}}},"description":"Per-row preview and review digest"},"400":{"description":"Malformed CSV or mapping"},"401":{"description":"Authentication required"},"403":{"description":"Company CRM create denied"},"413":{"description":"Import exceeds byte or row limit"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid request shape"}},"summary":"Preview a bounded create-only company contact import","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/contact_imports/{id}":{"get":{"description":"Requires company CRM view and crm:read. Returns row numbers and created contact IDs, without retaining or returning the CSV.","operationId":"getCompanyCrmContactImport","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmContactImportReceipt"}}},"description":"Immutable import receipt"},"401":{"description":"Authentication required"},"403":{"description":"Company CRM view denied"},"404":{"description":"Import not found in this company"}},"summary":"Read a company contact import receipt","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/contacts":{"get":{"description":"Company administrators or explicit company CRM grantees only. Read-only grants allow view; standard grants allow view/create/edit. Company intake lists remain preproject records only. Project permissions are separate.","operationId":"listCompanyCrmContacts","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Comma-separated values: lead, client, partner, subcontractor.","in":"query","name":"filters[relationship]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[owner_id]","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"project_id":{"type":"null"},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","first_name","last_name","organization","email","phone","role","relationship","source","notes","owner_id","archived_at"],"type":"object"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List contacts","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"description":"Company administrators or explicit company CRM grantees only. Read-only grants allow view; standard grants allow view/create/edit. Company intake lists remain preproject records only. Project permissions are separate.","operationId":"createCompanyCrmContact","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"contact":{"additionalProperties":false,"properties":{"email":{"type":["string","null"]},"first_name":{"type":"string"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]}},"required":["first_name","last_name"],"type":"object"}},"required":["contact"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"project_id":{"type":"null"},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","first_name","last_name","organization","email","phone","role","relationship","source","notes","owner_id","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Create contact","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/contacts/duplicates":{"get":{"description":"Advisory check before creating a company intake contact. Returns up to 10 active contacts in the same scope with the same email (case-insensitive), or the same first and last name and organization (case-insensitive; a blank organization matches contacts without one). Contact create never blocks on duplicates. Requires CRM view permission and crm:read.","operationId":"listCompanyCrmContactsDuplicates","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"email","schema":{"type":"string"}},{"in":"query","name":"first_name","schema":{"type":"string"}},{"in":"query","name":"last_name","schema":{"type":"string"}},{"in":"query","name":"organization","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"project_id":{"type":"null"},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","first_name","last_name","organization","email","phone","role","relationship","source","notes","owner_id","archived_at"],"type":"object"},"maxItems":10,"type":"array"}}},"description":"Likely duplicates, oldest first; empty when none"},"400":{"description":"Neither email nor both first_name and last_name supplied"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"}},"summary":"Find likely duplicate contacts","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/contacts/export":{"get":{"description":"Requires company CRM view and crm:read. Exports only contacts still in company intake, never project-associated contacts or notes. Each page contains at most 500 rows and a repeated header. The first page captures an ID high-water mark; subsequent requests pass that snapshot_max_id and next after_id. Edits or reassociations between pages are not frozen. Formula-like cells are prefixed with an apostrophe. Each successful page writes a company CRM intake audit event, and CSV data is not persisted.","operationId":"listCompanyCrmContactsExport","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Return intake contacts with greater IDs. Requires snapshot_max_id when greater than zero.","in":"query","name":"after_id","schema":{"maximum":2147483647,"minimum":0,"type":"integer"}},{"description":"First response X-CRM-Export-Snapshot-Max-ID; caps later pages to the initial ID high-water mark.","in":"query","name":"snapshot_max_id","schema":{"maximum":2147483647,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"Audited CSV page with CRLF rows and a header. A next-after header appears only when another page exists.","headers":{"X-CRM-Export-Next-After-ID":{"schema":{"minimum":1,"type":"integer"}},"X-CRM-Export-Row-Count":{"schema":{"maximum":500,"minimum":0,"type":"integer"}},"X-CRM-Export-Snapshot-Max-ID":{"schema":{"minimum":0,"type":"integer"}}}},"400":{"description":"Invalid or inconsistent cursor"},"401":{"description":"Authentication required"},"403":{"description":"Company CRM view or crm:read denied"}},"summary":"Export one audited page of company intake contacts as CSV","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/contacts/{id}":{"delete":{"description":"Soft archive. Company administrators or standard company CRM grantees, as for PATCH. The contact stays readable by id (archived_at set) and in history, but leaves lists, summaries, forecasts, cohorts and exports, and can no longer be edited or newly linked. Repeating the request is a no-op. Records an archived history entry.","operationId":"deleteCompanyCrmContact","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Archived"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Archive CRM contact","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false},"get":{"description":"Company administrators or explicit company CRM grantees only. Read-only grants allow view; standard grants allow view/create/edit. Company intake lists remain preproject records only. Project permissions are separate.","operationId":"getCompanyCrmContact","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"project_id":{"type":"null"},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","first_name","last_name","organization","email","phone","role","relationship","source","notes","owner_id","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Get contact","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"patch":{"description":"Company administrators or explicit company CRM grantees only. Read-only grants allow view; standard grants allow view/create/edit. Company intake lists remain preproject records only. Project permissions are separate.","operationId":"updateCompanyCrmContact","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"contact":{"additionalProperties":false,"minProperties":1,"properties":{"email":{"type":["string","null"]},"first_name":{"type":"string"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"description":"Optional current updated_at. When sent, a stale value returns 409 instead of overwriting a newer edit.","format":"date-time","type":"string"}},"type":"object"}},"required":["contact"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"project_id":{"type":"null"},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","first_name","last_name","organization","email","phone","role","relationship","source","notes","owner_id","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"409":{"description":"Archived contact, or update based on a stale updated_at"},"422":{"description":"Validation failed"}},"summary":"Update contact","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/contacts/{id}/associate":{"post":{"description":"Atomic transfer preserving IDs and intake history. Contact association includes all linked opportunities and activities. Individual opportunity association requires no linked contact. Every owner must be an active destination project member or administrator. Already assigned records return 404.","operationId":"associateCompanyCrmContact","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"association":{"additionalProperties":false,"properties":{"project_id":{"minimum":1,"type":"integer"}},"required":["project_id"],"type":"object"}},"required":["association"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"row":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"project_id":{"minimum":1,"type":"integer"},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","first_name","last_name","organization","email","phone","role","relationship","source","notes","owner_id","archived_at"],"type":"object"},"transferred":{"additionalProperties":false,"properties":{"activities":{"minimum":0,"type":"integer"},"contacts":{"minimum":0,"type":"integer"},"opportunities":{"minimum":0,"type":"integer"}},"required":["contacts","opportunities","activities"],"type":"object"}},"required":["row","transferred"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator, token scope, or destination CRM permission denied"},"404":{"description":"Scoped intake or project record not found"},"409":{"description":"Linked aggregate cannot be associated independently"}},"summary":"Associate reviewed intake aggregate to existing project","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/contacts/{id}/association_preview":{"get":{"operationId":"listCompanyCrmContactAssociationPreview","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"activities":{"minimum":0,"type":"integer"},"contacts":{"minimum":0,"type":"integer"},"opportunities":{"minimum":0,"type":"integer"}},"required":["contacts","opportunities","activities"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator, token scope, or destination CRM permission denied"},"404":{"description":"Scoped intake or project record not found"},"409":{"description":"Linked aggregate cannot be associated independently"}},"summary":"Preview aggregate record counts before association","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/contacts/{id}/history":{"get":{"operationId":"listCompanyCrmContactHistory","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor_id":{"minimum":1,"type":"integer"},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"item_id":{"minimum":1,"type":"integer"},"item_type":{"enum":["CrmContact","CrmOpportunity","CrmActivity"]},"project_id":{"type":["integer","null"]},"summary":{"type":"string"}},"required":["id","company_id","project_id","actor_id","item_type","item_id","action","summary","created_at"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator, token scope, or destination CRM permission denied"},"404":{"description":"Scoped intake or project record not found"},"409":{"description":"Linked aggregate cannot be associated independently"}},"summary":"Read retained company intake history for scoped CRM record","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/contacts/{id}/merge":{"post":{"description":"Moves the source contact's opportunities, activities, service cases, import references and converted inquiry links to target_id (an active contact in the same scope), fills the target's empty organization, email, phone, role, source, notes and owner from the source, then archives the source. One locked transaction; history records a merged entry on the source and an updated entry on the target. Same permission as archive (CRM edit) and crm:write. A source with customer responses, offers, authority evidence, portal grants, invitations or service requests is refused with 409; merge in the other direction instead. The master person link is not copied.","operationId":"mergeCompanyCrmContact","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"merge":{"additionalProperties":false,"properties":{"target_id":{"minimum":1,"type":"integer"},"updated_at":{"description":"Optional current updated_at of the source contact. When sent, a stale value returns 409.","format":"date-time","type":"string"}},"required":["target_id"],"type":"object"}},"required":["merge"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"project_id":{"type":"null"},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","first_name","last_name","organization","email","phone","role","relationship","source","notes","owner_id","archived_at"],"type":"object"}}},"description":"The surviving target contact"},"400":{"description":"Target is the source contact or is archived"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Source or target not found in this scope"},"409":{"description":"Source archived or stale, or bound to customer-facing records"},"422":{"description":"Invalid body"}},"summary":"Merge a duplicate contact into another","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/contacts/{id}/person":{"delete":{"operationId":"deletePersonCompanyCrmContact","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"null"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Unlink contact from master person","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false},"get":{"operationId":"listCompanyCrmContactPerson","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"properties":{"person_id":{"minimum":1,"type":"integer"},"person_name":{"type":"string"}},"required":["person_id","person_name"],"type":"object"},{"type":"null"}]}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Get explicit master person link","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"put":{"operationId":"personCompanyCrmContact","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"person_link":{"properties":{"person_id":{"minimum":1,"type":"integer"}},"required":["person_id"],"type":"object"}},"required":["person_link"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"person_id":{"minimum":1,"type":"integer"},"person_name":{"type":"string"}},"required":["person_id","person_name"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Link contact to master person","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/contacts/{id}/restore":{"post":{"description":"Clears archived_at so the contact returns to lists, summaries and exports. Company CRM edit grant and crm:write, as for DELETE. Repeating the request, or restoring an active record, is a no-op. Records a restored history entry.","operationId":"restoreCompanyCrmContact","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Restored"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Restore archived CRM contact","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/forecast":{"get":{"description":"Amounts are CRM estimates, not financial commitments. as_of is server UTC report time. Stage age is observed only from new creates or recorded transitions; migration baseline has unknown age.","operationId":"listCompanyCrmForecast","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"as_of":{"format":"date-time","type":"string"},"currency":{"const":"USD"},"observed_stage_age":{"additionalProperties":false,"properties":{"days_0_to_30":{"minimum":0,"type":"integer"},"days_31_to_60":{"minimum":0,"type":"integer"},"days_61_plus":{"minimum":0,"type":"integer"}},"required":["days_0_to_30","days_31_to_60","days_61_plus"],"type":"object"},"open_amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"open_count":{"minimum":0,"type":"integer"},"overdue_close_count":{"minimum":0,"type":"integer"},"stages":{"items":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"count":{"minimum":0,"type":"integer"},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"weighted_amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"}},"required":["stage","count","amount","weighted_amount"],"type":"object"},"type":"array"},"transitions":{"items":{"additionalProperties":false,"properties":{"count":{"minimum":1,"type":"integer"},"from_stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"to_stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]}},"required":["from_stage","to_stage","count"],"type":"object"},"type":"array"},"unobserved_stage_aging_count":{"minimum":0,"type":"integer"},"weighted_amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"}},"required":["as_of","currency","open_count","open_amount","weighted_amount","overdue_close_count","unobserved_stage_aging_count","observed_stage_age","stages","transitions"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM read permission denied"},"404":{"description":"Scoped record not found"}},"summary":"Current advisory opportunity forecast and observable stage aging","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/growth_cohorts":{"get":{"description":"Rows are grouped by opportunity creation month and current source/stage at as_of, not historical month-end snapshots. Open pursuits are excluded from the decided win-rate denominator. Source is staff-attributed, not a verified acquisition channel. CRM estimates are not revenue.","operationId":"listCompanyCrmGrowthCohorts","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"months","required":false,"schema":{"default":12,"maximum":24,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"as_of":{"format":"date-time","type":"string"},"from_month":{"pattern":"^\\d{4}-\\d{2}$","type":"string"},"months":{"maximum":24,"minimum":1,"type":"integer"},"rows":{"items":{"additionalProperties":false,"properties":{"decided":{"minimum":0,"type":"integer"},"lost":{"minimum":0,"type":"integer"},"month":{"pattern":"^\\d{4}-\\d{2}$","type":"string"},"open":{"minimum":0,"type":"integer"},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"total":{"minimum":0,"type":"integer"},"win_rate_percent":{"maximum":100,"minimum":0,"type":["number","null"]},"won":{"minimum":0,"type":"integer"}},"required":["month","source_category","total","open","won","lost","decided","win_rate_percent"],"type":"object"},"maxItems":216,"type":"array"}},"required":["as_of","months","from_month","rows"],"type":"object"}}},"description":"Scoped outcome cohorts"},"400":{"description":"Invalid month range"},"401":{"description":"Authentication required"},"403":{"description":"Current CRM access denied"},"404":{"description":"Scope not found"}},"summary":"Current-state opportunity outcome cohorts by UTC creation month and staff-attributed source","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/lead_forms":{"get":{"description":"Company CRM administrators only. Public tokens are never listed.","operationId":"listCompanyCrmLeadForms","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadFormList"}}},"description":"Private paged form list"}},"summary":"List company lead intake forms","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"post":{"description":"Company CRM administrator only. Returns the raw public token once; store the link securely.","operationId":"createCompanyCrmLeadForm","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadFormCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadFormTokenReceipt"}}},"description":"Form and one-time public token"}},"summary":"Create company lead intake form","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/lead_forms/{id}":{"patch":{"description":"Company CRM administrator only. Deactivation permanently revokes the current token; reactivate only by rotating to a fresh token.","operationId":"updateCompanyCrmLeadForm","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadFormUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadForm"}}},"description":"Current private form metadata"}},"summary":"Update or deactivate lead intake form","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/lead_forms/{id}/rotate":{"post":{"description":"Company CRM administrator only. Revokes the prior link permanently and returns the replacement only once.","operationId":"rotateCompanyCrmLeadForm","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadFormTokenReceipt"}}},"description":"Form and one-time replacement token"}},"summary":"Rotate lead intake form public token","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/lead_inquiries":{"get":{"description":"Requires company CRM view access and crm:read. Anonymous submissions never become contacts automatically. Queue filters are private and evaluated with current server time; results have Total, Per-Page and Link headers. Offset is bounded to 10,000; large tenants will need a future cursor path.","operationId":"listCompanyCrmLeadInquiries","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"status","schema":{"enum":["new","converted","dismissed"],"type":"string"}},{"description":"Private triage view; overdue means an open inquiry past its response target without a valid staff-reported response. needs_reassignment shows open inquiries assigned to a member no longer eligible for company CRM review.","in":"query","name":"queue","schema":{"enum":["all","unassigned","mine","overdue","needs_reassignment"],"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadInquiryList"}}},"description":"Private paged inquiry queue"},"400":{"description":"Invalid or out-of-range page, status or queue"},"401":{"description":"Missing bearer token"},"403":{"description":"Insufficient scope or company grant"}},"summary":"List private company lead inquiries","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/lead_inquiries/assignable_members":{"get":{"description":"Private company CRM view. Paged, literal-name search of active company administrators or members with a current Standard company CRM grant; does not grant those members new access.","operationId":"listCompanyCrmLeadInquiriesAssignableMembers","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"maxLength":80,"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadAssignableMembers"}}},"description":"Eligible members, paginated with Total, Per-Page and Link headers"},"400":{"description":"Invalid search or page"},"401":{"description":"Missing bearer token"},"403":{"description":"Insufficient scope or company grant"}},"summary":"List eligible company inquiry reviewers","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/lead_inquiries/{id}":{"get":{"operationId":"getCompanyCrmLeadInquiry","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadInquiry"}}},"description":"Scoped inquiry"}},"summary":"Show private lead inquiry","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/lead_inquiries/{id}/conversion_preview":{"get":{"description":"Requires current company CRM view access. Duplicate candidates are suggestions, never automatic merges.","operationId":"listCompanyCrmLeadInquiryConversionPreview","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadConversionPreview"}}},"description":"Version-bound private review"}},"summary":"Preview lead inquiry conversion and possible duplicates","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/lead_inquiries/{id}/convert":{"post":{"description":"Requires company CRM create access and crm:write. Rechecks the review digest, preserves provenance, and never silently merges duplicates.","operationId":"convertCompanyCrmLeadInquiry","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadConversionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadConversionReceipt"}}},"description":"Conversion receipt or exact idempotent replay"}},"summary":"Convert reviewed inquiry to company CRM contact and optional opportunity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/lead_inquiries/{id}/dismiss":{"post":{"description":"Requires company CRM edit access and crm:write; preserves the submitted inquiry and staff decision.","operationId":"createCompanyCrmLeadInquiryDismiss","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadDismissalRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadInquiry"}}},"description":"Dismissed inquiry"}},"summary":"Dismiss a private lead inquiry with reason","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/lead_inquiries/{id}/responses":{"post":{"description":"Requires company CRM edit and crm:write. This is a manual report with an immutable private event, not evidence that the app sent or delivered communication.","operationId":"createCompanyCrmLeadInquiryResponse","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadStaffResponseRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadTriageReceipt"}}},"description":"Recorded report and current inquiry"},"400":{"description":"Reported response time outside inquiry bounds"},"401":{"description":"Missing bearer token"},"403":{"description":"Insufficient scope or company grant"},"404":{"description":"Inquiry unavailable"},"409":{"description":"Stale version or handled inquiry"},"422":{"description":"Invalid response report"}},"summary":"Record a staff-reported customer response","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/lead_inquiries/{id}/responses/{response_event_id}/void":{"post":{"description":"Requires company CRM edit and crm:write. Retains the original report and an append-only correction reason; recomputes the inquiry's first staff-reported response time.","operationId":"voidCompanyCrmLeadInquiryResponse","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"response_event_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadResponseVoidRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadTriageReceipt"}}},"description":"Private correction receipt"},"401":{"description":"Missing bearer token"},"403":{"description":"Insufficient scope or company grant"},"404":{"description":"Inquiry or response report unavailable"},"409":{"description":"Stale version, duplicate correction or handled inquiry"},"422":{"description":"Invalid correction reason"}},"summary":"Void a mistaken staff-reported response","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/lead_inquiries/{id}/triage":{"patch":{"description":"Requires company CRM edit and crm:write. An exact inquiry version is required; assignment and response target changes are retained as private events.","operationId":"triageCompanyCrmLeadInquiry","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadTriageRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadTriageReceipt"}}},"description":"Updated inquiry and private event"},"400":{"description":"Invalid assignee or response target"},"401":{"description":"Missing bearer token"},"403":{"description":"Insufficient scope or company grant"},"404":{"description":"Inquiry unavailable"},"409":{"description":"Stale version or handled inquiry"},"422":{"description":"Invalid triage fields"}},"summary":"Assign and prioritize an unhandled inquiry","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/lead_inquiries/{id}/triage_events":{"get":{"description":"Requires company CRM view and crm:read. Results are paginated newest first; response text remains private.","operationId":"listCompanyCrmLeadInquiryTriageEvents","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmLeadTriageEventList"}}},"description":"Paged private history with Total, Per-Page and Link headers"},"400":{"description":"Invalid page"},"401":{"description":"Missing bearer token"},"403":{"description":"Insufficient scope or company grant"},"404":{"description":"Inquiry unavailable"}},"summary":"List private inquiry triage and response history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/members":{"get":{"description":"Company administrators only, with admin:read token scope. Includes inactive members; inactive grants never authorize access. Reactivation restores retained grants unless revoked. Effective level reflects workspace read-only status.","operationId":"listCompanyCrmMembers","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"effective_level":{"enum":["none","read_only","standard","admin"]},"email":{"type":"string"},"is_active":{"type":"boolean"},"is_admin":{"type":"boolean"},"level":{"enum":["none","read_only","standard"]},"name":{"type":"string"},"updated_at":{"format":"date-time","type":["string","null"]},"user_id":{"minimum":1,"type":"integer"}},"required":["user_id","name","email","is_active","is_admin","level","effective_level","updated_at"],"type":"object"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"400":{"description":"Only active non-administrator members can receive new grants"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator and admin token scope required"},"404":{"description":"Company member not found"},"422":{"description":"Invalid grant level or extra fields"}},"summary":"List company members and explicit CRM grants","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/members/{id}":{"patch":{"description":"Company administrators only, with admin:write token scope. read_only=view; standard=view/create/edit; none deletes the grant. No project permission changes. New grants require active same-company non-admin member; revocation also allowed for inactive members. Workspace read-only blocks mutation except super-admin exemption. Grant changes and durable journal are atomic.","operationId":"updateCompanyCrmMember","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"crm_grant":{"additionalProperties":false,"properties":{"level":{"enum":["none","read_only","standard"]}},"required":["level"],"type":"object"}},"required":["crm_grant"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"effective_level":{"enum":["none","read_only","standard","admin"]},"email":{"type":"string"},"is_active":{"type":"boolean"},"is_admin":{"type":"boolean"},"level":{"enum":["none","read_only","standard"]},"name":{"type":"string"},"updated_at":{"format":"date-time","type":["string","null"]},"user_id":{"minimum":1,"type":"integer"}},"required":["user_id","name","email","is_active","is_admin","level","effective_level","updated_at"],"type":"object"}}},"description":"Success"},"400":{"description":"Only active non-administrator members can receive new grants"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator and admin token scope required"},"404":{"description":"Company member not found"},"422":{"description":"Invalid grant level or extra fields"}},"summary":"Set or revoke explicit company CRM grant","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false},"put":{"description":"Company administrators only, with admin:write token scope. read_only=view; standard=view/create/edit; none deletes the grant. No project permission changes. New grants require active same-company non-admin member; revocation also allowed for inactive members. Workspace read-only blocks mutation except super-admin exemption. Grant changes and durable journal are atomic.","operationId":"replaceCompanyCrmMember","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"crm_grant":{"additionalProperties":false,"properties":{"level":{"enum":["none","read_only","standard"]}},"required":["level"],"type":"object"}},"required":["crm_grant"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"effective_level":{"enum":["none","read_only","standard","admin"]},"email":{"type":"string"},"is_active":{"type":"boolean"},"is_admin":{"type":"boolean"},"level":{"enum":["none","read_only","standard"]},"name":{"type":"string"},"updated_at":{"format":"date-time","type":["string","null"]},"user_id":{"minimum":1,"type":"integer"}},"required":["user_id","name","email","is_active","is_admin","level","effective_level","updated_at"],"type":"object"}}},"description":"Success"},"400":{"description":"Only active non-administrator members can receive new grants"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator and admin token scope required"},"404":{"description":"Company member not found"},"422":{"description":"Invalid grant level or extra fields"}},"summary":"Set or revoke explicit company CRM grant","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/members/{id}/history":{"get":{"description":"Company administrators only, with admin:read token scope. Journal remains after grant revocation.","operationId":"listCompanyCrmMemberHistory","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor_id":{"minimum":1,"type":"integer"},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"item_id":{"minimum":1,"type":"integer"},"item_type":{"const":"CrmMemberAccess"},"project_id":{"type":"null"},"summary":{"type":"string"}},"required":["id","company_id","project_id","actor_id","item_type","item_id","action","summary","created_at"],"type":"object"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"400":{"description":"Only active non-administrator members can receive new grants"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator and admin token scope required"},"404":{"description":"Company member not found"},"422":{"description":"Invalid grant level or extra fields"}},"summary":"Read durable company CRM grant change history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/opportunities":{"get":{"description":"Company administrators or explicit company CRM grantees only. Read-only grants allow view; standard grants allow view/create/edit. Company intake lists remain preproject records only. Project permissions are separate.","operationId":"listCompanyCrmOpportunities","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Comma-separated values: qualification, site_visit, estimating, proposal, negotiation, won, lost.","in":"query","name":"filters[stage]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[contact_id]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[owner_id]","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"currency":{"const":"USD"},"expected_close_date":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"loss_reason":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"project_id":{"type":"null"},"scope":{"type":["string","null"]},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"source_detail":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","contact_id","owner_id","stage","amount","currency","probability","expected_close_date","scope","loss_reason","source_category","source_detail","archived_at"],"type":"object"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List opportunities","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"description":"Company administrators or explicit company CRM grantees only. Read-only grants allow view; standard grants allow view/create/edit. Company intake lists remain preproject records only. Project permissions are separate.","operationId":"createCompanyCrmOpportunity","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"opportunity":{"additionalProperties":false,"properties":{"amount":{"pattern":"^(?:0|[1-9]\\d{0,15})(?:\\.\\d{1,2})?$","type":"string"},"contact_id":{"minimum":1,"type":["integer","null"]},"currency":{"const":"USD"},"expected_close_date":{"format":"date","type":["string","null"]},"loss_reason":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"scope":{"type":["string","null"]},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"source_detail":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"}},"required":["title"],"type":"object"}},"required":["opportunity"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"currency":{"const":"USD"},"expected_close_date":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"loss_reason":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"project_id":{"type":"null"},"scope":{"type":["string","null"]},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"source_detail":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","contact_id","owner_id","stage","amount","currency","probability","expected_close_date","scope","loss_reason","source_category","source_detail","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Create opportunity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/opportunities/{id}":{"delete":{"description":"Soft archive. Company administrators or standard company CRM grantees, as for PATCH. The opportunity stays readable by id (archived_at set) and in history, but leaves lists, summaries, forecasts, cohorts and exports, and can no longer be edited or newly linked. Repeating the request is a no-op. Records an archived history entry.","operationId":"deleteCompanyCrmOpportunity","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Archived"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Archive CRM opportunity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false},"get":{"description":"Company administrators or explicit company CRM grantees only. Read-only grants allow view; standard grants allow view/create/edit. Company intake lists remain preproject records only. Project permissions are separate.","operationId":"getCompanyCrmOpportunity","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"currency":{"const":"USD"},"expected_close_date":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"loss_reason":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"project_id":{"type":"null"},"scope":{"type":["string","null"]},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"source_detail":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","contact_id","owner_id","stage","amount","currency","probability","expected_close_date","scope","loss_reason","source_category","source_detail","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Get opportunity","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"patch":{"description":"Company administrators or explicit company CRM grantees only. Read-only grants allow view; standard grants allow view/create/edit. Company intake lists remain preproject records only. Project permissions are separate.","operationId":"updateCompanyCrmOpportunity","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"opportunity":{"additionalProperties":false,"minProperties":1,"properties":{"amount":{"pattern":"^(?:0|[1-9]\\d{0,15})(?:\\.\\d{1,2})?$","type":"string"},"change_note":{"description":"Optional reason retained with a stage, amount, probability, or close-date change.","maxLength":1000,"minLength":1,"type":"string"},"contact_id":{"minimum":1,"type":["integer","null"]},"currency":{"const":"USD"},"expected_close_date":{"format":"date","type":["string","null"]},"loss_reason":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"scope":{"type":["string","null"]},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"source_change_note":{"description":"Required when the persisted source category or detail changes.","maxLength":1000,"minLength":1,"type":"string"},"source_detail":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"}},"type":"object"}},"required":["opportunity"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"currency":{"const":"USD"},"expected_close_date":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"loss_reason":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"project_id":{"type":"null"},"scope":{"type":["string","null"]},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"source_detail":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","contact_id","owner_id","stage","amount","currency","probability","expected_close_date","scope","loss_reason","source_category","source_detail","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Update opportunity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/opportunities/{id}/associate":{"post":{"description":"Atomic transfer preserving IDs and intake history. Contact association includes all linked opportunities and activities. Individual opportunity association requires no linked contact. Every owner must be an active destination project member or administrator. Already assigned records return 404.","operationId":"associateCompanyCrmOpportunity","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"association":{"additionalProperties":false,"properties":{"project_id":{"minimum":1,"type":"integer"}},"required":["project_id"],"type":"object"}},"required":["association"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"row":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"currency":{"const":"USD"},"expected_close_date":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"loss_reason":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"scope":{"type":["string","null"]},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"source_detail":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","contact_id","owner_id","stage","amount","currency","probability","expected_close_date","scope","loss_reason","source_category","source_detail","archived_at"],"type":"object"},"transferred":{"additionalProperties":false,"properties":{"activities":{"minimum":0,"type":"integer"},"contacts":{"minimum":0,"type":"integer"},"opportunities":{"minimum":0,"type":"integer"}},"required":["contacts","opportunities","activities"],"type":"object"}},"required":["row","transferred"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator, token scope, or destination CRM permission denied"},"404":{"description":"Scoped intake or project record not found"},"409":{"description":"Linked aggregate cannot be associated independently"}},"summary":"Associate reviewed intake aggregate to existing project","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/opportunities/{id}/association_preview":{"get":{"operationId":"listCompanyCrmOpportunityAssociationPreview","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"activities":{"minimum":0,"type":"integer"},"contacts":{"minimum":0,"type":"integer"},"opportunities":{"minimum":0,"type":"integer"}},"required":["contacts","opportunities","activities"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator, token scope, or destination CRM permission denied"},"404":{"description":"Scoped intake or project record not found"},"409":{"description":"Linked aggregate cannot be associated independently"}},"summary":"Preview aggregate record counts before association","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/opportunities/{id}/create_project":{"post":{"description":"Active same-company administrators only, including retries. Requires both crm:write and admin:write token grants. First create201, identical normalized retry200. Persisted source opportunity mapping prevents duplicates, even concurrent retries. Different reviewed request409. Copies normal project defaults/template team and settings. All reviewed contact-linked pursuits move regardless of sibling stage. No opportunity estimate is promoted into a budget or contract.","operationId":"createProjectCompanyCrmOpportunity","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"handoff":{"additionalProperties":false,"properties":{"accept_related_opportunities":{"const":true},"project":{"properties":{"address":{"maxLength":255,"nullable":true,"type":"string"},"city":{"maxLength":120,"nullable":true,"type":"string"},"completion_date":{"format":"date","nullable":true,"type":"string"},"country_code":{"description":"ISO 3166-1 alpha-2","maxLength":2,"nullable":true,"type":"string"},"description":{"maxLength":5000,"nullable":true,"type":"string"},"name":{"maxLength":200,"minLength":1,"type":"string"},"project_number":{"maxLength":50,"nullable":true,"type":"string"},"project_stage_id":{"nullable":true,"type":"integer"},"project_type_id":{"nullable":true,"type":"integer"},"start_date":{"format":"date","nullable":true,"type":"string"},"state_code":{"maxLength":50,"nullable":true,"type":"string"},"template_project_id":{"description":"Copy setup from this project in the same company.","nullable":true,"type":"integer"},"zip":{"maxLength":20,"nullable":true,"type":"string"}},"required":["name"],"type":"object"},"review_token":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["project","review_token","accept_related_opportunities"],"type":"object"}},"required":["handoff"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"opportunity_id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"replayed":{"type":"boolean"},"transferred":{"additionalProperties":false,"properties":{"activities":{"minimum":0,"type":"integer"},"contacts":{"minimum":0,"type":"integer"},"opportunities":{"minimum":0,"type":"integer"}},"required":["contacts","opportunities","activities"],"type":"object"}},"required":["project_id","opportunity_id","transferred","replayed"],"type":"object"}}},"description":"Success"},"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"opportunity_id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"replayed":{"type":"boolean"},"transferred":{"additionalProperties":false,"properties":{"activities":{"minimum":0,"type":"integer"},"contacts":{"minimum":0,"type":"integer"},"opportunities":{"minimum":0,"type":"integer"}},"required":["contacts","opportunities","activities"],"type":"object"}},"required":["project_id","opportunity_id","transferred","replayed"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Active same-company administrator and required token scopes only"},"404":{"description":"Scoped source or receipt project not found"},"409":{"description":"Source not Won, stale aggregate review, already transferred, or mismatched retry"},"422":{"description":"Project input or explicit aggregate acceptance missing/invalid"}},"summary":"Create one project from explicitly reviewed Won opportunity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/opportunities/{id}/forecast_history":{"get":{"description":"Migration baseline records deployment-time state, not historical transitions. Only scoped CRM readers can view events. page and per_page paginate newest first, maximum 100 rows.","operationId":"listCompanyCrmOpportunityForecastHistory","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"events":{"items":{"additionalProperties":false,"properties":{"action":{"enum":["baseline","created","updated"]},"actor_id":{"type":["integer","null"]},"changed_fields":{"items":{"enum":["stage","amount","probability","expected_close_date"]},"type":"array"},"from":{"anyOf":[{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"expected_close_date":{"format":"date","type":["string","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]}},"required":["stage","amount","probability","expected_close_date"],"type":"object"},{"type":"null"}]},"id":{"minimum":1,"type":"integer"},"reason":{"maxLength":1000,"type":["string","null"]},"recorded_at":{"format":"date-time","type":"string"},"to":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"expected_close_date":{"format":"date","type":["string","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]}},"required":["stage","amount","probability","expected_close_date"],"type":"object"}},"required":["id","action","actor_id","recorded_at","changed_fields","reason","from","to"],"type":"object"},"type":"array"},"page":{"minimum":1,"type":"integer"},"per_page":{"minimum":1,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["events","total","page","per_page"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM read permission denied"},"404":{"description":"Scoped record not found"}},"summary":"Paginated immutable opportunity forecast input history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/opportunities/{id}/history":{"get":{"operationId":"listCompanyCrmOpportunityHistory","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor_id":{"minimum":1,"type":"integer"},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"item_id":{"minimum":1,"type":"integer"},"item_type":{"enum":["CrmContact","CrmOpportunity","CrmActivity"]},"project_id":{"type":["integer","null"]},"summary":{"type":"string"}},"required":["id","company_id","project_id","actor_id","item_type","item_id","action","summary","created_at"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator, token scope, or destination CRM permission denied"},"404":{"description":"Scoped intake or project record not found"},"409":{"description":"Linked aggregate cannot be associated independently"}},"summary":"Read retained company intake history for scoped CRM record","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/opportunities/{id}/project_handoff":{"get":{"description":"Returns receipt or null. Requires company CRM view plus current destination project CRM view and enabled tool; company access alone does not reveal moved-project receipts.","operationId":"listCompanyCrmOpportunityProjectHandoff","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"properties":{"opportunity_id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"replayed":{"type":"boolean"},"transferred":{"additionalProperties":false,"properties":{"activities":{"minimum":0,"type":"integer"},"contacts":{"minimum":0,"type":"integer"},"opportunities":{"minimum":0,"type":"integer"}},"required":["contacts","opportunities","activities"],"type":"object"}},"required":["project_id","opportunity_id","transferred","replayed"],"type":"object"},{"type":"null"}]}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Active same-company administrator and required token scopes only"},"404":{"description":"Scoped source or receipt project not found"},"409":{"description":"Source not Won, stale aggregate review, already transferred, or mismatched retry"}},"summary":"Recover the prior project receipt after source leaves intake","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/opportunities/{id}/project_handoff_preview":{"get":{"description":"Active same-company administrators only; a company CRM member grant does not permit new-project preview.","operationId":"listCompanyCrmOpportunityProjectHandoffPreview","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"contact":{"anyOf":[{"type":"null"},{"additionalProperties":false,"properties":{"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"organization":{"type":["string","null"]}},"required":["id","first_name","last_name","organization"],"type":"object"}]},"defaults":{"additionalProperties":false,"properties":{"description":{"type":["string","null"]},"name":{"type":"string"}},"required":["name","description"],"type":"object"},"related_activities":{"items":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"},"title":{"type":"string"}},"required":["id","title"],"type":"object"},"type":"array"},"related_opportunities":{"items":{"additionalProperties":false,"properties":{"amount":{"type":"string"},"id":{"minimum":1,"type":"integer"},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"}},"required":["id","title","stage","amount"],"type":"object"},"type":"array"},"review_token":{"pattern":"^[a-f0-9]{64}$","type":"string"},"transferred":{"additionalProperties":false,"properties":{"activities":{"minimum":0,"type":"integer"},"contacts":{"minimum":0,"type":"integer"},"opportunities":{"minimum":0,"type":"integer"}},"required":["contacts","opportunities","activities"],"type":"object"}},"required":["review_token","transferred","contact","related_opportunities","related_activities","defaults"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Active same-company administrator and required token scopes only"},"404":{"description":"Scoped source or receipt project not found"},"409":{"description":"Source not Won, stale aggregate review, already transferred, or mismatched retry"}},"summary":"Review Won opportunity and every related record moved into a new project","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/opportunities/{id}/restore":{"post":{"description":"Clears archived_at so the opportunity returns to lists, summaries, forecasts and cohorts. Company CRM edit grant and crm:write, as for DELETE. Repeating the request, or restoring an active record, is a no-op. Records a restored history entry.","operationId":"restoreCompanyCrmOpportunity","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Restored"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Restore archived CRM opportunity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/opportunities/{id}/source_history":{"get":{"description":"Backfilled legacy opportunities begin with an unknown baseline; corrections preserve before/after values and staff reason. Requires current CRM scope access.","operationId":"listCompanyCrmOpportunitySourceHistory","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"events":{"items":{"additionalProperties":false,"properties":{"action":{"enum":["baseline","created","corrected"],"type":"string"},"actor_id":{"minimum":1,"type":["integer","null"]},"from":{"additionalProperties":false,"properties":{"category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"detail":{"maxLength":200,"type":["string","null"]}},"required":["category","detail"],"type":["object","null"]},"id":{"minimum":1,"type":"integer"},"reason":{"maxLength":1000,"type":["string","null"]},"recorded_at":{"format":"date-time","type":"string"},"to":{"additionalProperties":false,"properties":{"category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"detail":{"maxLength":200,"type":["string","null"]}},"required":["category","detail"],"type":"object"}},"required":["id","action","actor_id","recorded_at","reason","from","to"],"type":"object"},"type":"array"},"page":{"minimum":1,"type":"integer"},"per_page":{"maximum":100,"minimum":1,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["events","total","page","per_page"],"type":"object"}}},"description":"Opportunity source event page"},"401":{"description":"Authentication required"},"403":{"description":"Current CRM access denied"},"404":{"description":"Opportunity not found in current scope"}},"summary":"Paginated staff-attributed opportunity source history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/organizations":{"get":{"operationId":"listCompanyCrmOrganizations","parameters":[{"in":"query","name":"page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"website":{"type":["string","null"]}},"required":["id","company_id","name","website","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List CRM organizations","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"operationId":"createCompanyCrmOrganization","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"organization":{"properties":{"name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"website":{"type":["string","null"]}},"required":["name"],"type":"object"}},"required":["organization"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"website":{"type":["string","null"]}},"required":["id","company_id","name","website","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Create CRM organization","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/organizations/{id}":{"get":{"operationId":"getCompanyCrmOrganization","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"website":{"type":["string","null"]}},"required":["id","company_id","name","website","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Get CRM organization","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"patch":{"operationId":"updateCompanyCrmOrganization","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"organization":{"properties":{"name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"website":{"type":["string","null"]}},"required":["name","website","phone","notes"],"type":"object"}},"required":["organization"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"website":{"type":["string","null"]}},"required":["id","company_id","name","website","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Update CRM organization","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/organizations/{id}/aliases":{"get":{"operationId":"listCompanyCrmOrganizationAliases","parameters":[{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"website":{"type":["string","null"]}},"required":["id","company_id","name","website","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope or tenant denied"},"404":{"description":"Scoped identity not found"},"409":{"description":"Stale preview or incompatible resolution state"},"422":{"description":"Validation failed"}},"summary":"List identities resolved to this canonical identity","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/organizations/{id}/duplicate_candidates":{"get":{"operationId":"listCompanyCrmOrganizationDuplicateCandidates","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"website":{"type":["string","null"]}},"required":["id","company_id","name","website","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"},{"properties":{"match_reasons":{"items":{"type":"string"},"type":"array"}},"required":["match_reasons"],"type":"object"}]},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope or tenant denied"},"404":{"description":"Scoped identity not found"},"409":{"description":"Stale preview or incompatible resolution state"},"422":{"description":"Validation failed"}},"summary":"Suggest possible duplicate identities; review required","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/organizations/{id}/history":{"get":{"operationId":"listCompanyCrmOrganizationHistory","parameters":[{"in":"query","name":"page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor_id":{"minimum":1,"type":"integer"},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"item_id":{"minimum":1,"type":"integer"},"item_type":{"enum":["CrmOrganization"]},"project_id":{"type":["integer","null"]},"summary":{"type":"string"}},"required":["id","company_id","project_id","actor_id","item_type","item_id","action","summary","created_at"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List organization history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/organizations/{id}/people":{"get":{"operationId":"listCompanyCrmOrganizationPeople","parameters":[{"in":"query","name":"page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"minimum":1,"type":"integer"},"person_id":{"minimum":1,"type":"integer"},"person_name":{"type":"string"},"role":{"type":"string"}},"required":["id","person_id","person_name","role"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List organization people","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/organizations/{id}/projects":{"get":{"operationId":"listCompanyCrmOrganizationProjects","parameters":[{"in":"query","name":"page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"minimum":1,"type":"integer"},"organization_id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"project_name":{"type":"string"},"role":{"type":"string"}},"required":["id","project_id","role"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List visible organization project roles","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"operationId":"createCompanyCrmOrganizationProject","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_role":{"properties":{"project_id":{"minimum":1,"type":"integer"},"role":{"type":"string"}},"required":["project_id","role"],"type":"object"}},"required":["project_role"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"minimum":1,"type":"integer"},"organization_id":{"minimum":1,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"project_name":{"type":"string"},"role":{"type":"string"}},"required":["id","project_id","role"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Add organization project role","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/organizations/{id}/projects/{role_id}":{"delete":{"operationId":"deleteCompanyCrmOrganizationProject","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"role_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"removed":{"type":"boolean"}},"required":["removed"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Remove organization project role","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/organizations/{id}/resolution":{"delete":{"operationId":"deleteResolutionCompanyCrmOrganization","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"resolution":{"additionalProperties":false,"properties":{"review_token":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["review_token"],"type":"object"}},"required":["resolution"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"website":{"type":["string","null"]}},"required":["id","company_id","name","website","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope or tenant denied"},"404":{"description":"Scoped identity not found"},"409":{"description":"Stale preview or incompatible resolution state"},"422":{"description":"Validation failed"}},"summary":"Undo duplicate resolution","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false},"put":{"operationId":"resolutionCompanyCrmOrganization","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"resolution":{"additionalProperties":false,"properties":{"canonical_id":{"minimum":1,"type":"integer"},"review_token":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["canonical_id","review_token"],"type":"object"}},"required":["resolution"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"website":{"type":["string","null"]}},"required":["id","company_id","name","website","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope or tenant denied"},"404":{"description":"Scoped identity not found"},"409":{"description":"Stale preview or incompatible resolution state"},"422":{"description":"Validation failed"}},"summary":"Resolve duplicate to canonical identity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/organizations/{id}/resolution_preview":{"get":{"operationId":"listCompanyCrmOrganizationResolutionPreview","parameters":[{"in":"query","name":"canonical_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"canonical":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"website":{"type":["string","null"]}},"required":["id","company_id","name","website","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"},"canonical_links":{"additionalProperties":false,"properties":{"affiliations":{"minimum":0,"type":"integer"},"aliases":{"minimum":0,"type":"integer"},"visible_project_roles":{"minimum":0,"type":"integer"}},"required":["affiliations","visible_project_roles","aliases"],"type":"object"},"review_token":{"pattern":"^[a-f0-9]{64}$","type":"string"},"source":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"website":{"type":["string","null"]}},"required":["id","company_id","name","website","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"},"source_links":{"additionalProperties":false,"properties":{"affiliations":{"minimum":0,"type":"integer"},"aliases":{"minimum":0,"type":"integer"},"visible_project_roles":{"minimum":0,"type":"integer"}},"required":["affiliations","visible_project_roles","aliases"],"type":"object"}},"required":["source","canonical","source_links","canonical_links","review_token"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope or tenant denied"},"404":{"description":"Scoped identity not found"},"409":{"description":"Stale preview or incompatible resolution state"},"422":{"description":"Validation failed"}},"summary":"Preview reversible duplicate resolution","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/organizations/{id}/timeline":{"get":{"operationId":"listCompanyCrmOrganizationTimeline","parameters":[{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmTimelineItem"},"type":"array"}}},"description":"Newest first; Total, Per-Page and Link headers exclude hidden projects"},"401":{"description":"Authentication required"},"403":{"description":"Company CRM view denied"},"404":{"description":"Organization not found in company"}},"summary":"List explicit organization affiliations, visible project roles and identity events","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/people":{"get":{"operationId":"listCompanyCrmPeople","parameters":[{"in":"query","name":"page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","first_name","last_name","email","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List CRM people","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"operationId":"createCompanyCrmPeople","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"person":{"properties":{"email":{"type":["string","null"]},"first_name":{"type":"string"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name"],"type":"object"}},"required":["person"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","first_name","last_name","email","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Create CRM person","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/people/{id}":{"get":{"operationId":"getCompanyCrmPeople","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","first_name","last_name","email","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Get CRM person","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"patch":{"operationId":"updateCompanyCrmPeople","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"person":{"properties":{"email":{"type":["string","null"]},"first_name":{"type":"string"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["first_name","last_name","email","phone","notes"],"type":"object"}},"required":["person"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","first_name","last_name","email","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Update CRM person","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/people/{id}/affiliations":{"get":{"operationId":"listCompanyCrmPeopleAffiliations","parameters":[{"in":"query","name":"page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"minimum":1,"type":"integer"},"organization_id":{"minimum":1,"type":"integer"},"organization_name":{"type":"string"},"person_id":{"minimum":1,"type":"integer"},"role":{"type":"string"}},"required":["id","organization_id","role"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List person affiliations","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"operationId":"createCompanyCrmPeopleAffiliation","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"affiliation":{"properties":{"organization_id":{"minimum":1,"type":"integer"},"role":{"type":"string"}},"required":["organization_id","role"],"type":"object"}},"required":["affiliation"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"minimum":1,"type":"integer"},"organization_id":{"minimum":1,"type":"integer"},"organization_name":{"type":"string"},"person_id":{"minimum":1,"type":"integer"},"role":{"type":"string"}},"required":["id","organization_id","role"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Add person affiliation","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/people/{id}/affiliations/{affiliation_id}":{"delete":{"operationId":"deleteCompanyCrmPeopleAffiliation","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"affiliation_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"removed":{"type":"boolean"}},"required":["removed"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Remove person affiliation","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false},"patch":{"operationId":"updateCompanyCrmPeopleAffiliation","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"affiliation_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"affiliation":{"properties":{"role":{"type":"string"}},"required":["role"],"type":"object"}},"required":["affiliation"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"minimum":1,"type":"integer"},"organization_id":{"minimum":1,"type":"integer"},"organization_name":{"type":"string"},"person_id":{"minimum":1,"type":"integer"},"role":{"type":"string"}},"required":["id","organization_id","role"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Update person affiliation","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/people/{id}/aliases":{"get":{"operationId":"listCompanyCrmPeopleAliases","parameters":[{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","first_name","last_name","email","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope or tenant denied"},"404":{"description":"Scoped identity not found"},"409":{"description":"Stale preview or incompatible resolution state"},"422":{"description":"Validation failed"}},"summary":"List identities resolved to this canonical identity","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/people/{id}/communication_preferences":{"get":{"description":"Requires company CRM view and crm:read token scope. Recorded permission is evidence only, not an authorization to send.","operationId":"listCompanyCrmPeopleCommunicationPreferences","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmPreferenceSummary"}}},"description":"Six effective channel and purpose states"},"401":{"description":"Authentication required"},"403":{"description":"Company CRM view denied"},"404":{"description":"Person not found in company"}},"summary":"Read recorded communication preferences for a person and resolved aliases","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/people/{id}/communication_preferences/events":{"get":{"operationId":"listCompanyCrmPeopleCommunicationPreferencesEvents","parameters":[{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmPreferenceEvent"},"type":"array"}}},"description":"Newest first, with Total, Per-Page and Link headers"},"401":{"description":"Authentication required"},"403":{"description":"Company CRM view denied"},"404":{"description":"Person not found in company"}},"summary":"List append-only communication preference evidence across a person and resolved aliases","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"description":"Requires company CRM edit and crm:write token scope. Permitted evidence must match the current primary email or phone; no message is sent.","operationId":"createCompanyCrmPeopleCommunicationPreferencesEvent","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmPreferenceEventCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmPreferenceEvent"}}},"description":"Recorded event"},"400":{"description":"Invalid contact point or future observation"},"401":{"description":"Authentication required"},"403":{"description":"Company CRM edit denied"},"404":{"description":"Person not found in company"},"422":{"description":"Validation failed"}},"summary":"Record an immutable communication preference event on a person or resolved alias","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/people/{id}/contacts":{"get":{"operationId":"listCompanyCrmPeopleContacts","parameters":[{"in":"query","name":"page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"organization":{"type":["string","null"]},"project_id":{"type":["integer","null"]},"project_name":{"type":["string","null"]},"role":{"type":["string","null"]}},"required":["id","project_id","project_name","first_name","last_name","organization","role"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List visible scoped contacts for person","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/people/{id}/duplicate_candidates":{"get":{"operationId":"listCompanyCrmPeopleDuplicateCandidates","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","first_name","last_name","email","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"},{"properties":{"match_reasons":{"items":{"type":"string"},"type":"array"}},"required":["match_reasons"],"type":"object"}]},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope or tenant denied"},"404":{"description":"Scoped identity not found"},"409":{"description":"Stale preview or incompatible resolution state"},"422":{"description":"Validation failed"}},"summary":"Suggest possible duplicate identities; review required","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/people/{id}/history":{"get":{"operationId":"listCompanyCrmPeopleHistory","parameters":[{"in":"query","name":"page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor_id":{"minimum":1,"type":"integer"},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"item_id":{"minimum":1,"type":"integer"},"item_type":{"enum":["CrmPerson"]},"project_id":{"type":["integer","null"]},"summary":{"type":"string"}},"required":["id","company_id","project_id","actor_id","item_type","item_id","action","summary","created_at"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List person history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/people/{id}/resolution":{"delete":{"operationId":"deleteResolutionCompanyCrmPeople","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"resolution":{"additionalProperties":false,"properties":{"review_token":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["review_token"],"type":"object"}},"required":["resolution"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","first_name","last_name","email","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope or tenant denied"},"404":{"description":"Scoped identity not found"},"409":{"description":"Stale preview or incompatible resolution state"},"422":{"description":"Validation failed"}},"summary":"Undo duplicate resolution","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false},"put":{"operationId":"resolutionCompanyCrmPeople","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"resolution":{"additionalProperties":false,"properties":{"canonical_id":{"minimum":1,"type":"integer"},"review_token":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["canonical_id","review_token"],"type":"object"}},"required":["resolution"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","first_name","last_name","email","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope or tenant denied"},"404":{"description":"Scoped identity not found"},"409":{"description":"Stale preview or incompatible resolution state"},"422":{"description":"Validation failed"}},"summary":"Resolve duplicate to canonical identity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/people/{id}/resolution_preview":{"get":{"operationId":"listCompanyCrmPeopleResolutionPreview","parameters":[{"in":"query","name":"canonical_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"canonical":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","first_name","last_name","email","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"},"canonical_links":{"additionalProperties":false,"properties":{"affiliations":{"minimum":0,"type":"integer"},"aliases":{"minimum":0,"type":"integer"},"visible_contacts":{"minimum":0,"type":"integer"}},"required":["affiliations","visible_contacts","aliases"],"type":"object"},"review_token":{"pattern":"^[a-f0-9]{64}$","type":"string"},"source":{"properties":{"canonical_id":{"minimum":1,"type":["integer","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"resolved_at":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","first_name","last_name","email","phone","notes","created_at","updated_at","canonical_id","resolved_at"],"type":"object"},"source_links":{"additionalProperties":false,"properties":{"affiliations":{"minimum":0,"type":"integer"},"aliases":{"minimum":0,"type":"integer"},"visible_contacts":{"minimum":0,"type":"integer"}},"required":["affiliations","visible_contacts","aliases"],"type":"object"}},"required":["source","canonical","source_links","canonical_links","review_token"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope or tenant denied"},"404":{"description":"Scoped identity not found"},"409":{"description":"Stale preview or incompatible resolution state"},"422":{"description":"Validation failed"}},"summary":"Preview reversible duplicate resolution","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/people/{id}/timeline":{"get":{"operationId":"listCompanyCrmPeopleTimeline","parameters":[{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmTimelineItem"},"type":"array"}}},"description":"Newest first; Total, Per-Page and Link headers exclude hidden projects"},"401":{"description":"Authentication required"},"403":{"description":"Company CRM view denied"},"404":{"description":"Person not found in company"}},"summary":"List the permission-scoped relationship timeline for a person and resolved aliases","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/crm/projects":{"get":{"operationId":"listCompanyCrmProjects","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator, token scope, or destination CRM permission denied"},"404":{"description":"Scoped intake or project record not found"},"409":{"description":"Linked aggregate cannot be associated independently"}},"summary":"List eligible active destination projects","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/crm/summary":{"get":{"description":"Company administrators or explicit company CRM grantees only. Read-only grants allow view; standard grants allow view/create/edit. Company intake lists remain preproject records only. Project permissions are separate.","operationId":"listCompanyCrmSummary","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"contacts":{"type":"integer"},"currency":{"const":"USD"},"openAmount":{"type":"string"},"openOpportunities":{"type":"integer"},"overdueActivities":{"type":"integer"},"weightedAmount":{"type":"string"},"wonOpportunities":{"type":"integer"}},"required":["contacts","openOpportunities","wonOpportunities","overdueActivities","openAmount","weightedAmount","currency"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"CRM totals and exact USD pipeline forecast","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/departments":{"get":{"description":"Requires admin:read. The company path must match the authenticated company; company identity comes from the token. Readable by an authenticated active company member with the token scope. Returns a flat array, ordered by position and name. Includes inactive rows. Catalog presence does not grant authorization.","operationId":"listCompanyDepartments","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Values above 1000 are clamped by the REST handler.","in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Trimmed, case-insensitive substring match on name; blank means no filter.","in":"query","name":"search","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/company_admin_Department"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination links","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size","schema":{"type":"string"}},"Total":{"description":"Total matching rows","schema":{"type":"string"}}}},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"List departments","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":true},"post":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company create permission, currently restricted to company administrators and subject to workspace restrictions.  Catalog presence does not grant authorization.","operationId":"createCompanyDepartment","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_DepartmentCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_Department"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Create departments","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/departments/{id}":{"delete":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company delete permission, currently restricted to company administrators and subject to workspace restrictions. Permanently deletes the record. Catalog presence does not grant authorization.","operationId":"deleteCompanyDepartment","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted; no response body"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Delete departments","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false},"get":{"description":"Requires admin:read. The company path must match the authenticated company; company identity comes from the token. Readable by an authenticated active company member with the token scope.  Catalog presence does not grant authorization.","operationId":"getCompanyDepartment","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_Department"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Get departments","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false},"patch":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company edit permission, currently restricted to company administrators and subject to workspace restrictions.  Catalog presence does not grant authorization.","operationId":"updateCompanyDepartment","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_DepartmentUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_Department"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Update departments","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/email_communications":{"post":{"description":"Create a communication from the company-level inbox. Every communication belongs to a project: topic_type must be `project` (the default) and topic_id the project id. The write is the same as POST /rest/v1.0/project/{project_id}/email_communications (email create permission, tool enablement, recipient tenancy on that project).","operationId":"createCompanyEmailCommunication","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"topic_type","required":true,"schema":{"default":"project","enum":["project"],"type":"string"}},{"description":"The project id.","in":"query","name":"topic_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"communication":{"properties":{"private":{"type":"boolean"},"subject":{"type":"string"}},"type":"object"},"email":{"properties":{"bcc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"body":{"type":"string"},"cc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"required":["communication","email"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"emails":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bcc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"body":{"type":"string"},"cc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"communication_id":{"type":"integer"},"distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"email_sent_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"sanitized_body_html":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"private":{"type":"boolean"},"subject":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Create Company-level Email Communication","tags":["emails"],"x-os-idempotent":true,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/email_communications/emails":{"get":{"operationId":"listCompanyEmailCommunicationsEmails","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"topic_type","required":true,"schema":{"enum":["rfi","submittal_log","submittal_package","project","task","checklist","purchase_order_contract","work_order_contract","prime_contract","billings_requisition","payment_application","daily_log_header","generic_tool_item","meeting","form","observation","direct_cost_item","change_event_event","punch_item","incident","request_for_quote"],"type":"string"}},{"in":"query","name":"topic_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"communication_threads":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bcc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"body":{"type":"string"},"cc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"communication_id":{"type":"integer"},"distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"email_sent_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"sanitized_body_html":{"type":"string"},"subject":{"type":"string"}},"type":"object"},"type":"array"},"new_communication_email":{"type":"string"},"total":{"type":"integer"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List of Company-level Emails","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/email_communications/{communication_id}/emails":{"post":{"description":"Reply on a communication from the company-level inbox. The communication is resolved only among those the caller can see (otherwise 404); the reply is written on its project with email create permission. topic_type/topic_id are accepted and ignored.","operationId":"createCompanyEmailCommunicationEmail","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"communication_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"topic_type","required":true,"schema":{"enum":["rfi","submittal_log","submittal_package","project","task","checklist","purchase_order_contract","work_order_contract","prime_contract","billings_requisition","payment_application","daily_log_header","generic_tool_item","meeting","form","observation","direct_cost_item","change_event_event","punch_item","incident","request_for_quote"],"type":"string"}},{"in":"query","name":"topic_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"properties":{"bcc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"body":{"type":"string"},"cc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"required":["email"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"emails":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bcc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"body":{"type":"string"},"cc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"communication_id":{"type":"integer"},"distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"email_sent_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"sanitized_body_html":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"private":{"type":"boolean"},"subject":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Create Company-level Email","tags":["emails"],"x-os-idempotent":true,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/email_communications/{communication_id}/emails/{email_id}/download_attachments":{"get":{"operationId":"listCompanyEmailCommunicationEmailDownloadAttachments","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"communication_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"email_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"download_all_attachments_url":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Download all company-level email attachments","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/email_communications/{id}":{"get":{"operationId":"getCompanyEmailCommunication","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"emails":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bcc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"body":{"type":"string"},"cc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"communication_id":{"type":"integer"},"distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"email_sent_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"sanitized_body_html":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"private":{"type":"boolean"},"subject":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Company-level Email Communication","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false},"patch":{"description":"Set a communication's private flag from the company-level inbox. Resolved among communications the caller can see, then updated on its project with email edit permission.","operationId":"updateCompanyEmailCommunication","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"private":{"type":"boolean"}},"required":["private"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"emails":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bcc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"body":{"type":"string"},"cc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"communication_id":{"type":"integer"},"distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"email_sent_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"sanitized_body_html":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"private":{"type":"boolean"},"subject":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Update a private field in Company-level Email Communication","tags":["emails"],"x-os-idempotent":true,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/email_communications/{id}/export":{"get":{"operationId":"listCompanyEmailCommunicationExport","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"download_url":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Export Company-level Email Communication","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/form_templates":{"get":{"operationId":"listCompanyFormTemplates","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"archived_at":{"format":"date-time","nullable":true,"type":"string"},"assign_to_new_projects":{"type":"boolean"},"attachment":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Company Form Templates","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":true},"post":{"operationId":"createCompanyFormTemplate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"fillable_pdf":{"format":"binary","type":"string"},"form_template":{"properties":{"assign_to_new_projects":{"type":"boolean"},"name":{"type":"string"}},"required":["name","description"],"title":"Form Template","type":"object"}},"required":["form_template","fillable_pdf"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"archived_at":{"format":"date-time","nullable":true,"type":"string"},"assign_to_new_projects":{"type":"boolean"},"attachment":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Company Form Template","tags":["forms"],"x-os-idempotent":true,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/form_templates/{id}":{"delete":{"operationId":"deleteCompanyFormTemplate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Company Form Template","tags":["forms"],"x-os-idempotent":true,"x-os-module":"forms","x-os-paginated":false},"get":{"operationId":"getCompanyFormTemplate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"archived_at":{"format":"date-time","nullable":true,"type":"string"},"assign_to_new_projects":{"type":"boolean"},"attachment":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Company Form Template","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":false},"patch":{"operationId":"updateCompanyFormTemplate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"form_template":{"properties":{"assign_to_new_projects":{"type":"boolean"},"fillable_pdf":{"type":"string"},"name":{"type":"string"}},"title":"Form Template","type":"object"}},"required":["form_template"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"archived_at":{"format":"date-time","nullable":true,"type":"string"},"assign_to_new_projects":{"type":"boolean"},"attachment":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Company Form Template","tags":["forms"],"x-os-idempotent":true,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/form_templates/{id}/document":{"get":{"description":"A scoped API token needs `forms:read`.","operationId":"listCompanyFormTemplateDocument","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"original_id","schema":{"type":"integer"}},{"in":"query","name":"download","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"File download."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Generate form template document","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/generic_tools":{"get":{"operationId":"listCompanyGenericTools","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"abbreviation":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"created_at":{"nullable":true,"type":"string"},"default_distribution_ids":{"items":{"type":"integer"},"type":"array"},"default_due_days":{"nullable":true,"type":"integer"},"fields":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"name":{"type":"string"},"private_by_default":{"type":"boolean"},"statuses":{"items":{"type":"object"},"type":"array"},"title":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","name","active"],"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}}},"summary":"List Correspondence Types","tags":["correspondence"],"x-os-idempotent":false,"x-os-module":"correspondence","x-os-paginated":false},"post":{"operationId":"createCompanyGenericTool","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"abbreviation":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"created_at":{"nullable":true,"type":"string"},"default_distribution_ids":{"items":{"type":"integer"},"type":"array"},"default_due_days":{"nullable":true,"type":"integer"},"fields":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"name":{"type":"string"},"private_by_default":{"type":"boolean"},"statuses":{"items":{"type":"object"},"type":"array"},"title":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","name","active"],"type":"object"}}}}},"summary":"Create Correspondence Type","tags":["correspondence"],"x-os-idempotent":true,"x-os-module":"correspondence","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/generic_tools/{generic_tool_id}":{"get":{"operationId":"getCompanyGenericTool","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"abbreviation":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"created_at":{"nullable":true,"type":"string"},"default_distribution_ids":{"items":{"type":"integer"},"type":"array"},"default_due_days":{"nullable":true,"type":"integer"},"fields":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"name":{"type":"string"},"private_by_default":{"type":"boolean"},"statuses":{"items":{"type":"object"},"type":"array"},"title":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","name","active"],"type":"object"}}}}},"summary":"Show Correspondence Type","tags":["correspondence"],"x-os-idempotent":false,"x-os-module":"correspondence","x-os-paginated":false},"patch":{"operationId":"updateCompanyGenericTool","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"abbreviation":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"created_at":{"nullable":true,"type":"string"},"default_distribution_ids":{"items":{"type":"integer"},"type":"array"},"default_due_days":{"nullable":true,"type":"integer"},"fields":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"name":{"type":"string"},"private_by_default":{"type":"boolean"},"statuses":{"items":{"type":"object"},"type":"array"},"title":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","name","active"],"type":"object"}}}}},"summary":"Update Correspondence Type","tags":["correspondence"],"x-os-idempotent":true,"x-os-module":"correspondence","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/insurance_evidence_inbox":{"get":{"description":"Live company-admin authority and admin:read token scope are required. Replaced evidence is excluded from every filter and retained in policy history. Unreviewed, unassigned and mine exclude evidence with a recorded review. Unassigned has no open policy follow-up; mine has an open follow-up assigned to the caller. All returns current evidence regardless of review state. Oldest received first, ID tiebreaker. Only metadata is returned: view/review bytes through the existing policy evidence workflow. Acceptance is not coverage verification or payment release.","operationId":"listCompanyInsuranceEvidenceInbox","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"filter","schema":{"default":"unreviewed","enum":["unreviewed","unassigned","mine","all"],"type":"string"}},{"in":"query","name":"kind","schema":{"default":"all","enum":["all","certificate","policy","endorsement"],"type":"string"}},{"in":"query","name":"page","schema":{"default":1,"maximum":100000,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/company_admin_EvidenceInboxItem"},"type":"array"}}},"description":"Metadata page; Total, Per-Page and Link pagination headers. Cache-Control private, no-store."},"401":{"description":"Authentication required"},"403":{"description":"Current company-admin authority required"},"404":{"description":"Wrong company"},"422":{"description":"Invalid filter or pagination"}},"summary":"Read current evidence awaiting review and route policy follow-ups","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/insurance_followups":{"get":{"description":"Overdue means before the current UTC day; due soon includes today through 30 days. Completed items are excluded from overdue/due-soon/mine. Each response page contains at most 25 items. Owners without live authority remain visible for reassignment. No notifications are sent.","operationId":"listCompanyInsuranceFollowups","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"filter","schema":{"default":"open","enum":["open","overdue","due_soon","mine","completed","all"],"type":"string"}},{"in":"query","name":"page","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"enum":[25],"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/company_admin_InsuranceFollowUp"},"type":"array"}}},"description":"Follow-ups; Total, Per-Page and Link pagination headers"},"401":{"description":"Authentication required"},"403":{"description":"Current company admin required"},"404":{"description":"Scoped policy, owner or renewal missing"},"409":{"description":"Stale version, conflicting retry or invalid transition"},"422":{"description":"Invalid input"}},"summary":"Company-scoped renewal follow-up queue","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/insurance_policies":{"get":{"description":"Requires admin:read. Company path must match the authenticated tenant. Reads are available to active authenticated company members with the required token scope; no project-level membership gate. Flat array ordered by expiration date then ID. Includes policies associated with historical inactive projects/vendors. No status or search filter. Catalog presence does not grant access.","operationId":"listCompanyInsurancePolicies","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion. Authenticated company is authoritative; this cannot select a different company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Handler clamps values above 1000.","in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Only the first positive integer value is used. Invalid values are ignored. Filters narrow the company register; they do not imply project membership.","in":"query","name":"filters[project_id]","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Only the first positive integer value is used. Invalid values are ignored. Filters narrow the company register; they do not imply project membership.","in":"query","name":"filters[vendor_id]","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/company_admin_InsurancePolicy"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination Link","schema":{"type":"string"}},"Per-Page":{"description":"Pagination Per-Page","schema":{"type":"string"}},"Total":{"description":"Pagination Total","schema":{"type":"string"}}}},"400":{"description":"Invalid reference, date interval or retained membership references"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or current company authority denied"},"404":{"description":"Company or resource not found within the authenticated company"},"422":{"description":"Body validation failed"}},"summary":"List company insurance policies","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":true},"post":{"description":"Requires admin:write. Company path must match the authenticated tenant. Writes require current company administrator authority; project-template admin permission alone is insufficient. Transactional services recheck authority. Project/vendor references must belong to this company; historical inactive references are permitted. Effective date cannot follow expiration date (400). Date-only inputs must be real calendar dates. Status in the response is pending without expiration, expired before the current instant, expiring within 30 days, otherwise active. JSON metadata only; no certificate upload. Catalog presence does not grant access.","operationId":"createCompanyInsurancePolicy","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion. Authenticated company is authoritative; this cannot select a different company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_InsuranceCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_InsurancePolicy"}}},"description":"Success"},"400":{"description":"Invalid reference, date interval or retained membership references"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or current company authority denied"},"404":{"description":"Company or resource not found within the authenticated company"},"422":{"description":"Body validation failed"}},"summary":"Create company insurance policy","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/insurance_policies/{id}":{"delete":{"description":"Requires admin:write. Company path must match the authenticated tenant. Writes require current company administrator authority; project-template admin permission alone is insufficient. Transactional services recheck authority. Permanently deletes the policy metadata record. Catalog presence does not grant access.","operationId":"deleteCompanyInsurancePolicy","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion. Authenticated company is authoritative; this cannot select a different company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted; empty response"},"400":{"description":"Invalid reference, date interval or retained membership references"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or current company authority denied"},"404":{"description":"Company or resource not found within the authenticated company"},"422":{"description":"Body validation failed"}},"summary":"Delete company insurance policy","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false},"get":{"description":"Requires admin:read. Company path must match the authenticated tenant. Reads are available to active authenticated company members with the required token scope; no project-level membership gate. Response status is computed from expiration at read time, regardless of stored status. Catalog presence does not grant access.","operationId":"getCompanyInsurancePolicy","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion. Authenticated company is authoritative; this cannot select a different company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_InsurancePolicy"}}},"description":"Success"},"400":{"description":"Invalid reference, date interval or retained membership references"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or current company authority denied"},"404":{"description":"Company or resource not found within the authenticated company"},"422":{"description":"Body validation failed"}},"summary":"Read company insurance policy","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false},"patch":{"description":"Requires admin:write. Company path must match the authenticated tenant. Writes require current company administrator authority; project-template admin permission alone is insufficient. Transactional services recheck authority. Omitted nullable fields retain their value; explicit null clears them. Remaining project/vendor references must belong to the company. Effective date cannot follow expiration date (400), including when only one date is changed. Response status is freshly derived even if an explicit stored status is supplied. Catalog presence does not grant access.","operationId":"updateCompanyInsurancePolicy","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion. Authenticated company is authoritative; this cannot select a different company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_InsuranceUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_InsurancePolicy"}}},"description":"Success"},"400":{"description":"Invalid reference, date interval or retained membership references"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or current company authority denied"},"404":{"description":"Company or resource not found within the authenticated company"},"422":{"description":"Body validation failed"}},"summary":"Edit company insurance policy","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/insurance_policies/{id}/evidence":{"get":{"operationId":"listCompanyInsurancePolicyEvidence","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_InsuranceEvidenceDetail"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Current company admin authority and source scopes required"},"404":{"description":"Scoped resource not found"},"409":{"description":"Stale version, conflicting retry, retained history or invalid transition"},"422":{"description":"Invalid fields or unsupported evidence bytes"}},"summary":"Read policy evidence and immutable history","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false},"post":{"operationId":"evidenceCompanyInsurancePolicy","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/company_admin_Receipt"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_InsuranceEvidenceDetail"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Current company admin authority and source scopes required"},"404":{"description":"Scoped resource not found"},"409":{"description":"Stale version, conflicting retry, retained history or invalid transition"},"422":{"description":"Invalid fields or unsupported evidence bytes"}},"summary":"Receive an immutable PDF or scan; receipt does not verify coverage","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/insurance_policies/{id}/evidence/{evidence_id}/content":{"get":{"operationId":"listCompanyInsurancePolicyEvidenceContent","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"evidence_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Current company admin authority and source scopes required"},"404":{"description":"Scoped resource not found"},"409":{"description":"Stale version, conflicting retry, retained history or invalid transition"},"422":{"description":"Invalid fields or unsupported evidence bytes"}},"summary":"Read authorized evidence bytes, validating received SHA-256","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/insurance_policies/{id}/follow_up":{"get":{"operationId":"listCompanyInsurancePolicyFollowUp","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/company_admin_InsuranceFollowUp"},{"enum":[null],"nullable":true,"type":"object"}]}}},"description":"Current follow-up or null if none has been assigned"},"401":{"description":"Authentication required"},"403":{"description":"Current company admin required"},"404":{"description":"Scoped policy, owner or renewal missing"},"409":{"description":"Stale version, conflicting retry or invalid transition"},"422":{"description":"Invalid input"}},"summary":"Read policy follow-up","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false},"post":{"description":"Owner must currently have company admin authority. Completion is an administrative outcome only. Optional renewal must be the actual child of this policy. Reopen clears current completion/link and retains prior outcome in policy events. Commands require current policy version and a company-unique UUID; identical retries have no new effect.","operationId":"followUpCompanyInsurancePolicy","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_InsuranceFollowUpCommand"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/company_admin_InsuranceFollowUp"},{"enum":[null],"nullable":true,"type":"object"}]}}},"description":"Current follow-up or null if none has been assigned"},"401":{"description":"Authentication required"},"403":{"description":"Current company admin required"},"404":{"description":"Scoped policy, owner or renewal missing"},"409":{"description":"Stale version, conflicting retry or invalid transition"},"422":{"description":"Invalid input"}},"summary":"Create, update, complete or reopen the single policy follow-up","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/insurance_policies/{id}/renewals":{"post":{"operationId":"createCompanyInsurancePolicyRenewal","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_Renewal"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_InsuranceEvidenceDetail"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Current company admin authority and source scopes required"},"404":{"description":"Scoped resource not found"},"409":{"description":"Stale version, conflicting retry, retained history or invalid transition"},"422":{"description":"Invalid fields or unsupported evidence bytes"}},"summary":"Create a linked renewal, preserving prior files and reviews","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/insurance_policies/{id}/reviews":{"post":{"description":"Review requires admin:read for the referenced source as well as admin:write. Acceptance records a document review, not verified coverage. Only an accepted review may be revoked. Every command requires current version and a company-unique request key; identical retries have no additional effect.","operationId":"createCompanyInsurancePolicyReview","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_Review"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_InsuranceEvidenceDetail"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Current company admin authority and source scopes required"},"404":{"description":"Scoped resource not found"},"409":{"description":"Stale version, conflicting retry, retained history or invalid transition"},"422":{"description":"Invalid fields or unsupported evidence bytes"}},"summary":"Record evidence acceptance, rejection or revocation with a reason","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/invitations":{"get":{"description":"A scoped API token needs `identity:read`.","operationId":"listCompanyInvitations","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"JSON request body.","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"array"}}},"description":"Created."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"List invitations","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false},"post":{"operationId":"createCompanyInvitation","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create invitation","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/invitations/{id}":{"delete":{"operationId":"deleteCompanyInvitation","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete invitation","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/managed_equipment":{"get":{"operationId":"listCompanyManagedEquipment","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/equipment_Equipment"},"type":"array"}}}}},"summary":"List equipment register","tags":["equipment"],"x-os-idempotent":false,"x-os-module":"equipment","x-os-paginated":false},"post":{"operationId":"managedEquipmentCompany","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"managed_equipment":{"properties":{"name":{"type":"string"},"ownership":{"type":"string"},"status":{"type":"string"}},"required":["name"],"type":"object"}},"required":["managed_equipment"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/equipment_EquipmentShow"}}}}},"summary":"Create equipment","tags":["equipment"],"x-os-idempotent":true,"x-os-module":"equipment","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/managed_equipment/filter_options/category":{"get":{"description":"Requires equipment:read. Returns distinct nonempty categories in ascending order from active equipment in the company register. Each option uses the category string for both key and value.","operationId":"listCompanyManagedEquipmentFilterOptionsCategory","parameters":[{"description":"Company ID for the authenticated workspace.","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/equipment_FilterOption"},"type":"array"}}},"description":"Category options."},"401":{"description":"Authentication required."},"403":{"description":"Equipment read access is required."},"404":{"description":"The company could not be found."}},"summary":"Category filter options","tags":["equipment"],"x-os-idempotent":false,"x-os-module":"equipment","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/managed_equipment/filter_options/status":{"get":{"operationId":"listCompanyManagedEquipmentFilterOptionsStatus","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/equipment_FilterOption"},"type":"array"}}}}},"summary":"Status filter options","tags":["equipment"],"x-os-idempotent":false,"x-os-module":"equipment","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/managed_equipment/{id}":{"delete":{"description":"Requires equipment:write and an active company administrator. Soft-deletes active equipment so it can be restored from the company's recycle bin.","operationId":"deleteCompanyManagedEquipment","parameters":[{"description":"Company ID for the authenticated workspace.","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Managed equipment ID.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Equipment moved to the recycle bin."},"401":{"description":"Authentication required."},"403":{"description":"An active company administrator and equipment write access are required."},"404":{"description":"The company or active equipment could not be found."}},"summary":"Move equipment to the recycle bin","tags":["equipment"],"x-os-idempotent":true,"x-os-module":"equipment","x-os-paginated":false},"get":{"operationId":"getCompanyManagedEquipment","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/equipment_EquipmentShow"}}}}},"summary":"Show equipment","tags":["equipment"],"x-os-idempotent":false,"x-os-module":"equipment","x-os-paginated":false},"patch":{"operationId":"updateCompanyManagedEquipment","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/equipment_EquipmentShow"}}}}},"summary":"Update equipment","tags":["equipment"],"x-os-idempotent":true,"x-os-module":"equipment","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/managed_equipment/{id}/assignments":{"get":{"operationId":"listCompanyManagedEquipmentAssignments","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/equipment_Assignment"},"type":"array"}}}}},"summary":"List assignments","tags":["equipment"],"x-os-idempotent":false,"x-os-module":"equipment","x-os-paginated":false},"post":{"operationId":"createCompanyManagedEquipmentAssignment","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/equipment_Assignment"}}}}},"summary":"Create assignment","tags":["equipment"],"x-os-idempotent":true,"x-os-module":"equipment","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/managed_equipment/{id}/assignments/{assignment_id}":{"patch":{"description":"Requires equipment:write and an active company administrator. The destination project must belong to the company and have the equipment tool enabled. Completing the current active assignment clears the equipment's current project and location and changes in_use to available. Activating a completed assignment or moving the current active assignment updates the dispatch and preserves under_maintenance status.","operationId":"updateCompanyManagedEquipmentAssignment","parameters":[{"description":"Company ID for the authenticated workspace.","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Managed equipment ID.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Assignment ID on the managed equipment.","in":"path","name":"assignment_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"equipment_assignment":{"properties":{"end_date":{"description":"Must be on or after the assignment start date. Use null to clear it.","format":"date","nullable":true,"pattern":"^(?!0000-)[0-9]{4}-[0-9]{2}-[0-9]{2}$","type":"string"},"notes":{"nullable":true,"type":"string"},"project_id":{"description":"Destination project ID.","minimum":1,"type":"integer"},"start_date":{"format":"date","pattern":"^(?!0000-)[0-9]{4}-[0-9]{2}-[0-9]{2}$","type":"string"},"status":{"enum":["active","completed"],"type":"string"}},"type":"object"}},"required":["equipment_assignment"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/equipment_Assignment"}}},"description":"Updated assignment."},"400":{"description":"Invalid JSON, reference, or date range."},"401":{"description":"Authentication required."},"403":{"description":"The write is forbidden or the project's equipment tool is disabled."},"404":{"description":"The company, active equipment, or assignment could not be found."},"409":{"description":"Another active assignment shares the current project. Set the equipment's current project explicitly before changing this assignment."},"422":{"description":"Invalid assignment update fields."}},"summary":"Update an equipment assignment","tags":["equipment"],"x-os-idempotent":true,"x-os-module":"equipment","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/managed_equipment/{id}/inspections":{"get":{"operationId":"listCompanyManagedEquipmentInspections","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/equipment_Inspection"},"type":"array"}}}}},"summary":"List inspection records","tags":["equipment"],"x-os-idempotent":false,"x-os-module":"equipment","x-os-paginated":false},"post":{"operationId":"createCompanyManagedEquipmentInspection","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"managed_equipment_inspection":{"properties":{"date":{"type":"string"},"inspector":{"type":"string"},"notes":{"type":"string"},"result":{"enum":["pass","fail","conditional"],"type":"string"}},"required":["date"],"type":"object"}},"required":["managed_equipment_inspection"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/equipment_Inspection"}}}}},"summary":"Create inspection record","tags":["equipment"],"x-os-idempotent":true,"x-os-module":"equipment","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/managed_equipment/{id}/inspections/{inspection_id}":{"delete":{"operationId":"deleteCompanyManagedEquipmentInspection","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"inspection_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{}},"summary":"Delete inspection record","tags":["equipment"],"x-os-idempotent":true,"x-os-module":"equipment","x-os-paginated":false},"get":{"operationId":"getCompanyManagedEquipmentInspection","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"inspection_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/equipment_Inspection"}}}}},"summary":"Show inspection record","tags":["equipment"],"x-os-idempotent":false,"x-os-module":"equipment","x-os-paginated":false},"patch":{"operationId":"updateCompanyManagedEquipmentInspection","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"inspection_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/equipment_Inspection"}}}}},"summary":"Update inspection record","tags":["equipment"],"x-os-idempotent":true,"x-os-module":"equipment","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/managed_equipment/{id}/maintenance_logs":{"get":{"operationId":"listCompanyManagedEquipmentMaintenanceLogs","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/equipment_MaintenanceLog"},"type":"array"}}}}},"summary":"List maintenance logs","tags":["equipment"],"x-os-idempotent":false,"x-os-module":"equipment","x-os-paginated":false},"post":{"operationId":"createCompanyManagedEquipmentMaintenanceLog","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/equipment_MaintenanceLog"}}}}},"summary":"Create maintenance log","tags":["equipment"],"x-os-idempotent":true,"x-os-module":"equipment","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/managed_equipment/{id}/maintenance_logs/{maintenance_id}":{"delete":{"description":"Requires equipment:write and an active company administrator. Soft-deletes the active maintenance log on the specified equipment.","operationId":"deleteCompanyManagedEquipmentMaintenanceLog","parameters":[{"description":"Company ID for the authenticated workspace.","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Managed equipment ID.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Maintenance log ID on the managed equipment.","in":"path","name":"maintenance_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Maintenance log deleted."},"401":{"description":"Authentication required."},"403":{"description":"An active company administrator and equipment write access are required."},"404":{"description":"The company, equipment, or active maintenance log could not be found."}},"summary":"Delete an equipment maintenance log","tags":["equipment"],"x-os-idempotent":true,"x-os-module":"equipment","x-os-paginated":false},"get":{"description":"Requires equipment:read. Returns an active maintenance log on the specified active equipment in the authenticated company.","operationId":"getCompanyManagedEquipmentMaintenanceLog","parameters":[{"description":"Company ID for the authenticated workspace.","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Managed equipment ID.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Maintenance log ID on the managed equipment.","in":"path","name":"maintenance_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/equipment_MaintenanceLog"}}},"description":"Maintenance log."},"401":{"description":"Authentication required."},"403":{"description":"Equipment read access is required."},"404":{"description":"The company, equipment, or active maintenance log could not be found."}},"summary":"Show an equipment maintenance log","tags":["equipment"],"x-os-idempotent":false,"x-os-module":"equipment","x-os-paginated":false},"patch":{"description":"Requires equipment:write and an active company administrator. Updates an existing active maintenance log on the specified equipment. Omitted fields keep their current values.","operationId":"updateCompanyManagedEquipmentMaintenanceLog","parameters":[{"description":"Company ID for the authenticated workspace.","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Managed equipment ID.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Maintenance log ID on the managed equipment.","in":"path","name":"maintenance_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"managed_equipment_maintenance_log":{"properties":{"cost":{"nullable":true,"type":"number"},"date":{"format":"date","pattern":"^(?!0000-)[0-9]{4}-[0-9]{2}-[0-9]{2}$","type":"string"},"description":{"nullable":true,"type":"string"},"hours_at_service":{"nullable":true,"type":"integer"},"next_service_date":{"description":"Must be on or after the service date. Use null to clear it.","format":"date","nullable":true,"pattern":"^(?!0000-)[0-9]{4}-[0-9]{2}-[0-9]{2}$","type":"string"},"notes":{"nullable":true,"type":"string"},"performed_by":{"nullable":true,"type":"string"},"type":{"enum":["routine","repair","inspection"],"type":"string"}},"type":"object"}},"required":["managed_equipment_maintenance_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/equipment_MaintenanceLog"}}},"description":"Updated maintenance log."},"400":{"description":"Invalid JSON or date range."},"401":{"description":"Authentication required."},"403":{"description":"An active company administrator and equipment write access are required."},"404":{"description":"The company, equipment, or active maintenance log could not be found."},"422":{"description":"Invalid maintenance log update fields."}},"summary":"Update an equipment maintenance log","tags":["equipment"],"x-os-idempotent":true,"x-os-module":"equipment","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/managed_equipment/{id}/restore":{"post":{"description":"Requires equipment:write and an active company administrator. Restores an equipment record previously moved to the company's recycle bin and returns the active record.","operationId":"restoreCompanyManagedEquipment","parameters":[{"description":"Company ID for the authenticated workspace.","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Managed equipment ID.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/equipment_EquipmentShow"}}},"description":"Restored equipment."},"401":{"description":"Authentication required."},"403":{"description":"An active company administrator and equipment write access are required."},"404":{"description":"The company or recycled equipment could not be found."}},"summary":"Restore equipment from the recycle bin","tags":["equipment"],"x-os-idempotent":true,"x-os-module":"equipment","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/managed_equipment/{id}/status":{"patch":{"description":"Requires equipment:write and an active company administrator. Sets the status on active equipment. An equivalent managed_equipment.status field is accepted when the top-level status is absent or null.","operationId":"updateCompanyManagedEquipmentStatus","parameters":[{"description":"Company ID for the authenticated workspace.","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Managed equipment ID.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"properties":{"status":{"$ref":"#/components/schemas/equipment_EquipmentStatusInput"}},"required":["status"]},{"properties":{"managed_equipment":{"properties":{"status":{"$ref":"#/components/schemas/equipment_EquipmentStatusInput"}},"required":["status"],"type":"object"},"status":{"enum":[null],"nullable":true,"type":"string"}},"required":["managed_equipment"]}],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/equipment_EquipmentShow"}}},"description":"Equipment with the updated status."},"400":{"description":"Invalid JSON, status, or retained equipment reference."},"401":{"description":"Authentication required."},"403":{"description":"An active company administrator and equipment write access are required."},"404":{"description":"The company or active equipment could not be found."}},"summary":"Set equipment operational status","tags":["equipment"],"x-os-idempotent":true,"x-os-module":"equipment","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/migration_jobs":{"get":{"description":"Requires the company `admin` permission. A scoped API token needs `migration:read`.","operationId":"listCompanyMigrationJobs","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Page number, starting at 1.","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Records per page.","in":"query","name":"per_page","schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"migration_job":{"properties":{"mode":{"default":"dry_run","enum":["dry_run","live"],"type":"string"},"scopes":{"default":["directory","rfis","submittals","punch_list","observations","daily_log","documents","prime_contracts","commitments"],"items":{"enum":["directory","rfis","submittals","punch_list","observations","daily_log","documents","prime_contracts","commitments"],"type":"string"},"minItems":1,"type":"array"},"source_base_url":{"anyOf":[{"enum":["https://api.procore.com","https://sandbox.procore.com"],"type":"string"},{"type":"null"}]},"source_company_id":{"type":["string","null"]},"source_project_id":{"type":["string","null"]},"source_token":{"type":["string","null"]},"target_project_id":{"anyOf":[{"exclusiveMinimum":0,"type":"integer"},{"type":"null"}]},"use_mock":{"default":true,"type":"boolean"}},"type":"object"}},"required":["migration_job"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"description":"Created."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"List migration jobs","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":true},"post":{"operationId":"createCompanyMigrationJob","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create migration job","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/migration_jobs/{id}":{"get":{"description":"A scoped API token needs `migration:read`.","operationId":"getCompanyMigrationJob","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Get migration job","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/migration_jobs/{id}/run":{"post":{"operationId":"runCompanyMigrationJob","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Execute the job","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/oauth_apps":{"get":{"operationId":"listCompanyOauthApps","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/identity_OAuthApp"},"type":"array"}}},"description":"Apps"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"List partner apps registered by your company","tags":["identity"],"x-os-idempotent":false,"x-os-module":"identity","x-os-paginated":false},"post":{"description":"Registers a public OAuth client (authorization code with PKCE S256, no client secret). Apps your company registers can only be authorized by your company's people. A platform review sets the verified badge.","operationId":"createCompanyOauthApp","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. Repeating a request with the same key within 24 hours replays the first 2xx response instead of running the write again.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"oauth_app":{"$ref":"#/components/schemas/identity_OAuthAppInput"}},"required":["oauth_app"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity_OAuthApp"}}},"description":"Registered"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"},"422":{"description":"Invalid fields"}},"summary":"Register a partner app","tags":["identity"],"x-os-idempotent":true,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/oauth_apps/{client_id}":{"delete":{"description":"Revokes every authorization in the same transaction. The client id stays reserved.","operationId":"deleteCompanyOauthApp","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Partner app client id","in":"path","name":"client_id","required":true,"schema":{"pattern":"^app_[A-Za-z0-9_-]{16}$","type":"string"}},{"description":"Optional. Repeating a request with the same key within 24 hours replays the first 2xx response instead of running the write again.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"responses":{"204":{"description":"Retired"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"Retire a partner app","tags":["identity"],"x-os-idempotent":true,"x-os-module":"identity","x-os-paginated":false},"get":{"operationId":"getCompanyOauthApp","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Partner app client id","in":"path","name":"client_id","required":true,"schema":{"pattern":"^app_[A-Za-z0-9_-]{16}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity_OAuthApp"}}},"description":"App"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"Show a partner app","tags":["identity"],"x-os-idempotent":false,"x-os-module":"identity","x-os-paginated":false},"patch":{"description":"Narrowing scopes invalidates authorizations outside the new set at once; widening needs fresh consent. Changing the name, logo, redirect URIs or scopes clears the verified badge. enabled: false pauses every token.","operationId":"updateCompanyOauthApp","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Partner app client id","in":"path","name":"client_id","required":true,"schema":{"pattern":"^app_[A-Za-z0-9_-]{16}$","type":"string"}},{"description":"Optional. Repeating a request with the same key within 24 hours replays the first 2xx response instead of running the write again.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"oauth_app":{"properties":{"description":{"nullable":true,"type":"string"},"enabled":{"type":"boolean"},"homepage_url":{"nullable":true,"type":"string"},"is_agent":{"default":false,"type":"boolean"},"logo_url":{"nullable":true,"type":"string"},"name":{"maxLength":200,"type":"string"},"redirect_uris":{"items":{"description":"Exact https callback URL.","type":"string"},"maxItems":10,"minItems":1,"type":"array"},"scopes":{"description":"API scopes from the documented vocabulary (`<area>:read` or `<area>:write`).","items":{"example":"rfis:read","type":"string"},"maxItems":200,"minItems":1,"type":"array"}},"type":"object"}},"required":["oauth_app"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity_OAuthApp"}}},"description":"Updated"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"},"409":{"description":"Retired"}},"summary":"Update a partner app","tags":["identity"],"x-os-idempotent":true,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/offices":{"get":{"description":"Requires admin:read. The company path must match the authenticated company; company identity comes from the token. Readable by an authenticated active company member with the token scope. Returns a flat array, ordered by main office first, then position and name. Includes inactive rows. Catalog presence does not grant authorization.","operationId":"listCompanyOffices","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Values above 1000 are clamped by the REST handler.","in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Trimmed, case-insensitive substring match on name; blank means no filter.","in":"query","name":"search","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/company_admin_Office"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination links","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size","schema":{"type":"string"}},"Total":{"description":"Total matching rows","schema":{"type":"string"}}}},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"List offices","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":true},"post":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company create permission, currently restricted to company administrators and subject to workspace restrictions. Setting main_office=true clears that flag on other company offices. Catalog presence does not grant authorization.","operationId":"createCompanyOffice","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_OfficeCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_Office"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Create offices","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/offices/{id}":{"delete":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company delete permission, currently restricted to company administrators and subject to workspace restrictions. Permanently deletes the record. Catalog presence does not grant authorization.","operationId":"deleteCompanyOffice","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted; no response body"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Delete offices","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false},"get":{"description":"Requires admin:read. The company path must match the authenticated company; company identity comes from the token. Readable by an authenticated active company member with the token scope.  Catalog presence does not grant authorization.","operationId":"getCompanyOffice","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_Office"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Get offices","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false},"patch":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company edit permission, currently restricted to company administrators and subject to workspace restrictions. Setting main_office=true clears that flag on other company offices. Catalog presence does not grant authorization.","operationId":"updateCompanyOffice","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_OfficeUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_Office"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Update offices","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/owner_reports":{"get":{"description":"Portfolio reports belong to their creator and company administrators; each project inside is read with your access in that project.","operationId":"listCompanyOwnerReports","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/owner_reports_OwnerReport"},"type":"array"}}},"description":"Reports."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"List portfolio owner reports","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false},"post":{"description":"Default period: the previous calendar month. Token scope: owner_reports:write.","operationId":"createCompanyOwnerReport","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"owner_report":{"additionalProperties":false,"description":"Give owner_vendor_id, project_ids, or both (projects filtered to the owner).","properties":{"owner_vendor_id":{"type":"integer"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"project_ids":{"items":{"type":"integer"},"maxItems":200,"type":"array"},"title":{"maxLength":160,"type":"string"}},"type":"object"}},"required":["owner_report"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/owner_reports_OwnerReport"}}},"description":"Created."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."},"422":{"description":"Validation failed."}},"summary":"Create a portfolio owner report","tags":["owner_reports"],"x-os-idempotent":true,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/owner_reports/owners":{"get":{"description":"Owners (vendors on prime contracts) with the projects where you can view Owner Reports.","operationId":"listCompanyOwnerReportsOwners","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/owner_reports_Owner"},"type":"array"}}},"description":"Owners."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"List owners for portfolio reports","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/owner_reports/{id}":{"delete":{"description":"Soft-deletes the report and revokes its share links. Versions are kept.","operationId":"deleteCompanyOwnerReport","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Delete an owner report","tags":["owner_reports"],"x-os-idempotent":true,"x-os-module":"owner_reports","x-os-paginated":false},"get":{"operationId":"getCompanyOwnerReport","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/owner_reports_OwnerReport"}}},"description":"Report."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Show an owner report","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false},"patch":{"description":"Edit the narrative, section commentary, risks, sections, period and photo selection. Published versions are never changed.","operationId":"updateCompanyOwnerReport","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"owner_report":{"additionalProperties":false,"properties":{"content":{"$ref":"#/components/schemas/owner_reports_ReportContent"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"photo_ids":{"items":{"type":"integer"},"maxItems":12,"type":"array"},"sections":{"items":{"enum":["executive_summary","budget_gmp","contingency_allowances","billing","change_orders","schedule","lookahead","rfis_submittals","safety","quality","photos","risks","compliance"],"type":"string"},"type":"array"},"title":{"maxLength":160,"type":"string"}},"type":"object"}},"required":["owner_report"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/owner_reports_OwnerReport"}}},"description":"Updated."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."},"422":{"description":"Validation failed."}},"summary":"Update an owner report","tags":["owner_reports"],"x-os-idempotent":true,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/owner_reports/{id}/pdf":{"get":{"description":"Renders the live report as a branded PDF without publishing.","operationId":"listCompanyOwnerReportPdf","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"PDF file."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Download a draft PDF","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/owner_reports/{id}/preview":{"get":{"description":"Assembles the report now from live project data with your access. Nothing is stored.","operationId":"listCompanyOwnerReportPreview","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"document":{"$ref":"#/components/schemas/owner_reports_ReportDocument"},"sources":{"items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"Document."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Preview the live report","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/owner_reports/{id}/share_links":{"get":{"operationId":"listCompanyOwnerReportShareLinks","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/owner_reports_ShareLink"},"type":"array"}}},"description":"Links (tokens are never listed)."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"List share links","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false},"post":{"description":"A read-only, expiring (max 90 days), revocable link to one published version, opened without a sign-in at /owner-report/{token}. Every open is logged. The token is returned once. Optionally emails the link.","operationId":"createCompanyOwnerReportShareLink","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"share_link":{"additionalProperties":false,"properties":{"allow_pdf":{"default":true,"type":"boolean"},"expires_in_days":{"default":30,"maximum":90,"minimum":1,"type":"integer"},"recipient_email":{"format":"email","type":"string"},"recipient_name":{"maxLength":120,"type":"string"},"send_email":{"description":"Email the link to recipient_email.","type":"boolean"},"version_id":{"type":"integer"}},"required":["version_id"],"type":"object"}},"required":["share_link"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/owner_reports_ShareLink"}}},"description":"Created."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."},"422":{"description":"Validation failed or the version is not a published one."}},"summary":"Create an owner share link","tags":["owner_reports"],"x-os-idempotent":true,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/owner_reports/{id}/share_links/{link_id}":{"delete":{"description":"The link answers 410 from now on. Optional JSON body with a reason string.","operationId":"deleteCompanyOwnerReportShareLink","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"link_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/owner_reports_ShareLink"}}},"description":"Revoked."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Revoke a share link","tags":["owner_reports"],"x-os-idempotent":true,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/owner_reports/{id}/share_links/{link_id}/views":{"get":{"operationId":"listCompanyOwnerReportShareLinkViews","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"link_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/owner_reports_LinkView"},"type":"array"}}},"description":"Opens, newest first."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Share link access log","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/owner_reports/{id}/versions":{"get":{"description":"Published versions and scheduled deliveries, newest first.","operationId":"listCompanyOwnerReportVersions","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/owner_reports_OwnerReportVersion"},"type":"array"}}},"description":"Versions."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"List versions","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false},"post":{"description":"Assembles the report with your access and freezes it (JSON, branded PDF and photo bytes, PDF SHA-256). Versions are immutable.","operationId":"createCompanyOwnerReportVersion","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/owner_reports_OwnerReportVersion"}}},"description":"Published."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Publish a version","tags":["owner_reports"],"x-os-idempotent":true,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/owner_reports/{id}/versions/{version_id}":{"get":{"description":"Requires view on Owner Reports and on every source tool the version contains.","operationId":"getCompanyOwnerReportVersion","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"version_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/owner_reports_OwnerReportVersion"},{"properties":{"document":{"$ref":"#/components/schemas/owner_reports_ReportDocument"}},"type":"object"}]}}},"description":"Version with its frozen document."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Show a frozen version","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/owner_reports/{id}/versions/{version_id}/pdf":{"get":{"description":"Served only when its SHA-256 still matches (409 otherwise).","operationId":"listCompanyOwnerReportVersionPdf","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"version_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"PDF file."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."},"409":{"description":"Integrity check failed."}},"summary":"Download a frozen version's PDF","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/people":{"get":{"operationId":"listCompanyPeople","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/workforce_Person"},"type":"array"}}}},"401":{}},"summary":"List company people (roster)","tags":["workforce"],"x-os-idempotent":false,"x-os-module":"workforce","x-os-paginated":false},"post":{"operationId":"peopleCompany","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"person":{"properties":{"email":{"type":"string"},"employee_id":{"type":"string"},"first_name":{"type":"string"},"hourly_rate":{"type":"number"},"is_assignable":{"type":"boolean"},"job_title":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"status":{"enum":["active","inactive"],"type":"string"},"user_id":{"type":"integer"}},"required":["first_name","last_name"],"type":"object"}},"required":["person"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/workforce_PersonShow"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/workforce_Errors"}}}}},"summary":"Create a person","tags":["workforce"],"x-os-idempotent":true,"x-os-module":"workforce","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/people/filter_options/trade":{"get":{"operationId":"listCompanyPeopleFilterOptionsTrade","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/workforce_FilterOption"},"type":"array"}}}}},"summary":"Trade filter options","tags":["workforce"],"x-os-idempotent":false,"x-os-module":"workforce","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/people/inactive":{"get":{"operationId":"listCompanyPeopleInactive","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/workforce_Person"},"type":"array"}}}}},"summary":"List inactive company people","tags":["workforce"],"x-os-idempotent":false,"x-os-module":"workforce","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/people/{id}":{"get":{"operationId":"getCompanyPeople","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/workforce_PersonShow"}}}},"404":{}},"summary":"Show a person","tags":["workforce"],"x-os-idempotent":false,"x-os-module":"workforce","x-os-paginated":false},"patch":{"operationId":"updateCompanyPeople","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"person":{"properties":{"email":{"type":"string"},"employee_id":{"type":"string"},"first_name":{"type":"string"},"hourly_rate":{"type":"number"},"is_assignable":{"type":"boolean"},"job_title":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"status":{"enum":["active","inactive"],"type":"string"}},"type":"object"}},"required":["person"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/workforce_PersonShow"}}}}},"summary":"Update a person","tags":["workforce"],"x-os-idempotent":true,"x-os-module":"workforce","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/people/{id}/availability":{"get":{"description":"Company-owned supply in exact minutes. Inclusive window of at most 366 days; missing or cleared days remain null. This does not reserve labor or verify scheduling unit conversion. Requires workforce:read and live company view permission.","operationId":"listCompanyPeopleAvailability","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"from_day","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"through_day","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"assignable":{"type":"boolean"},"company_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"days":{"items":{"additionalProperties":false,"properties":{"available_minutes":{"maximum":1440,"minimum":0,"nullable":true,"type":"integer"},"day":{"format":"date","type":"string"},"revision":{"maximum":2147483647,"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["day","available_minutes","revision","updated_at"],"type":"object"},"maxItems":366,"type":"array"},"from_day":{"format":"date","type":"string"},"person_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"person_status":{"enum":["active","inactive"],"type":"string"},"person_updated_at":{"format":"date-time","type":"string"},"through_day":{"format":"date","type":"string"},"unit":{"enum":["minutes"],"type":"string"}},"required":["company_id","person_id","unit","person_status","assignable","person_updated_at","from_day","through_day","days"],"type":"object"}}},"description":"Recorded daily availability"},"400":{"description":"Unsupported or repeated query parameter"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient workforce scope or company permission"},"404":{"description":"Company or person not found"},"409":{"description":"Stale availability revision"},"422":{"description":"Invalid date, minutes, revision or date range"}},"summary":"Read daily workforce availability","tags":["workforce"],"x-os-idempotent":false,"x-os-module":"workforce","x-os-paginated":false},"put":{"description":"Requires workforce:write and live company edit permission. Set expected_revision to 0 only for a day never recorded; use the returned revision for changes. Null clears the value but retains its revision. Each successful save appends immutable history.","operationId":"availabilityCompanyPeople","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"availability":{"additionalProperties":false,"properties":{"available_minutes":{"maximum":1440,"minimum":0,"nullable":true,"type":"integer"},"day":{"format":"date","type":"string"},"expected_revision":{"maximum":2147483646,"minimum":0,"type":"integer"}},"required":["day","available_minutes","expected_revision"],"type":"object"}},"required":["availability"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"available_minutes":{"maximum":1440,"minimum":0,"nullable":true,"type":"integer"},"day":{"format":"date","type":"string"},"person_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["person_id","day","available_minutes","revision","updated_at"],"type":"object"}}},"description":"Recorded daily availability"},"400":{"description":"Unsupported or repeated query parameter"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient workforce scope or company permission"},"404":{"description":"Company or person not found"},"409":{"description":"Stale availability revision"},"422":{"description":"Invalid date, minutes, revision or date range"}},"summary":"Record daily workforce availability","tags":["workforce"],"x-os-idempotent":true,"x-os-module":"workforce","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/permission_templates":{"get":{"description":"Requires admin:read. Company path must match the authenticated tenant. Reads are available to active authenticated company members with the required token scope; no project-level membership gate. Flat array ordered by name; pagination slices the company template list. No search or type filter. Catalog presence does not grant access.","operationId":"listCompanyPermissionTemplates","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion. Authenticated company is authoritative; this cannot select a different company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Handler clamps values above 1000.","in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/company_admin_PermissionTemplate"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination Link","schema":{"type":"string"}},"Per-Page":{"description":"Pagination Per-Page","schema":{"type":"string"}},"Total":{"description":"Pagination Total","schema":{"type":"string"}}}},"400":{"description":"Invalid reference, date interval or retained membership references"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or current company authority denied"},"404":{"description":"Company or resource not found within the authenticated company"},"422":{"description":"Body validation failed"}},"summary":"List company permission templates","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":true},"post":{"description":"Requires admin:write. Company path must match the authenticated tenant. Writes require current company administrator authority; project-template admin permission alone is insufficient. Transactional services recheck authority. Creates a project permission map; when analytics is omitted, creation inserts analytics:read_only. Creation does not assign the template or alter company admin flags. Catalog presence does not grant access.","operationId":"createCompanyPermissionTemplate","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion. Authenticated company is authoritative; this cannot select a different company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_TemplateCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_PermissionTemplate"}}},"description":"Success"},"400":{"description":"Invalid reference, date interval or retained membership references"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or current company authority denied"},"404":{"description":"Company or resource not found within the authenticated company"},"422":{"description":"Body validation failed"}},"summary":"Create company permission template","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/permission_templates/{id}":{"delete":{"description":"Requires admin:write. Company path must match the authenticated tenant. Writes require current company administrator authority; project-template admin permission alone is insufficient. Transactional services recheck authority. Clears this template from all valid company project memberships and permanently deletes it. Invalid retained foreign membership references fail with 400. Members may lose project grants; company administrator flags are not changed. No last-company-admin removal occurs through this operation. Catalog presence does not grant access.","operationId":"deleteCompanyPermissionTemplate","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion. Authenticated company is authoritative; this cannot select a different company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted; empty response"},"400":{"description":"Invalid reference, date interval or retained membership references"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or current company authority denied"},"404":{"description":"Company or resource not found within the authenticated company"},"422":{"description":"Body validation failed"}},"summary":"Delete company permission template","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false},"get":{"description":"Requires admin:read. Company path must match the authenticated tenant. Reads are available to active authenticated company members with the required token scope; no project-level membership gate. Returns the stored map, not the effective permissions of a user. Company admin overrides and workspace restrictions are evaluated separately. Catalog presence does not grant access.","operationId":"getCompanyPermissionTemplate","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion. Authenticated company is authoritative; this cannot select a different company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_PermissionTemplate"}}},"description":"Success"},"400":{"description":"Invalid reference, date interval or retained membership references"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or current company authority denied"},"404":{"description":"Company or resource not found within the authenticated company"},"422":{"description":"Body validation failed"}},"summary":"Read company permission template","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false},"patch":{"description":"Requires admin:write. Company path must match the authenticated tenant. Writes require current company administrator authority; project-template admin permission alone is insufficient. Transactional services recheck authority. Supplying permissions replaces the whole map, including when empty; omitted keys lose template grants. Unlike creation, update does not add an analytics default. Changes affect all memberships assigned this template. project_specific is metadata, not a project restriction. This does not change company administrator flags. Catalog presence does not grant access.","operationId":"updateCompanyPermissionTemplate","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion. Authenticated company is authoritative; this cannot select a different company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_TemplateUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_PermissionTemplate"}}},"description":"Success"},"400":{"description":"Invalid reference, date interval or retained membership references"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or current company authority denied"},"404":{"description":"Company or resource not found within the authenticated company"},"422":{"description":"Body validation failed"}},"summary":"Edit company permission template","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/permission_templates/{id}/assignments":{"post":{"description":"Requires admin:write. Company path must match the authenticated tenant. Writes require current company administrator authority; project-template admin permission alone is insufficient. Transactional services recheck authority. Requires an existing project membership and project, user and template in the authenticated company. The path template must exist even when clearing. Only explicit permission_template_id:null clears; omitted or numeric body values select the path template. Clearing removes template-derived project permissions, while company admin overrides remain. Assignment never creates membership or changes company administrator flags. Catalog presence does not grant access.","operationId":"createCompanyPermissionTemplateAssignment","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion. Authenticated company is authoritative; this cannot select a different company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_Assignment"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_AssignmentResult"}}},"description":"Success"},"400":{"description":"Invalid reference, date interval or retained membership references"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or current company authority denied"},"404":{"description":"Company or resource not found within the authenticated company"},"422":{"description":"Body validation failed"}},"summary":"Assign or clear a project permission template","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/permits/work_queue":{"get":{"description":"Read-only company permit queue. Requires current active company identity and exact permits:read token scope. Each project's current permit view permission and tool enablement are checked before gathering and again before publishing rows, totals or project options. Denied projects are omitted without hidden counts. Unexpected source errors fail the request. Includes open conditions on active permits and issued-permit expirations. Owner and UTC date semantics match the project queue. Returns only the first take tasks ordered by date (null last), condition before expiration, item ID, then project ID. Total is the sum of complete matching counts for currently authorized sources, not the number of returned tasks. No offset or next-page cursor; narrow filters to reach other work.","operationId":"listCompanyPermitsWorkQueue","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"owner","schema":{"default":"all","enum":["all","mine","unassigned"],"type":"string"}},{"in":"query","name":"due","schema":{"default":"all","enum":["all","overdue","upcoming","undated"],"type":"string"}},{"in":"query","name":"search","schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"take","schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/permits_PermitCompanyQueue"}}},"description":"Currently readable operational work; private source evidence is never included"},"403":{"description":"Wrong company, inactive actor or missing permits:read token scope"},"422":{"description":"Invalid or unsupported filter"}},"summary":"GET /rest/v1.0/companies/{company_id}/permits/work_queue","tags":["permits"],"x-os-idempotent":false,"x-os-module":"permits","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/portfolio":{"get":{"operationId":"listCompanyPortfolio","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"projects":{"items":{"properties":{"active":{"type":"boolean"},"financials":{"properties":{"change_orders":{"type":"number"},"committed":{"type":"number"},"original_budget":{"type":"number"},"projected":{"type":"number"}},"required":["original_budget","committed","change_orders","projected"],"type":"object"},"name":{"type":"string"},"open_items":{"properties":{"observations":{"type":"integer"},"overdue":{"type":"integer"},"punch":{"type":"integer"},"rfis":{"type":"integer"},"submittals":{"type":"integer"}},"required":["rfis","submittals","punch","observations","overdue"],"type":"object"},"project_id":{"type":"integer"},"project_number":{"type":["string","null"]},"stage":{"type":["string","null"]}},"required":["project_id","name","active","open_items","financials"],"type":"object"},"type":"array"},"totals":{"properties":{"active_projects":{"type":"integer"},"financials":{"properties":{"change_orders":{"type":"number"},"committed":{"type":"number"},"original_budget":{"type":"number"},"projected":{"type":"number"}},"required":["original_budget","committed","change_orders","projected"],"type":"object"},"open_items":{"properties":{"observations":{"type":"integer"},"overdue":{"type":"integer"},"punch":{"type":"integer"},"rfis":{"type":"integer"},"submittals":{"type":"integer"}},"required":["rfis","submittals","punch","observations","overdue"],"type":"object"},"projects":{"type":"integer"}},"required":["projects","active_projects","open_items","financials"],"type":"object"}},"required":["projects","totals"],"type":"object"}}}},"401":{}},"summary":"Company portfolio roll-up","tags":["portfolio"],"x-os-idempotent":false,"x-os-module":"portfolio","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/programs":{"get":{"operationId":"listCompanyPrograms","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"address_freeform":{"type":["string","null"]},"created_at":{"type":"string"},"id":{"type":"integer"},"latitude":{"type":["string","null"]},"longitude":{"type":["string","null"]},"name":{"type":"string"},"project_count":{"type":"integer"},"project_ids":{"items":{"type":"integer"},"type":"array"},"updated_at":{"type":"string"},"website":{"type":["string","null"]},"zip":{"type":["string","null"]}},"required":["id","name","project_ids","project_count","created_at","updated_at"],"type":"object"},"type":"array"}}}},"401":{}},"summary":"List programs","tags":["portfolio"],"x-os-idempotent":false,"x-os-module":"portfolio","x-os-paginated":false},"post":{"operationId":"createCompanyProgram","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"address_freeform":{"type":["string","null"]},"created_at":{"type":"string"},"id":{"type":"integer"},"latitude":{"type":["string","null"]},"longitude":{"type":["string","null"]},"name":{"type":"string"},"project_count":{"type":"integer"},"project_ids":{"items":{"type":"integer"},"type":"array"},"projects":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":["string","null"]},"project_number":{"type":["string","null"]}},"required":["id"],"type":"object"},"type":"array"},"updated_at":{"type":"string"},"website":{"type":["string","null"]},"zip":{"type":["string","null"]}},"required":["id","name","project_ids","project_count","projects","created_at","updated_at"],"type":"object"}}}},"422":{}},"summary":"Create a program","tags":["portfolio"],"x-os-idempotent":true,"x-os-module":"portfolio","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/programs/{id}":{"delete":{"operationId":"deleteCompanyProgram","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{}},"summary":"Delete a program","tags":["portfolio"],"x-os-idempotent":true,"x-os-module":"portfolio","x-os-paginated":false},"get":{"operationId":"getCompanyProgram","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"address_freeform":{"type":["string","null"]},"created_at":{"type":"string"},"id":{"type":"integer"},"latitude":{"type":["string","null"]},"longitude":{"type":["string","null"]},"name":{"type":"string"},"project_count":{"type":"integer"},"project_ids":{"items":{"type":"integer"},"type":"array"},"projects":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":["string","null"]},"project_number":{"type":["string","null"]}},"required":["id"],"type":"object"},"type":"array"},"updated_at":{"type":"string"},"website":{"type":["string","null"]},"zip":{"type":["string","null"]}},"required":["id","name","project_ids","project_count","projects","created_at","updated_at"],"type":"object"}}}},"404":{}},"summary":"Show a program","tags":["portfolio"],"x-os-idempotent":false,"x-os-module":"portfolio","x-os-paginated":false},"patch":{"operationId":"updateCompanyProgram","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"address_freeform":{"type":["string","null"]},"created_at":{"type":"string"},"id":{"type":"integer"},"latitude":{"type":["string","null"]},"longitude":{"type":["string","null"]},"name":{"type":"string"},"project_count":{"type":"integer"},"project_ids":{"items":{"type":"integer"},"type":"array"},"projects":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":["string","null"]},"project_number":{"type":["string","null"]}},"required":["id"],"type":"object"},"type":"array"},"updated_at":{"type":"string"},"website":{"type":["string","null"]},"zip":{"type":["string","null"]}},"required":["id","name","project_ids","project_count","projects","created_at","updated_at"],"type":"object"}}}}},"summary":"Update a program","tags":["portfolio"],"x-os-idempotent":true,"x-os-module":"portfolio","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/project_regions":{"get":{"description":"Requires admin:read. The company path must match the authenticated company; company identity comes from the token. Readable by an authenticated active company member with the token scope. Returns a flat array, ordered by position and name. Includes inactive rows. Catalog presence does not grant authorization.","operationId":"listCompanyProjectRegions","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Values above 1000 are clamped by the REST handler.","in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Trimmed, case-insensitive substring match on name; blank means no filter.","in":"query","name":"search","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/company_admin_ProjectRegion"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination links","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size","schema":{"type":"string"}},"Total":{"description":"Total matching rows","schema":{"type":"string"}}}},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"List project regions","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":true},"post":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company create permission, currently restricted to company administrators and subject to workspace restrictions.  Catalog presence does not grant authorization.","operationId":"createCompanyProjectRegion","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_ProjectRegionCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_ProjectRegion"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Create project regions","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/project_regions/{id}":{"delete":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company delete permission, currently restricted to company administrators and subject to workspace restrictions. Soft-deletes the record; later list/show omit it. Catalog presence does not grant authorization.","operationId":"deleteCompanyProjectRegion","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted; no response body"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Delete project regions","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false},"get":{"description":"Requires admin:read. The company path must match the authenticated company; company identity comes from the token. Readable by an authenticated active company member with the token scope.  Catalog presence does not grant authorization.","operationId":"getCompanyProjectRegion","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_ProjectRegion"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Get project regions","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false},"patch":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company edit permission, currently restricted to company administrators and subject to workspace restrictions.  Catalog presence does not grant authorization.","operationId":"updateCompanyProjectRegion","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_ProjectRegionUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_ProjectRegion"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Update project regions","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/project_stages":{"get":{"operationId":"listCompanyProjectStages","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"category":{"nullable":true,"type":"string"},"default_stage":{"type":"boolean"},"has_rfi_prefixes":{"type":"boolean"},"hideable":{"type":"boolean"},"id":{"type":"integer"},"is_bidding_stage":{"type":"boolean"},"is_concept_stage":{"type":"boolean"},"name":{"type":"string"},"project_stage_has_children":{"type":"boolean"},"readonly":{"type":"boolean"}},"title":"ProjectStage","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}}},"summary":"GET /rest/v1.0/companies/{company_id}/project_stages","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/project_stages/{id}":{"delete":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company delete permission, currently restricted to company administrators and subject to workspace restrictions. Permanently deletes the record. Catalog presence does not grant authorization.","operationId":"deleteCompanyProjectStage","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted; no response body"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Delete project stages","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false},"get":{"description":"Requires admin:read. The company path must match the authenticated company; company identity comes from the token. Readable by an authenticated active company member with the token scope.  Catalog presence does not grant authorization.","operationId":"getCompanyProjectStage","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_ProjectStage"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Get project stages","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false},"patch":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company edit permission, currently restricted to company administrators and subject to workspace restrictions.  Catalog presence does not grant authorization.","operationId":"updateCompanyProjectStage","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_ProjectStageUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_ProjectStage"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Update project stages","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/project_types":{"get":{"description":"Requires admin:read. The company path must match the authenticated company; company identity comes from the token. Readable by an authenticated active company member with the token scope. Returns a flat array, ordered by position and name. Includes inactive rows. Catalog presence does not grant authorization.","operationId":"listCompanyProjectTypes","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Values above 1000 are clamped by the REST handler.","in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Trimmed, case-insensitive substring match on name; blank means no filter.","in":"query","name":"search","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/company_admin_ProjectType"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination links","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size","schema":{"type":"string"}},"Total":{"description":"Total matching rows","schema":{"type":"string"}}}},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"List project types","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":true},"post":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company create permission, currently restricted to company administrators and subject to workspace restrictions.  Catalog presence does not grant authorization.","operationId":"createCompanyProjectType","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_ProjectTypeCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_ProjectType"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Create project types","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/project_types/{id}":{"delete":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company delete permission, currently restricted to company administrators and subject to workspace restrictions. Soft-deletes the record; later list/show omit it. Catalog presence does not grant authorization.","operationId":"deleteCompanyProjectType","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted; no response body"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Delete project types","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false},"get":{"description":"Requires admin:read. The company path must match the authenticated company; company identity comes from the token. Readable by an authenticated active company member with the token scope.  Catalog presence does not grant authorization.","operationId":"getCompanyProjectType","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_ProjectType"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Get project types","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false},"patch":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company edit permission, currently restricted to company administrators and subject to workspace restrictions.  Catalog presence does not grant authorization.","operationId":"updateCompanyProjectType","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_ProjectTypeUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_ProjectType"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Update project types","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/projects/{project_id}/task_item_categories":{"get":{"operationId":"listCompanyProjectTaskItemCategories","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["ids_only","compact","normal","extended"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"items":{"type":"integer"},"title":"ids_only","type":"array"},{"items":{"properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"}},"type":"object"},"title":"compact_or_normal","type":"array"},{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"title":"extended","type":"array"}]}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List task item categories","tags":["tasks"],"x-os-idempotent":false,"x-os-module":"tasks","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/projects/{project_id}/task_item_comments":{"get":{"operationId":"listCompanyProjectTaskItemComments","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"filters[task_item_id]","required":false,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["compact","normal","extended"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"title":"compact","type":"array"},{"items":{"properties":{"attachments":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"title":"normal","type":"array"},{"items":{"properties":{"attachments":{"type":"object"},"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"title":"extended","type":"array"}]}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Task Item Comments","tags":["tasks"],"x-os-idempotent":false,"x-os-module":"tasks","x-os-paginated":true},"post":{"operationId":"createCompanyProjectTaskItemComment","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["compact","normal","extended"],"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"task_item_comment":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"comment":{"type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"required":["task_item_id"],"type":"object"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}],"title":"compact"},{"allOf":[{"properties":{"attachments":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}],"title":"normal"},{"allOf":[{"properties":{"attachments":{"type":"object"},"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}],"title":"extended"}]}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"type":"string"}},"type":"object"}}}}},"summary":"Create a task item comment","tags":["tasks"],"x-os-idempotent":true,"x-os-module":"tasks","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/projects/{project_id}/task_item_comments/{id}":{"delete":{"operationId":"deleteCompanyProjectTaskItemComment","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"type":"string"}},"type":"object"}}}}},"summary":"Delete a task item comment","tags":["tasks"],"x-os-idempotent":true,"x-os-module":"tasks","x-os-paginated":false},"patch":{"operationId":"updateCompanyProjectTaskItemComment","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["compact","normal","extended"],"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"task_item_comment":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"comment":{"type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}],"title":"compact"},{"allOf":[{"properties":{"attachments":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}],"title":"normal"},{"allOf":[{"properties":{"attachments":{"type":"object"},"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}],"title":"extended"}]}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"type":"string"}},"type":"object"}}}}},"summary":"Update a task item comment","tags":["tasks"],"x-os-idempotent":true,"x-os-module":"tasks","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/recycle_bin/form_templates":{"get":{"operationId":"listCompanyRecycleBinFormTemplates","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"archived_at":{"format":"date-time","nullable":true,"type":"string"},"assign_to_new_projects":{"type":"boolean"},"attachment":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Recycled Company Form Templates","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/recycle_bin/form_templates/{id}":{"get":{"operationId":"getCompanyRecycleBinFormTemplate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"archived_at":{"format":"date-time","nullable":true,"type":"string"},"assign_to_new_projects":{"type":"boolean"},"attachment":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Recycled Company Form Template","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/recycle_bin/form_templates/{id}/restore":{"patch":{"operationId":"restoreCompanyRecycleBinFormTemplate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Restore Company Form Template","tags":["forms"],"x-os-idempotent":true,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/schedules":{"get":{"description":"Company-scoped. Strict per-project RBAC: only active projects of the caller's company with the Schedule tool enabled and Schedule access are listed; calculated dates, float, health, links and program results require live Schedule admin on every project involved. All responses are private, no-store. Requires schedule:read. One row per visible project with current version, data date, start/finish, baseline finish variance, critical and negative-float counts, DCMA health grade, last update, schedule status, Project Managers and up to 12 key milestones, plus summary Gantt axis, filter choices (from visible rows only), totals and inter-project links where both ends are administered. Stored engine results only; nothing is recalculated.","operationId":"listCompanySchedules","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"region","schema":{"maxLength":255,"type":"string"}},{"in":"query","name":"stage","schema":{"maxLength":255,"type":"string"}},{"in":"query","name":"project_type","schema":{"maxLength":255,"type":"string"}},{"in":"query","name":"q","schema":{"maxLength":200,"type":"string"}},{"description":"Project Manager user id (project team role)","in":"query","name":"pm","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"status","schema":{"enum":["on_track","behind","negative_float","not_calculated","no_schedule","restricted"],"type":"string"}},{"description":"Portfolio program membership","in":"query","name":"program_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_SchedulePortfolio"}}},"description":"Portfolio schedules"},"400":{"description":"Invalid query or body, missing saved schedule, or an activity that is not in the project's current schedule"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, token scope denied, or Schedule admin required on a selected project"},"404":{"description":"Not found, or not visible: links and runs touching a project the caller does not administer are reported as absent"},"408":{"description":"Request cancelled"}},"summary":"Portfolio of project schedules","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/schedules/analysis-jobs":{"get":{"description":"Program calculations queued as background jobs, newest first. Lists only jobs whose every covered project is one where the caller is Schedule admin; a page can therefore hold fewer than `page_size` jobs (follow `next_before_id`). Requires schedule:read token scope. Filters: `active=true|false` (queued or running only), `before_id`, `page_size` (1-100, default 25). Private, no-store.","operationId":"listCompanySchedulesAnalysisJobs","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"active","required":false,"schema":{"enum":["true","false"],"type":"string"}},{"in":"query","name":"before_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"jobs":{"items":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"},"type":"array"},"next_before_id":{"nullable":true,"type":"integer"}},"required":["jobs","next_before_id"],"type":"object"}}},"description":"Job page"},"400":{"description":"Invalid identifier or query"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, or token scope denied"},"404":{"description":"Job not found, or not visible: a job covering a project where the caller is not Schedule admin is reported as absent"}},"summary":"List company-scoped background schedule analysis jobs","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/schedules/analysis-jobs/{job_id}":{"get":{"description":"Status, progress and, once completed, the retained program run (`resource.type` = `schedule_program_run`, read it at /program-runs/{run_id}). Requires live Schedule admin on every project the job covers and schedule:read token scope. Active jobs carry `Retry-After: 2`. No query parameters.","operationId":"getCompanySchedulesAnalysisJob","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"job_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"}},"required":["job"],"type":"object"}}},"description":"Job"},"400":{"description":"Invalid identifier or query"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, or token scope denied"},"404":{"description":"Job not found, or not visible: a job covering a project where the caller is not Schedule admin is reported as absent"}},"summary":"Read a company-scoped background schedule analysis job","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/schedules/analysis-jobs/{job_id}/cancel":{"post":{"description":"Cancels a queued program calculation, or stops a running one and kills its engine child. Finished jobs are returned unchanged. A run whose result was being persisted at the moment of cancellation may still be retained. Requires live Schedule admin on every project the job covers and schedule:write token scope. No body or query parameters.","operationId":"cancelCompanySchedulesAnalysisJob","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"job_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"}},"required":["job"],"type":"object"}}},"description":"Job after cancellation"},"400":{"description":"Invalid identifier or query"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, or token scope denied"},"404":{"description":"Job not found, or not visible: a job covering a project where the caller is not Schedule admin is reported as absent"}},"summary":"Cancel a company-scoped background schedule analysis job","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/schedules/program-links":{"get":{"description":"Company-scoped. Strict per-project RBAC: only active projects of the caller's company with the Schedule tool enabled and Schedule access are listed; calculated dates, float, health, links and program results require live Schedule admin on every project involved. All responses are private, no-store. Requires schedule:read. Only links whose both projects the caller administers. Endpoints report stale when the activity is no longer in that project's current saved version.","operationId":"listCompanySchedulesProgramLinks","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Links touching this project","in":"query","name":"project_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"links":{"items":{"$ref":"#/components/schemas/schedule_ScheduleProgramLink"},"type":"array"}},"required":["links"],"type":"object"}}},"description":"Links"},"400":{"description":"Invalid query or body, missing saved schedule, or an activity that is not in the project's current schedule"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, token scope denied, or Schedule admin required on a selected project"},"404":{"description":"Not found, or not visible: links and runs touching a project the caller does not administer are reported as absent"},"408":{"description":"Request cancelled"}},"summary":"List inter-project schedule links","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Company-scoped. Strict per-project RBAC: only active projects of the caller's company with the Schedule tool enabled and Schedule access are listed; calculated dates, float, health, links and program results require live Schedule admin on every project involved. All responses are private, no-store. Requires schedule:write. Both activities must exist in their project's current saved version. Stored per company (tenant-checked by a database guard), never written into either schedule. Audited in both projects. No query parameters.","operationId":"createCompanySchedulesProgramLink","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramLinkCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramLink"}}},"description":"Created link"},"400":{"description":"Invalid query or body, missing saved schedule, or an activity that is not in the project's current schedule"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, token scope denied, or Schedule admin required on a selected project"},"404":{"description":"Not found, or not visible: links and runs touching a project the caller does not administer are reported as absent"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version, or failed integrity check"},"413":{"description":"Request (or the selected schedules) exceed 2 MiB"},"415":{"description":"Content-Type must be application/json"}},"summary":"Link activities in two different projects","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/schedules/program-links/{link_id}":{"delete":{"description":"Company-scoped. Strict per-project RBAC: only active projects of the caller's company with the Schedule tool enabled and Schedule access are listed; calculated dates, float, health, links and program results require live Schedule admin on every project involved. All responses are private, no-store. Requires schedule:write. Audited in both projects. No query parameters.","operationId":"deleteCompanySchedulesProgramLink","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"link_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"deleted":{"type":"boolean"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","deleted"],"type":"object"}}},"description":"Deleted"},"400":{"description":"Invalid query or body, missing saved schedule, or an activity that is not in the project's current schedule"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, token scope denied, or Schedule admin required on a selected project"},"404":{"description":"Not found, or not visible: links and runs touching a project the caller does not administer are reported as absent"},"408":{"description":"Request cancelled"}},"summary":"Remove an inter-project link","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false},"patch":{"description":"Company-scoped. Strict per-project RBAC: only active projects of the caller's company with the Schedule tool enabled and Schedule access are listed; calculated dates, float, health, links and program results require live Schedule admin on every project involved. All responses are private, no-store. Requires schedule:write. Endpoints are immutable; re-point by deleting and creating. Audited in both projects. No query parameters.","operationId":"updateCompanySchedulesProgramLink","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"link_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramLinkUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramLink"}}},"description":"Updated link"},"400":{"description":"Invalid query or body, missing saved schedule, or an activity that is not in the project's current schedule"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, token scope denied, or Schedule admin required on a selected project"},"404":{"description":"Not found, or not visible: links and runs touching a project the caller does not administer are reported as absent"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version, or failed integrity check"},"413":{"description":"Request (or the selected schedules) exceed 2 MiB"},"415":{"description":"Content-Type must be application/json"}},"summary":"Change a link's type, lag, category or note","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/schedules/program-runs":{"get":{"description":"Company-scoped. Strict per-project RBAC: only active projects of the caller's company with the Schedule tool enabled and Schedule access are listed; calculated dates, float, health, links and program results require live Schedule admin on every project involved. All responses are private, no-store. Requires schedule:read. Only runs whose every project the caller administers. Newest first.","operationId":"listCompanySchedulesProgramRuns","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"next_before_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"runs":{"items":{"$ref":"#/components/schemas/schedule_ScheduleProgramRunSummary"},"type":"array"}},"required":["runs","next_before_id"],"type":"object"}}},"description":"Runs"},"400":{"description":"Invalid query or body, missing saved schedule, or an activity that is not in the project's current schedule"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, token scope denied, or Schedule admin required on a selected project"},"404":{"description":"Not found, or not visible: links and runs touching a project the caller does not administer are reported as absent"},"408":{"description":"Request cancelled"}},"summary":"List program calculations","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Company-scoped. Strict per-project RBAC: only active projects of the caller's company with the Schedule tool enabled and Schedule access are listed; calculated dates, float, health, links and program results require live Schedule admin on every project involved. All responses are private, no-store. Requires schedule:write. Calculates the selected projects' current saved versions as one network with the inter-project links between them (each project keeps its data date, planned start and deadline; float is per project). Default selection is every administered project connected by links; or project_ids, or a portfolio program (administered members only). Returns per-project joint vs standalone dates, cross-project driving paths, link-by-link driving and delay with the external constraint each implies, and slip impacts (each project's outgoing links slip_days late, plus an optional selected slip). Retained as immutable evidence pinned to the versions; never writes into any schedule. Only the `async` query parameter. Large programs run as a durable background schedule analysis job (company-scoped, kind `program`): the job re-checks the selection and every member's pinned version before calculating and retains the same program run the inline path would.","operationId":"createCompanySchedulesProgramRun","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"`1` always queues a background schedule analysis job (202); `0` forces the inline path (30 s engine limit). Omitted: programs above the size threshold (estimated engine time over 10 s: (2 + slip scenarios) × total member activities) are queued automatically.","in":"query","name":"async","required":false,"schema":{"enum":["0","1"],"type":"string"}},{"description":"`respond-async` is equivalent to `async=1`; the 202 response then carries `Preference-Applied: respond-async`.","in":"header","name":"Prefer","required":false,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramCalculate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramRun"}}},"description":"Program run"},"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"}},"required":["job"],"type":"object"}}},"description":"Queued as a durable background schedule analysis job (large program, `async=1` or `Prefer: respond-async`). Poll the job URL in `Location` (/rest/v1.0/companies/{company_id}/schedules/analysis-jobs/{job_id}); when it completes, `job.resource` names the retained program run, identical to what the inline path returns.","headers":{"Location":{"description":"Job status URL","schema":{"type":"string"}}}},"400":{"description":"Invalid query or body, missing saved schedule, or an activity that is not in the project's current schedule; `async` other than 0 or 1"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, token scope denied, or Schedule admin required on a selected project"},"404":{"description":"Not found, or not visible: links and runs touching a project the caller does not administer are reported as absent"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version, or failed integrity check"},"413":{"description":"Request (or the selected schedules) exceed 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The engine rejected the program network (for example mixed day and minute precision)"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Scheduling engine unavailable"}},"summary":"Calculate the program (joint multi-project network)","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/schedules/program-runs/{run_id}":{"get":{"description":"Company-scoped. Strict per-project RBAC: only active projects of the caller's company with the Schedule tool enabled and Schedule access are listed; calculated dates, float, health, links and program results require live Schedule admin on every project involved. All responses are private, no-store. Requires schedule:read. stale_project_ids lists projects whose current version differs from the pinned one. No query parameters.","operationId":"getCompanySchedulesProgramRun","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"run_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramRun"}}},"description":"Program run"},"400":{"description":"Invalid query or body, missing saved schedule, or an activity that is not in the project's current schedule"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, token scope denied, or Schedule admin required on a selected project"},"404":{"description":"Not found, or not visible: links and runs touching a project the caller does not administer are reported as absent"},"408":{"description":"Request cancelled"},"409":{"description":"Stored evidence failed its integrity check"}},"summary":"Read a program calculation","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/schedules/program-runs/{run_id}/propose-constraint":{"post":{"description":"Company-scoped. Strict per-project RBAC: only active projects of the caller's company with the Schedule tool enabled and Schedule access are listed; calculated dates, float, health, links and program results require live Schedule admin on every project involved. All responses are private, no-store. Requires schedule:write. Creates an open scenario in the link's successor project (base: the run's pinned version, which must still be current) with one set_constraint edit: start on or after (FS/SS) or finish on or after (FF/SF) the date the joint network gives that activity. Idempotent by request_id. Nothing is adopted; review and adopt through the project's scenarios. No query parameters.","operationId":"proposeConstraintCompanySchedulesProgramRun","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"run_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramProposal"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramProposalResult"}}},"description":"Replayed request"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramProposalResult"}}},"description":"Scenario created"},"400":{"description":"Invalid query or body, missing saved schedule, or an activity that is not in the project's current schedule"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, token scope denied, or Schedule admin required on a selected project"},"404":{"description":"Not found, or not visible: links and runs touching a project the caller does not administer are reported as absent"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version, or failed integrity check"},"413":{"description":"Request (or the selected schedules) exceed 2 MiB"},"415":{"description":"Content-Type must be application/json"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"}},"summary":"Propose an external constraint as a what-if scenario in the affected project","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/schedules/program-runs/{run_id}/propose-leveling":{"post":{"description":"Creates an open scenario in the named project (base: the run's pinned version, which must still be current) with one set_constraint start_on_or_after edit per levelling move. Idempotent by request_id. Nothing is adopted. No query parameters.","operationId":"proposeLevelingCompanySchedulesProgramRun","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"run_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramLevellingProposal"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramLevellingProposalResult"}}},"description":"Replayed request"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramLevellingProposalResult"}}},"description":"Scenario created"},"400":{"description":"Invalid query or body, missing saved schedule, or an activity that is not in the project's current schedule"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, token scope denied, or Schedule admin required on a selected project"},"404":{"description":"Not found, or not visible: links and runs touching a project the caller does not administer are reported as absent"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version, or failed integrity check"},"413":{"description":"Request (or the selected schedules) exceed 2 MiB"},"415":{"description":"Content-Type must be application/json"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"}},"summary":"Propose one project's levelling moves as a what-if scenario","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/schedules/resource-leveling":{"post":{"description":"Company-scoped. Resources whose retained identity mappings name the same person, crew or equipment record in two or more administered projects are levelled over the joint network of those projects (cpmcore.portfolio.shared_resource_demand, then cpmcore.levelling in advisory mode). A shared identity's capacity is the lowest any member project states. Retains a program run (parameters.kind resource_leveling) whose result carries resource_levelling; per-project scenario proposals are created through propose-leveling. Nothing is written to any schedule. Same async negotiation as program-runs; the background job kind is program_leveling. 400 when no resource is shared.","operationId":"createCompanySchedulesResourceLeveling","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"`1` always queues a background schedule analysis job (202); `0` forces the inline path (30 s engine limit). Omitted: programs above the size threshold (estimated engine time over 10 s: (2 + slip scenarios) × total member activities) are queued automatically.","in":"query","name":"async","required":false,"schema":{"enum":["0","1"],"type":"string"}},{"description":"`respond-async` is equivalent to `async=1`; the 202 response then carries `Preference-Applied: respond-async`.","in":"header","name":"Prefer","required":false,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramLevelling"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgramRun"}}},"description":"Program run"},"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"}},"required":["job"],"type":"object"}}},"description":"Queued as a durable background schedule analysis job (large program, `async=1` or `Prefer: respond-async`). Poll the job URL in `Location` (/rest/v1.0/companies/{company_id}/schedules/analysis-jobs/{job_id}); when it completes, `job.resource` names the retained program run, identical to what the inline path returns.","headers":{"Location":{"description":"Job status URL","schema":{"type":"string"}}}},"400":{"description":"Invalid query or body, missing saved schedule, or an activity that is not in the project's current schedule; `async` other than 0 or 1"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, token scope denied, or Schedule admin required on a selected project"},"404":{"description":"Not found, or not visible: links and runs touching a project the caller does not administer are reported as absent"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version, or failed integrity check"},"413":{"description":"Request (or the selected schedules) exceed 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The engine rejected the program network (for example mixed day and minute precision)"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Scheduling engine unavailable"}},"summary":"Level resources shared across projects (advisory)","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/schedules/resources":{"get":{"description":"Company-scoped. Strict per-project RBAC: only active projects of the caller's company with the Schedule tool enabled and Schedule access are listed; calculated dates, float, health, links and program results require live Schedule admin on every project involved. All responses are private, no-store. Requires schedule:read; mapping and workforce reports additionally follow owning-tool permissions and workforce:read / equipment:read / materials:read token scopes (unreadable reports are listed as not_visible). From retained evidence of current versions only: per-person workforce demand summed across projects against recorded availability, shared person/crew/equipment identities (explicit retained mappings in two or more projects) with periods of concurrent demand, and unverified same-name candidates. Nothing is calculated, reserved or levelled.","operationId":"listCompanySchedulesResources","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"program_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Comma-separated, at most 25","in":"query","name":"project_ids","schema":{"pattern":"^[1-9]\\d{0,9}(,[1-9]\\d{0,9}){0,24}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_SchedulePortfolioResources"}}},"description":"Resource view"},"400":{"description":"Invalid query or body, missing saved schedule, or an activity that is not in the project's current schedule"},"401":{"description":"Authentication required"},"403":{"description":"Path company is not the caller's, token scope denied, or Schedule admin required on a selected project"},"404":{"description":"Not found, or not visible: links and runs touching a project the caller does not administer are reported as absent"},"408":{"description":"Request cancelled"}},"summary":"Portfolio resource demand against capacity","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/scim_connections":{"get":{"description":"A scoped API token needs `identity:read`.","operationId":"listCompanyScimConnections","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"JSON request body.","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"array"}}},"description":"Created."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"List SCIM connections","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false},"post":{"operationId":"createCompanyScimConnection","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create SCIM connection","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/scim_connections/{id}":{"delete":{"operationId":"deleteCompanyScimConnection","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete SCIM connection","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/service_accounts":{"get":{"description":"Company admins only. Never returns secrets.","operationId":"listCompanyServiceAccounts","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/identity_ServiceAccount"},"type":"array"}}},"description":"Service accounts"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"List service accounts","tags":["identity"],"x-os-idempotent":false,"x-os-module":"identity","x-os-paginated":false},"post":{"description":"Creates a non-human account for an unattended integration. It cannot sign in to the app, cannot be a super admin and does not use a seat. Add credentials and project access next.","operationId":"createCompanyServiceAccount","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. Repeating a request with the same key within 24 hours replays the first 2xx response instead of running the write again.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"service_account":{"$ref":"#/components/schemas/identity_ServiceAccountInput"}},"required":["service_account"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity_ServiceAccount"}}},"description":"Created"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"},"422":{"description":"Invalid fields"}},"summary":"Create a service account","tags":["identity"],"x-os-idempotent":true,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/service_accounts/{id}":{"get":{"operationId":"getCompanyServiceAccount","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Service account id","in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity_ServiceAccount"}}},"description":"Service account"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"Show a service account","tags":["identity"],"x-os-idempotent":false,"x-os-module":"identity","x-os-paginated":false},"patch":{"description":"disabled: true revokes every credential and access token immediately.","operationId":"updateCompanyServiceAccount","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Service account id","in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. Repeating a request with the same key within 24 hours replays the first 2xx response instead of running the write again.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"service_account":{"$ref":"#/components/schemas/identity_ServiceAccountUpdate"}},"required":["service_account"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity_ServiceAccount"}}},"description":"Updated"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"},"422":{"description":"Invalid fields"}},"summary":"Update or disable a service account","tags":["identity"],"x-os-idempotent":true,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/service_accounts/{id}/calls":{"get":{"description":"Every API call the account made, newest first, including denied attempts. The next page cursor is in X-Next-Before.","operationId":"listCompanyServiceAccountCalls","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Service account id","in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before","schema":{"type":"string"}},{"in":"query","name":"per_page","schema":{"default":50,"maximum":200,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/identity_ApiCall"},"type":"array"}}},"description":"Calls"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"Service account audit log","tags":["identity"],"x-os-idempotent":false,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/service_accounts/{id}/credentials":{"get":{"description":"Never returns secrets.","operationId":"listCompanyServiceAccountCredentials","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Service account id","in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/identity_ServiceAccountCredential"},"type":"array"}}},"description":"Credentials"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"List credentials","tags":["identity"],"x-os-idempotent":false,"x-os-module":"identity","x-os-paginated":false},"post":{"description":"Issues an API key (bearer) or an OAuth client secret (client_credentials). The secret is returned once. Scopes cannot exceed the scopes of the token making this call. At most 10 active credentials; expiry 1 to 365 days (default 90).","operationId":"createCompanyServiceAccountCredential","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Service account id","in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Not supported here: the response contains a one-time secret that is never stored, so sending this header returns 400. List credentials before retrying.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"credential":{"properties":{"expires_in_days":{"default":90,"maximum":365,"minimum":1,"type":"integer"},"kind":{"default":"api_key","enum":["api_key","client_secret"],"type":"string"},"label":{"maxLength":120,"type":"string"},"scopes":{"description":"API scopes from the documented vocabulary (`<area>:read` or `<area>:write`).","items":{"example":"rfis:read","type":"string"},"maxItems":200,"minItems":1,"type":"array"}},"required":["label","scopes"],"type":"object"}},"required":["credential"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity_IssuedServiceAccountCredential"}}},"description":"Created; includes the secret once"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"},"409":{"description":"Account disabled or credential limit reached"},"422":{"description":"Invalid fields"}},"summary":"Create a credential","tags":["identity"],"x-os-idempotent":true,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/service_accounts/{id}/credentials/{credential_id}":{"delete":{"description":"Stops the credential and every token minted from it now.","operationId":"deleteCompanyServiceAccountCredential","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Service account id","in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Credential id","in":"path","name":"credential_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. Repeating a request with the same key within 24 hours replays the first 2xx response instead of running the write again.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"Revoke a credential","tags":["identity"],"x-os-idempotent":true,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/service_accounts/{id}/credentials/{credential_id}/rotate":{"post":{"description":"Issues a replacement with the same kind, label and scopes (secret shown once). The old secret keeps working for overlap_hours (0 to 168, default 24), then stops.","operationId":"rotateCompanyServiceAccountCredential","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Service account id","in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Credential id","in":"path","name":"credential_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Not supported here: the response contains a one-time secret that is never stored, so sending this header returns 400. List credentials before retrying.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"rotation":{"properties":{"expires_in_days":{"maximum":365,"minimum":1,"type":"integer"},"overlap_hours":{"default":24,"maximum":168,"minimum":0,"type":"integer"}},"type":"object"}},"required":[],"type":"object"}}},"required":false},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/identity_IssuedServiceAccountCredential"},{"properties":{"previous":{"properties":{"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"}]}}},"description":"Replacement issued"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"},"409":{"description":"Not active or already rotated"}},"summary":"Rotate a credential","tags":["identity"],"x-os-idempotent":true,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/service_accounts/{id}/projects":{"get":{"operationId":"listCompanyServiceAccountProjects","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Service account id","in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"permission_template_id":{"nullable":true,"type":"integer"},"project_id":{"type":"integer"},"project_name":{"type":"string"}},"type":"object"},"type":"array"}}},"description":"Project access"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"List project access","tags":["identity"],"x-os-idempotent":false,"x-os-module":"identity","x-os-paginated":false},"put":{"description":"Adds the account to a project with a permission template, or removes it (permission_template_id null). Permission templates apply exactly as for a person.","operationId":"replaceCompanyServiceAccountProjects","parameters":[{"description":"Your company id; must match the caller's company.","in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Service account id","in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. Repeating a request with the same key within 24 hours replays the first 2xx response instead of running the write again.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_access":{"properties":{"permission_template_id":{"nullable":true,"type":"integer"},"project_id":{"type":"integer"}},"required":["project_id","permission_template_id"],"type":"object"}},"required":["project_access"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"permission_template_id":{"nullable":true,"type":"integer"},"project_id":{"type":"integer"}},"type":"object"}}},"description":"Updated"},"401":{"description":"Missing, invalid, expired or revoked credential"},"403":{"description":"Not a company admin, missing scope, or a non-human caller (service accounts, agents and partner apps cannot manage credentials)"},"404":{"description":"Not found in your company"}},"summary":"Set project access","tags":["identity"],"x-os-idempotent":true,"x-os-module":"identity","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/submittal_statuses":{"get":{"operationId":"listCompanySubmittalStatuses","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"is_default":{"type":"boolean"},"name":{"type":"string"},"status":{"enum":["Open","Closed","Draft"],"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Submittal Statuses","tags":["submittals"],"x-os-idempotent":false,"x-os-module":"submittals","x-os-paginated":true}},"/rest/v1.0/companies/{company_id}/trades":{"get":{"description":"Requires admin:read. The company path must match the authenticated company; company identity comes from the token. Readable by an authenticated active company member with the token scope. Returns a flat array, ordered by position and name. Includes inactive rows. Catalog presence does not grant authorization.","operationId":"listCompanyTrades","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Values above 1000 are clamped by the REST handler.","in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Trimmed, case-insensitive substring match on name; blank means no filter.","in":"query","name":"search","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/company_admin_Trade"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination links","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size","schema":{"type":"string"}},"Total":{"description":"Total matching rows","schema":{"type":"string"}}}},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"List trades","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":true},"post":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company create permission, currently restricted to company administrators and subject to workspace restrictions.  Catalog presence does not grant authorization.","operationId":"createCompanyTrade","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_TradeCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_Trade"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Create trades","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/trades/{id}":{"delete":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company delete permission, currently restricted to company administrators and subject to workspace restrictions. Permanently deletes the record. Catalog presence does not grant authorization.","operationId":"deleteCompanyTrade","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted; no response body"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Delete trades","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false},"get":{"description":"Requires admin:read. The company path must match the authenticated company; company identity comes from the token. Readable by an authenticated active company member with the token scope.  Catalog presence does not grant authorization.","operationId":"getCompanyTrade","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_Trade"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Get trades","tags":["company_admin"],"x-os-idempotent":false,"x-os-module":"company_admin","x-os-paginated":false},"patch":{"description":"Requires admin:write. The company path must match the authenticated company; company identity comes from the token. Requires company edit permission, currently restricted to company administrators and subject to workspace restrictions.  Catalog presence does not grant authorization.","operationId":"updateCompanyTrade","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_TradeUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/company_admin_Trade"}}},"description":"Success"},"400":{"description":"Malformed JSON, invalid service identity, or a blank name after trimming on create"},"401":{"description":"Valid authentication required"},"403":{"description":"Required token scope or company permission denied; workspace may be read only"},"404":{"description":"Company path does not match the authenticated company, or the record does not exist in that company"},"422":{"description":"Request body validation failed"},"429":{"description":"Rate limit exceeded"}},"summary":"Update trades","tags":["company_admin"],"x-os-idempotent":true,"x-os-module":"company_admin","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/webhooks":{"get":{"operationId":"listCompanyWebhooks","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/webhooks_WebhookListItem"},"type":"array"}}}}},"summary":"List webhook subscriptions","tags":["webhooks"],"x-os-idempotent":false,"x-os-module":"webhooks","x-os-paginated":false},"post":{"operationId":"createCompanyWebhook","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"webhook":{"properties":{"active":{"type":"boolean"},"events":{"description":"Event names: exact (\"analytics.schedule.delivered\"), a namespace prefix (\"analytics.*\") or \"*\". Emitted today: analytics.alert.fired, analytics.insight.opened, analytics.schedule.delivered (metadata and a signed, expiring download link rendered as the schedule owner; never values).","items":{"type":"string"},"type":"array"},"secret":{"type":"string"},"url":{"type":"string"}},"required":["url","events"],"type":"object"}},"required":["webhook"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_Webhook"}}}},"422":{}},"summary":"Create a webhook subscription","tags":["webhooks"],"x-os-idempotent":true,"x-os-module":"webhooks","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/webhooks/event_types":{"get":{"description":"Every project record event with its version, resource, the permission a subscription owner needs, and the JSON Schema of data.","operationId":"listCompanyWebhooksEventTypes","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"data_schema":{"type":"object"},"permission":{"type":"string"},"resource":{"type":"string"},"summary":{"type":"string"},"type":{"type":"string"},"version":{"type":"integer"}},"type":"object"},"type":"array"}}},"description":"Catalog"},"404":{"description":"Not found"}},"summary":"List the project record event catalog","tags":["webhooks"],"x-os-idempotent":false,"x-os-module":"webhooks","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/webhooks/{id}":{"delete":{"operationId":"deleteCompanyWebhook","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{},"404":{}},"summary":"Delete a webhook subscription","tags":["webhooks"],"x-os-idempotent":true,"x-os-module":"webhooks","x-os-paginated":false},"get":{"operationId":"getCompanyWebhook","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_WebhookListItem"}}}},"404":{}},"summary":"Show a webhook subscription (secret masked; see secret_preview)","tags":["webhooks"],"x-os-idempotent":false,"x-os-module":"webhooks","x-os-paginated":false},"patch":{"description":"Returns the full secret only when the request sets secret (a rotation); otherwise secret_preview only. A secret may not start with v1: or v2:.","operationId":"updateCompanyWebhook","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"webhook":{"properties":{"active":{"type":"boolean"},"events":{"description":"Event names: exact (\"analytics.schedule.delivered\"), a namespace prefix (\"analytics.*\") or \"*\". Emitted today: analytics.alert.fired, analytics.insight.opened, analytics.schedule.delivered (metadata and a signed, expiring download link rendered as the schedule owner; never values).","items":{"type":"string"},"type":"array"},"secret":{"type":"string"},"url":{"type":"string"}},"type":"object"}},"required":["webhook"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_WebhookListItem"}}},"description":"The subscription; secret is present only when this request set it."}},"summary":"Update a webhook subscription","tags":["webhooks"],"x-os-idempotent":true,"x-os-module":"webhooks","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/webhooks/{id}/deliveries":{"get":{"operationId":"listCompanyWebhookDeliveries","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/webhooks_WebhookDelivery"},"type":"array"}}}}},"summary":"List delivery history (company administrators only)","tags":["webhooks"],"x-os-idempotent":false,"x-os-module":"webhooks","x-os-paginated":false},"post":{"operationId":"createCompanyWebhookDelivery","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"request_key":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}},"required":["request_key"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_WebhookDelivery"}}}},"400":{},"403":{},"404":{},"409":{}},"summary":"Queue an idempotent synthetic webhook.test delivery (company administrators only)","tags":["webhooks"],"x-os-idempotent":true,"x-os-module":"webhooks","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/webhooks/{id}/deliveries/{delivery_id}/replay":{"post":{"description":"Queues the same event (same event_id) under a new delivery id, with replay: true, replay_of and no sequence. The event must be within the 30-day retention and the subscription active; the owner must still be able to read the record.","operationId":"replayCompanyWebhookDelivery","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"delivery_id","required":true,"schema":{"type":"integer"}}],"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"id":{"format":"uuid","type":"string"},"replay_of":{"format":"uuid","type":"string"},"subscription_id":{"type":"integer"}},"type":"object"}}},"description":"Queued"},"400":{"description":"Bad request"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"}},"summary":"Replay one project record event delivery","tags":["webhooks"],"x-os-idempotent":true,"x-os-module":"webhooks","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/webhooks/{id}/deliveries/{delivery_id}/retry":{"post":{"operationId":"retryCompanyWebhookDelivery","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"delivery_id","required":true,"schema":{"type":"integer"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_WebhookDelivery"}}}},"403":{},"404":{},"409":{}},"summary":"Requeue a failed test delivery with its original bytes and identity","tags":["webhooks"],"x-os-idempotent":true,"x-os-module":"webhooks","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/webhooks/{id}/replay":{"post":{"description":"Queues replays of the subscription's matching project record events recorded in [since, until), oldest first, at most 500 per call (truncated: true when more remain). Optional events narrows by name or wildcard.","operationId":"replayCompanyWebhook","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"events":{"items":{"type":"string"},"type":"array"},"since":{"format":"date-time","type":"string"},"until":{"format":"date-time","type":"string"}},"required":["since"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"queued":{"type":"integer"},"truncated":{"type":"boolean"}},"type":"object"}}},"description":"Queued"},"400":{"description":"Bad request"},"403":{"description":"Forbidden"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"422":{"description":"Validation failed"}},"summary":"Replay project record events from a time range","tags":["webhooks"],"x-os-idempotent":true,"x-os-module":"webhooks","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/webhooks/{id}/rotate_secret":{"post":{"description":"Replaces the signing secret with a generated 64-hex-character value and returns it; this is the only time it is shown. Deliveries sign with it from their next attempt. No overlap window: update the receiver right away.","operationId":"rotateSecretCompanyWebhook","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_Webhook"}}}},"403":{},"404":{}},"summary":"Rotate the signing secret","tags":["webhooks"],"x-os-idempotent":true,"x-os-module":"webhooks","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/work_breakdown_structure/patterns":{"get":{"operationId":"listCompanyWorkBreakdownStructurePatterns","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsPattern"}}}}},"summary":"Show the company WBS pattern","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/work_breakdown_structure/segments":{"get":{"operationId":"listCompanyWorkBreakdownStructureSegments","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/wbs_Segment"},"type":"array"}}}}},"summary":"List company WBS segments","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"post":{"operationId":"createCompanyWorkBreakdownStructureSegment","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_Segment"}}}}},"summary":"Create a company WBS segment","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/work_breakdown_structure/segments/{id}":{"delete":{"description":"Requires wbs:write and company administrator access in the authenticated company. Deletes a shared company segment. Deletes the segment and its items. Deletion is blocked if an assembled WBS code uses any of its items or the retained hierarchy is invalid.","operationId":"deleteCompanyWorkBreakdownStructureSegment","parameters":[{"description":"Id of the authenticated company.","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"WBS segment id.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted successfully. The response body is empty."},"401":{"$ref":"#/components/responses/wbs_WbsUnauthorized"},"403":{"$ref":"#/components/responses/wbs_WbsForbidden"},"404":{"$ref":"#/components/responses/wbs_WbsNotFound"},"409":{"$ref":"#/components/responses/wbs_WbsDeleteConflict"},"429":{"$ref":"#/components/responses/wbs_WbsRateLimited"},"500":{"$ref":"#/components/responses/wbs_WbsInternalError"},"503":{"$ref":"#/components/responses/wbs_WbsAuthUnavailable"}},"summary":"Delete a company WBS segment","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false},"get":{"operationId":"getCompanyWorkBreakdownStructureSegment","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_Segment"}}}}},"summary":"Show a company WBS segment","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"patch":{"operationId":"updateCompanyWorkBreakdownStructureSegment","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_Segment"}}}}},"summary":"Update a company WBS segment","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/work_breakdown_structure/segments/{id}/segment_items":{"get":{"operationId":"listCompanyWorkBreakdownStructureSegmentSegmentItems","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/wbs_SegmentItem"},"type":"array"}}}}},"summary":"List company segment items","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"post":{"operationId":"createCompanyWorkBreakdownStructureSegmentSegmentItem","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_SegmentItem"}}}}},"summary":"Create a company segment item","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/companies/{company_id}/work_breakdown_structure/segments/{id}/segment_items/{item_id}":{"delete":{"description":"Requires wbs:write and company administrator access in the authenticated company. Applies to a shared company segment. Deletes this item and its descendants. Deletion is blocked if an assembled WBS code uses an item in this subtree or the retained hierarchy is invalid.","operationId":"deleteCompanyWorkBreakdownStructureSegmentSegmentItem","parameters":[{"description":"Id of the authenticated company.","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"WBS segment id.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"WBS segment item id within the segment.","in":"path","name":"item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted successfully. The response body is empty."},"401":{"$ref":"#/components/responses/wbs_WbsUnauthorized"},"403":{"$ref":"#/components/responses/wbs_WbsForbidden"},"404":{"$ref":"#/components/responses/wbs_WbsNotFound"},"409":{"$ref":"#/components/responses/wbs_WbsDeleteConflict"},"429":{"$ref":"#/components/responses/wbs_WbsRateLimited"},"500":{"$ref":"#/components/responses/wbs_WbsInternalError"},"503":{"$ref":"#/components/responses/wbs_WbsAuthUnavailable"}},"summary":"Delete a company WBS segment item","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false},"get":{"description":"Requires wbs:read for the authenticated company. The item must belong to the specified shared company segment.","operationId":"getCompanyWorkBreakdownStructureSegmentSegmentItem","parameters":[{"description":"Id of the authenticated company.","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"WBS segment id.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"WBS segment item id within the segment.","in":"path","name":"item_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_SegmentItem"}}},"description":"The segment item and its ancestry."},"401":{"$ref":"#/components/responses/wbs_WbsUnauthorized"},"403":{"$ref":"#/components/responses/wbs_WbsForbidden"},"404":{"$ref":"#/components/responses/wbs_WbsNotFound"},"429":{"$ref":"#/components/responses/wbs_WbsRateLimited"},"500":{"$ref":"#/components/responses/wbs_WbsInternalError"},"503":{"$ref":"#/components/responses/wbs_WbsAuthUnavailable"}},"summary":"Show a company WBS segment item","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"patch":{"description":"Requires wbs:write and company administrator access in the authenticated company. Updates fields supplied under segment_item in a shared company segment. A parent must belong to the same tiered segment and preserve an acyclic hierarchy. Set parent_id to null to make the item a root.","operationId":"updateCompanyWorkBreakdownStructureSegmentSegmentItem","parameters":[{"description":"Id of the authenticated company.","in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"WBS segment id.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"WBS segment item id within the segment.","in":"path","name":"item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_CompanySegmentItemUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_SegmentItem"}}},"description":"The segment item and its ancestry."},"400":{"$ref":"#/components/responses/wbs_WbsBadRequest"},"401":{"$ref":"#/components/responses/wbs_WbsUnauthorized"},"403":{"$ref":"#/components/responses/wbs_WbsForbidden"},"404":{"$ref":"#/components/responses/wbs_WbsNotFound"},"422":{"$ref":"#/components/responses/wbs_WbsInvalidInput"},"429":{"$ref":"#/components/responses/wbs_WbsRateLimited"},"500":{"$ref":"#/components/responses/wbs_WbsInternalError"},"503":{"$ref":"#/components/responses/wbs_WbsAuthUnavailable"}},"summary":"Update a company WBS segment item","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/coordination_issues":{"get":{"operationId":"listCoordinationIssues","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/coordination_issues_CoordinationIssueListItem"},"type":"array"}}}}},"summary":"GET /rest/v1.0/coordination_issues","tags":["coordination_issues"],"x-os-idempotent":false,"x-os-module":"coordination_issues","x-os-paginated":false},"post":{"operationId":"createCoordinationIssue","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/coordination_issues_CoordinationIssueShow"}}}}},"summary":"POST /rest/v1.0/coordination_issues","tags":["coordination_issues"],"x-os-idempotent":true,"x-os-module":"coordination_issues","x-os-paginated":false}},"/rest/v1.0/coordination_issues/assignees":{"get":{"operationId":"listCoordinationIssuesAssignees","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/coordination_issues_LoginInformation"},"type":"array"}}}}},"summary":"GET /rest/v1.0/coordination_issues/assignees","tags":["coordination_issues"],"x-os-idempotent":false,"x-os-module":"coordination_issues","x-os-paginated":false}},"/rest/v1.0/coordination_issues/filter_options/status":{"get":{"operationId":"listCoordinationIssuesFilterOptionsStatus","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/coordination_issues_StatusOption"},"type":"array"}}}}},"summary":"GET /rest/v1.0/coordination_issues/filter_options/status","tags":["coordination_issues"],"x-os-idempotent":false,"x-os-module":"coordination_issues","x-os-paginated":false}},"/rest/v1.0/coordination_issues/recycle_bin":{"get":{"operationId":"listCoordinationIssuesRecycleBin","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/coordination_issues_CoordinationIssueListItem"},"type":"array"}}}}},"summary":"GET /rest/v1.0/coordination_issues/recycle_bin","tags":["coordination_issues"],"x-os-idempotent":false,"x-os-module":"coordination_issues","x-os-paginated":false}},"/rest/v1.0/coordination_issues/recycle_bin/{id}":{"get":{"operationId":"getCoordinationIssuesRecycleBin","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Get recycled coordination issue","tags":["coordination_issues"],"x-os-idempotent":false,"x-os-module":"coordination_issues","x-os-paginated":false},"patch":{"description":"Restore from recycle bin (200 show).","operationId":"updateCoordinationIssuesRecycleBin","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Restore coordination issue from the recycle bin","tags":["coordination_issues"],"x-os-idempotent":false,"x-os-module":"coordination_issues","x-os-paginated":false}},"/rest/v1.0/coordination_issues/status_count":{"get":{"description":"Requires the `view` permission on the project's coordination issues tool. A scoped API token needs `coordination_issues:read`.","operationId":"listCoordinationIssuesStatusCount","parameters":[{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."}},"summary":"Count coordination issues by status","tags":["coordination_issues"],"x-os-idempotent":false,"x-os-module":"coordination_issues","x-os-paginated":false}},"/rest/v1.0/coordination_issues/{coordination_issue_id}/comments":{"get":{"operationId":"listCoordinationIssueComments","parameters":[{"in":"path","name":"coordination_issue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/coordination_issues_Comment"},"type":"array"}}}}},"summary":"GET /rest/v1.0/coordination_issues/{coordination_issue_id}/comments","tags":["coordination_issues"],"x-os-idempotent":false,"x-os-module":"coordination_issues","x-os-paginated":false},"post":{"operationId":"createCoordinationIssueComment","parameters":[{"in":"path","name":"coordination_issue_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/coordination_issues_Comment"}}}}},"summary":"POST /rest/v1.0/coordination_issues/{coordination_issue_id}/comments","tags":["coordination_issues"],"x-os-idempotent":false,"x-os-module":"coordination_issues","x-os-paginated":false}},"/rest/v1.0/coordination_issues/{id}":{"delete":{"operationId":"deleteCoordinationIssue","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete coordination issue","tags":["coordination_issues"],"x-os-idempotent":false,"x-os-module":"coordination_issues","x-os-paginated":false},"get":{"operationId":"getCoordinationIssue","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/coordination_issues_CoordinationIssueShow"}}}}},"summary":"GET /rest/v1.0/coordination_issues/{id}","tags":["coordination_issues"],"x-os-idempotent":false,"x-os-module":"coordination_issues","x-os-paginated":false},"patch":{"operationId":"updateCoordinationIssue","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/coordination_issues_CoordinationIssueShow"}}}}},"summary":"PATCH /rest/v1.0/coordination_issues/{id}","tags":["coordination_issues"],"x-os-idempotent":true,"x-os-module":"coordination_issues","x-os-paginated":false}},"/rest/v1.0/coordination_issues/{id}/attachments":{"post":{"operationId":"createCoordinationIssueAttachment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Upload coordination issue attachment","tags":["coordination_issues"],"x-os-idempotent":false,"x-os-module":"coordination_issues","x-os-paginated":false}},"/rest/v1.0/drawing_areas/{drawing_area_id}/drawings":{"get":{"operationId":"listDrawingAreaDrawings","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"drawing_area_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"current_revision":{"nullable":true,"properties":{"floorplan":{"type":"boolean"},"has_drawing_sketches":{"type":"boolean"},"id":{"type":"integer"},"large_thumbnail_url":{"type":"string"},"pdf_size":{"type":"integer"},"pdf_url":{"type":"string"},"png_size":{"type":"integer"},"png_url":{"type":"string"},"revision_number":{"type":"string"},"thumbnail_url":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"discipline":{"type":"string"},"drawing_discipline_id":{"type":"integer"},"drawing_number":{"type":"string"},"id":{"type":"integer"},"number":{"type":"string"},"obsolete":{"type":"boolean"},"sheet_number":{"nullable":true,"type":"integer"},"title":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List drawings","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":true},"post":{"description":"Alias of `POST /rest/v1.1/drawing_areas/{drawing_area_id}/drawings`, with the same behaviour.","operationId":"createDrawingAreaDrawing","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"drawing_area_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create drawing area drawing","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/drawing_areas/{drawing_area_id}/drawings/{id}":{"get":{"description":"Alias of `GET /rest/v1.1/drawing_areas/{drawing_area_id}/drawings/{id}`, with the same behaviour. Requires the `view` permission on the project's drawings tool. A scoped API token needs `drawings:read`.","operationId":"getDrawingAreaDrawing","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"drawing_area_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"drawing":{"properties":{"drawing_area_id":{"anyOf":[{"exclusiveMinimum":0,"type":"integer"},{"type":"null"}]},"drawing_discipline":{"properties":{"name":{"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"drawing_discipline_id":{"exclusiveMinimum":0,"type":"integer"},"number":{"minLength":1,"type":"string"},"obsolete":{"type":"boolean"},"ordered_revision_ids":{"items":{"exclusiveMinimum":0,"type":"integer"},"type":"array"},"sheet_number":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"title":{"type":["string","null"]}},"type":"object"}},"required":["drawing"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"Get drawing area drawing","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false},"patch":{"operationId":"updateDrawingAreaDrawing","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"drawing_area_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"drawing":{"properties":{"drawing_discipline":{"properties":{"name":{"type":"string"}},"type":"object"},"number":{"type":"string"},"obsolete":{"type":"boolean"},"ordered_revision_ids":{"items":{"type":"integer"},"type":"array"},"sheet_number":{"nullable":true,"type":"integer"},"title":{"type":"string"}},"title":"Drawing","type":"object"}},"required":["drawing"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"discipline":{"type":"string"},"drawing_number":{"type":"string"},"id":{"type":"integer"},"number":{"type":"string"},"obsolete":{"type":"boolean"},"sheet_number":{"nullable":true,"type":"integer"},"title":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"exception":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Drawing","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/files":{"get":{"description":"Requires documents:read and the Documents view capability. Lists non-deleted project files after applying file and inherited folder ACLs. Use a small page because records include version metadata. Total counts items visible to the caller.","operationId":"listFiles","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/documents_DocumentFile"},"type":"array"}}},"description":"A page of visible document files.","headers":{"Link":{"description":"Page-navigation links for the request.","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size.","schema":{"maximum":1000,"minimum":1,"type":"integer"}},"Total":{"description":"Count of visible files.","schema":{"minimum":0,"type":"integer"}}}},"400":{"$ref":"#/components/responses/documents_BadRequest"},"401":{"$ref":"#/components/responses/documents_Unauthorized"},"403":{"$ref":"#/components/responses/documents_Forbidden"},"404":{"$ref":"#/components/responses/documents_NotFound"},"429":{"$ref":"#/components/responses/documents_RateLimited"}},"summary":"List files visible to the caller in a project","tags":["documents"],"x-os-idempotent":false,"x-os-module":"documents","x-os-paginated":true},"post":{"operationId":"createFile","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"file":{"properties":{"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"explicit_permissions":{"type":"boolean"},"is_tracked":{"default":false,"type":"boolean"},"name":{"type":"string"},"parent_id":{"type":["integer","null"]},"unique_name":{"type":"boolean"},"upload_uuid":{"type":"string"}},"type":"object"}},"required":["file"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"file":{"properties":{"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"data":{"type":"string"},"explicit_permissions":{"type":"boolean"},"is_tracked":{"default":false,"type":"boolean"},"name":{"type":"string"},"parent_id":{"type":["integer","null"]},"unique_name":{"type":"boolean"},"upload_uuid":{"type":"string"}},"type":"object"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"checked_out_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":["object","null"]},"checked_out_until":{"format":"date-time","nullable":true,"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":["object","null"]},"file_type":{"type":"string"},"file_versions":{"items":{"allOf":[{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"notes":{"nullable":true,"type":["string","null"]},"number":{"type":"integer"},"size":{"type":"integer"},"url":{"type":"string"}},"type":"object"},{"properties":{"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"prostore_file":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"}},"type":"object"},{"properties":{"file_id":{"type":"integer"}},"type":"object"}]},"type":"array"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_tracked":{"type":"boolean"},"legacy_id":{"type":["integer","null"]},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"type":["integer","null"]},"private":{"type":"boolean"},"size":{"type":"integer"},"tracked_folder":{"nullable":true,"type":["object","null"]},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create project File","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/files/{id}":{"delete":{"operationId":"deleteFile","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete project File","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false},"get":{"operationId":"getFile","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"show_latest_version_only","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"checked_out_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":["object","null"]},"checked_out_until":{"format":"date-time","nullable":true,"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":["object","null"]},"file_type":{"type":"string"},"file_versions":{"items":{"allOf":[{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"notes":{"nullable":true,"type":["string","null"]},"number":{"type":"integer"},"size":{"type":"integer"},"url":{"type":"string"}},"type":"object"},{"properties":{"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"prostore_file":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"}},"type":"object"},{"properties":{"file_id":{"type":"integer"}},"type":"object"}]},"type":"array"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_tracked":{"type":"boolean"},"legacy_id":{"type":["integer","null"]},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"type":["integer","null"]},"private":{"type":"boolean"},"size":{"type":"integer"},"tracked_folder":{"nullable":true,"type":["object","null"]},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show project File","tags":["documents"],"x-os-idempotent":false,"x-os-module":"documents","x-os-paginated":false},"patch":{"operationId":"updateFile","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"file":{"properties":{"checked_out_until":{"format":"date-time","nullable":true,"type":["string","null"]},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"explicit_permissions":{"type":"boolean"},"is_tracked":{"default":false,"type":"boolean"},"name":{"type":"string"},"parent_id":{"type":["integer","null"]},"upload_uuid":{"type":"string"}},"type":"object"}},"required":["file"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"file":{"properties":{"checked_out_until":{"format":"date-time","nullable":true,"type":["string","null"]},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"data":{"type":"string"},"explicit_permissions":{"type":"boolean"},"is_tracked":{"default":false,"type":"boolean"},"name":{"type":"string"},"parent_id":{"type":["integer","null"]},"upload_uuid":{"type":"string"}},"type":"object"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"checked_out_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":["object","null"]},"checked_out_until":{"format":"date-time","nullable":true,"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":["object","null"]},"file_type":{"type":"string"},"file_versions":{"items":{"allOf":[{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"notes":{"nullable":true,"type":["string","null"]},"number":{"type":"integer"},"size":{"type":"integer"},"url":{"type":"string"}},"type":"object"},{"properties":{"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"prostore_file":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"}},"type":"object"},{"properties":{"file_id":{"type":"integer"}},"type":"object"}]},"type":"array"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_tracked":{"type":"boolean"},"legacy_id":{"type":["integer","null"]},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"type":["integer","null"]},"private":{"type":"boolean"},"size":{"type":"integer"},"tracked_folder":{"nullable":true,"type":["object","null"]},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"error_type":{"type":"string"},"errors":{"properties":{"base":{"items":{"type":"string"},"type":"array"}},"type":"object"},"file":{"properties":{"checked_out_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":["object","null"]},"checked_out_until":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":["object","null"]},"file_type":{"type":"string"},"file_versions":{"items":{"allOf":[{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"notes":{"type":["string","null"]},"number":{"type":"integer"},"size":{"type":"integer"},"url":{"type":"string"}},"type":"object"},{"properties":{"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"prostore_file":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"}},"type":"object"},{"properties":{"file_id":{"type":"integer"}},"type":"object"}]},"type":"array"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_tracked":{"type":"boolean"},"legacy_id":{"type":["integer","null"]},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"type":["integer","null"]},"private":{"type":"boolean"},"size":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update project File","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/files/{id}/cancel_checkout":{"post":{"description":"Requires documents:write and the Documents edit capability plus file edit access. The checkout holder may cancel their own checkout. A Documents administrator may cancel another user's checkout. An unchecked file returns a conflict.","operationId":"cancelCheckoutFile","parameters":[{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Project in the authenticated company's workspace.","in":"query","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional company assertion. When supplied, it must match the authenticated company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_DocumentFile"}}},"description":"File metadata after clearing the checkout."},"400":{"$ref":"#/components/responses/documents_BadRequest"},"401":{"$ref":"#/components/responses/documents_Unauthorized"},"403":{"$ref":"#/components/responses/documents_Forbidden"},"404":{"$ref":"#/components/responses/documents_NotFound"},"409":{"$ref":"#/components/responses/documents_Conflict"},"429":{"$ref":"#/components/responses/documents_RateLimited"}},"summary":"Cancel a document checkout without creating a version","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/files/{id}/checkin":{"post":{"description":"Requires documents:write and the Documents edit capability plus file edit access. The checkout holder or a Documents administrator can check in. Omit the version source to release the checkout without a new version. A staged upload ID creates a new version under the source upload's live scope and ACL checks. An opaque direct-upload reference requires uploads:read and a configured direct-upload flow. This catalog uses the JSON request variant.","operationId":"checkinFile","parameters":[{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Project in the authenticated company's workspace.","in":"query","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional company assertion. When supplied, it must match the authenticated company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_DocumentCheckinInput"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_DocumentFile"}}},"description":"File metadata after clearing the checkout."},"400":{"$ref":"#/components/responses/documents_BadRequest"},"401":{"$ref":"#/components/responses/documents_Unauthorized"},"403":{"$ref":"#/components/responses/documents_Forbidden"},"404":{"$ref":"#/components/responses/documents_NotFound"},"409":{"$ref":"#/components/responses/documents_Conflict"},"422":{"$ref":"#/components/responses/documents_InvalidFields"},"429":{"$ref":"#/components/responses/documents_RateLimited"}},"summary":"Check in a document file with optional JSON version source","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/files/{id}/checkout":{"post":{"description":"Requires documents:write and the Documents edit capability plus file edit access. Locks the file for editing by the caller. A caller who owns the checkout can set a new expiry. A checkout held by another user conflicts.","operationId":"checkoutFile","parameters":[{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Project in the authenticated company's workspace.","in":"query","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional company assertion. When supplied, it must match the authenticated company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_DocumentCheckoutInput"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_DocumentFile"}}},"description":"File metadata with the checkout applied."},"400":{"$ref":"#/components/responses/documents_BadRequest"},"401":{"$ref":"#/components/responses/documents_Unauthorized"},"403":{"$ref":"#/components/responses/documents_Forbidden"},"404":{"$ref":"#/components/responses/documents_NotFound"},"409":{"$ref":"#/components/responses/documents_Conflict"},"422":{"$ref":"#/components/responses/documents_InvalidFields"},"429":{"$ref":"#/components/responses/documents_RateLimited"}},"summary":"Check out a document file","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/files/{id}/permissions":{"get":{"description":"Requires documents:read, the Documents view capability, and view access under the file's effective ACL. Returns the explicit grants recorded on this file. This does not expand inherited grants or compute effective access for every grantee.","operationId":"listFilePermissions","parameters":[{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Project in the authenticated company's workspace.","in":"query","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional company assertion. When supplied, it must match the authenticated company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/documents_DocumentPermission"},"type":"array"}}},"description":"Explicit permission grants."},"400":{"$ref":"#/components/responses/documents_BadRequest"},"401":{"$ref":"#/components/responses/documents_Unauthorized"},"403":{"$ref":"#/components/responses/documents_Forbidden"},"404":{"$ref":"#/components/responses/documents_NotFound"},"429":{"$ref":"#/components/responses/documents_RateLimited"}},"summary":"List explicit permission grants on a document file","tags":["documents"],"x-os-idempotent":false,"x-os-module":"documents","x-os-paginated":false},"post":{"description":"Requires documents:write and Documents administrator access on the project. The user or permission-template grantee must belong to the authenticated company. The request upserts the explicit grant for this file and grantee. It can change the effective ACL at this level.","operationId":"createFilePermission","parameters":[{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Project in the authenticated company's workspace.","in":"query","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional company assertion. When supplied, it must match the authenticated company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_DocumentPermissionInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_DocumentPermission"}}},"description":"The stored grant after creation or update."},"400":{"$ref":"#/components/responses/documents_BadRequest"},"401":{"$ref":"#/components/responses/documents_Unauthorized"},"403":{"$ref":"#/components/responses/documents_Forbidden"},"404":{"$ref":"#/components/responses/documents_NotFound"},"422":{"$ref":"#/components/responses/documents_InvalidFields"},"429":{"$ref":"#/components/responses/documents_RateLimited"}},"summary":"Create or update a permission grant on a document file","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/files/{id}/permissions/{permission_id}":{"delete":{"description":"Requires documents:write and Documents administrator access on the project. The grant must belong to this project and file. Removing a grant can cause the file to inherit permissions from an ancestor.","operationId":"deleteFilePermission","parameters":[{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"permission_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Project in the authenticated company's workspace.","in":"query","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional company assertion. When supplied, it must match the authenticated company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"description":"Grant revoked. The response body is empty."},"400":{"$ref":"#/components/responses/documents_BadRequest"},"401":{"$ref":"#/components/responses/documents_Unauthorized"},"403":{"$ref":"#/components/responses/documents_Forbidden"},"404":{"$ref":"#/components/responses/documents_NotFound"},"429":{"$ref":"#/components/responses/documents_RateLimited"}},"summary":"Revoke an explicit permission grant on a document file","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/files/{id}/restore":{"patch":{"description":"Requires documents:write and the Documents delete capability (administrator). The file returns to its original folder when that ancestry remains live. An administrator can restore it to the project root if the original ancestry is unavailable. Conflicting concurrent changes fail without a partial restore.","operationId":"restoreFile","parameters":[{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Project in the authenticated company's workspace.","in":"query","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional company assertion. When supplied, it must match the authenticated company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_DocumentFile"}}},"description":"Restored file metadata."},"400":{"$ref":"#/components/responses/documents_BadRequest"},"401":{"$ref":"#/components/responses/documents_Unauthorized"},"403":{"$ref":"#/components/responses/documents_Forbidden"},"404":{"$ref":"#/components/responses/documents_NotFound"},"409":{"$ref":"#/components/responses/documents_Conflict"},"429":{"$ref":"#/components/responses/documents_RateLimited"}},"summary":"Restore a recycled document file","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/files/{id}/versions":{"get":{"description":"Requires documents:read and the Documents view capability. The caller must also have file view access under its effective ACL. History is returned newest first without pagination. The highest version number is marked current. For a stored upload, retrieve bytes through the authorized download flow.","operationId":"listFileVersions","parameters":[{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Project in the authenticated company's workspace.","in":"query","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional company assertion. When supplied, it must match the authenticated company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/documents_DocumentVersionHistoryEntry"},"type":"array"}}},"description":"File version history."},"400":{"$ref":"#/components/responses/documents_BadRequest"},"401":{"$ref":"#/components/responses/documents_Unauthorized"},"403":{"$ref":"#/components/responses/documents_Forbidden"},"404":{"$ref":"#/components/responses/documents_NotFound"},"429":{"$ref":"#/components/responses/documents_RateLimited"}},"summary":"List version history for a document file","tags":["documents"],"x-os-idempotent":false,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/folders":{"get":{"operationId":"listFolders","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"exclude_folders","schema":{"type":"boolean"}},{"in":"query","name":"exclude_files","schema":{"type":"boolean"}},{"in":"query","name":"show_latest_file_version_only","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":["object","null"]},"files":{"items":{"properties":{"checked_out_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":["object","null"]},"checked_out_until":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":["object","null"]},"file_type":{"type":"string"},"file_versions":{"items":{"allOf":[{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"notes":{"nullable":true,"type":["string","null"]},"number":{"type":"integer"},"size":{"type":"integer"},"url":{"type":"string"}},"type":"object"},{"properties":{"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"prostore_file":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"}},"type":"object"},{"properties":{"file_id":{"type":"integer"}},"type":"object"}]},"type":"array"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_tracked":{"type":"boolean"},"legacy_id":{"type":["integer","null"]},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"type":["integer","null"]},"private":{"type":"boolean"},"size":{"type":"integer"},"tracked_folder":{"nullable":true,"type":["object","null"]},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"folders":{"items":{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":["object","null"]},"files":{"items":{"type":"object"},"type":"array"},"folders":{"items":{"type":"object"},"type":"array"},"has_children":{"type":"boolean"},"has_children_files":{"type":"boolean"},"has_children_folders":{"type":"boolean"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_recycle_bin":{"type":"boolean"},"is_tracked":{"type":"boolean"},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"type":["integer","null"]},"private":{"type":"boolean"},"read_only":{"type":"boolean"},"tracked_folder":{"nullable":true,"type":["object","null"]},"updated_at":{"format":"date-time","type":"string"}},"title":"Folder","type":"object"},"type":"array"},"has_children":{"type":"boolean"},"has_children_files":{"type":"boolean"},"has_children_folders":{"type":"boolean"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_recycle_bin":{"type":"boolean"},"is_tracked":{"type":"boolean"},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"nullable":true,"type":["integer","null"]},"private":{"type":"boolean"},"read_only":{"type":"boolean"},"tracked_folder":{"nullable":true,"type":["object","null"]},"updated_at":{"format":"date-time","type":"string"}},"title":"Folder","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List project folders and files","tags":["documents"],"x-os-idempotent":false,"x-os-module":"documents","x-os-paginated":false},"post":{"operationId":"createFolder","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"folder":{"properties":{"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"explicit_permissions":{"type":"boolean"},"is_tracked":{"default":false,"type":"boolean"},"name":{"type":"string"},"parent_id":{"type":["integer","null"]}},"required":["name"],"type":"object"}},"required":["folder"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":["object","null"]},"files":{"items":{"type":"object"},"type":"array"},"folders":{"items":{"type":"object"},"type":"array"},"has_children":{"type":"boolean"},"has_children_files":{"type":"boolean"},"has_children_folders":{"type":"boolean"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_recycle_bin":{"type":"boolean"},"is_tracked":{"type":"boolean"},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"nullable":true,"type":["integer","null"]},"private":{"type":"boolean"},"read_only":{"type":"boolean"},"tracked_folder":{"nullable":true,"type":["object","null"]},"updated_at":{"format":"date-time","type":"string"}},"title":"Folder","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Project Folder","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/folders/{id}":{"delete":{"operationId":"deleteFolder","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Project Folder","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false},"get":{"operationId":"getFolder","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"exclude_folders","schema":{"type":"boolean"}},{"in":"query","name":"exclude_files","schema":{"type":"boolean"}},{"in":"query","name":"show_latest_file_version_only","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":["object","null"]},"files":{"items":{"properties":{"checked_out_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":["object","null"]},"checked_out_until":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":["object","null"]},"file_type":{"type":"string"},"file_versions":{"items":{"allOf":[{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"notes":{"nullable":true,"type":["string","null"]},"number":{"type":"integer"},"size":{"type":"integer"},"url":{"type":"string"}},"type":"object"},{"properties":{"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"prostore_file":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"}},"type":"object"},{"properties":{"file_id":{"type":"integer"}},"type":"object"}]},"type":"array"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_tracked":{"type":"boolean"},"legacy_id":{"type":["integer","null"]},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"type":["integer","null"]},"private":{"type":"boolean"},"size":{"type":"integer"},"tracked_folder":{"nullable":true,"type":["object","null"]},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"folders":{"items":{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":["object","null"]},"files":{"items":{"type":"object"},"type":"array"},"folders":{"items":{"type":"object"},"type":"array"},"has_children":{"type":"boolean"},"has_children_files":{"type":"boolean"},"has_children_folders":{"type":"boolean"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_recycle_bin":{"type":"boolean"},"is_tracked":{"type":"boolean"},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"type":["integer","null"]},"private":{"type":"boolean"},"read_only":{"type":"boolean"},"tracked_folder":{"nullable":true,"type":["object","null"]},"updated_at":{"format":"date-time","type":"string"}},"title":"Folder","type":"object"},"type":"array"},"has_children":{"type":"boolean"},"has_children_files":{"type":"boolean"},"has_children_folders":{"type":"boolean"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_recycle_bin":{"type":"boolean"},"is_tracked":{"type":"boolean"},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"nullable":true,"type":["integer","null"]},"private":{"type":"boolean"},"read_only":{"type":"boolean"},"tracked_folder":{"nullable":true,"type":["object","null"]},"updated_at":{"format":"date-time","type":"string"}},"title":"Folder","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Project Folder","tags":["documents"],"x-os-idempotent":false,"x-os-module":"documents","x-os-paginated":false},"patch":{"operationId":"updateFolder","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"folder":{"properties":{"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"explicit_permissions":{"type":"boolean"},"is_tracked":{"default":false,"type":"boolean"},"name":{"type":"string"},"parent_id":{"type":["integer","null"]}},"type":"object"}},"required":["folder"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":["object","null"]},"files":{"items":{"type":"object"},"type":"array"},"folders":{"items":{"type":"object"},"type":"array"},"has_children":{"type":"boolean"},"has_children_files":{"type":"boolean"},"has_children_folders":{"type":"boolean"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_recycle_bin":{"type":"boolean"},"is_tracked":{"type":"boolean"},"name":{"type":"string"},"name_with_path":{"type":"string"},"parent_id":{"nullable":true,"type":["integer","null"]},"private":{"type":"boolean"},"read_only":{"type":"boolean"},"tracked_folder":{"nullable":true,"type":["object","null"]},"updated_at":{"format":"date-time","type":"string"}},"title":"Folder","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Project Folder","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/folders/{id}/permissions":{"get":{"description":"Requires documents:read, the Documents view capability, and view access under the folder's effective ACL. Returns the explicit grants recorded on this folder. This does not expand inherited grants or compute effective access for every grantee.","operationId":"listFolderPermissions","parameters":[{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Project in the authenticated company's workspace.","in":"query","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional company assertion. When supplied, it must match the authenticated company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/documents_DocumentPermission"},"type":"array"}}},"description":"Explicit permission grants."},"400":{"$ref":"#/components/responses/documents_BadRequest"},"401":{"$ref":"#/components/responses/documents_Unauthorized"},"403":{"$ref":"#/components/responses/documents_Forbidden"},"404":{"$ref":"#/components/responses/documents_NotFound"},"429":{"$ref":"#/components/responses/documents_RateLimited"}},"summary":"List explicit permission grants on a document folder","tags":["documents"],"x-os-idempotent":false,"x-os-module":"documents","x-os-paginated":false},"post":{"description":"Requires documents:write and Documents administrator access on the project. The user or permission-template grantee must belong to the authenticated company. The request upserts the explicit grant for this folder and grantee. It can change the effective ACL at this level.","operationId":"createFolderPermission","parameters":[{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Project in the authenticated company's workspace.","in":"query","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional company assertion. When supplied, it must match the authenticated company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_DocumentPermissionInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_DocumentPermission"}}},"description":"The stored grant after creation or update."},"400":{"$ref":"#/components/responses/documents_BadRequest"},"401":{"$ref":"#/components/responses/documents_Unauthorized"},"403":{"$ref":"#/components/responses/documents_Forbidden"},"404":{"$ref":"#/components/responses/documents_NotFound"},"422":{"$ref":"#/components/responses/documents_InvalidFields"},"429":{"$ref":"#/components/responses/documents_RateLimited"}},"summary":"Create or update a permission grant on a document folder","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/folders/{id}/permissions/{permission_id}":{"delete":{"description":"Requires documents:write and Documents administrator access on the project. The grant must belong to this project and folder. Removing a grant can cause the folder to inherit permissions from an ancestor.","operationId":"deleteFolderPermission","parameters":[{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"permission_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Project in the authenticated company's workspace.","in":"query","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional company assertion. When supplied, it must match the authenticated company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"description":"Grant revoked. The response body is empty."},"400":{"$ref":"#/components/responses/documents_BadRequest"},"401":{"$ref":"#/components/responses/documents_Unauthorized"},"403":{"$ref":"#/components/responses/documents_Forbidden"},"404":{"$ref":"#/components/responses/documents_NotFound"},"429":{"$ref":"#/components/responses/documents_RateLimited"}},"summary":"Revoke an explicit permission grant on a document folder","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/folders/{id}/restore":{"patch":{"description":"Requires documents:write and the Documents delete capability (administrator). Restores the folder and its recycled descendants as one operation. An administrator can restore it to the project root if its original ancestry is unavailable. A subtree above the 10,000-folder safety cap returns a conflict. Conflicting concurrent changes fail without a partial restore.","operationId":"restoreFolder","parameters":[{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Project in the authenticated company's workspace.","in":"query","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional company assertion. When supplied, it must match the authenticated company.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documents_DocumentFolder"}}},"description":"Restored folder metadata."},"400":{"$ref":"#/components/responses/documents_BadRequest"},"401":{"$ref":"#/components/responses/documents_Unauthorized"},"403":{"$ref":"#/components/responses/documents_Forbidden"},"404":{"$ref":"#/components/responses/documents_NotFound"},"409":{"$ref":"#/components/responses/documents_Conflict"},"429":{"$ref":"#/components/responses/documents_RateLimited"}},"summary":"Restore a recycled document folder","tags":["documents"],"x-os-idempotent":true,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/image_categories":{"get":{"operationId":"listImageCategories","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"count":{"type":"integer"},"cover_photo":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"links":{"properties":{"delete":{"type":"string"},"show":{"type":"string"},"update":{"type":"string"}},"type":"object"},"name":{"type":"string"},"position":{"type":"integer"},"private":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"}},"title":"ImageCategory","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List image categories","tags":["photos"],"x-os-idempotent":false,"x-os-module":"photos","x-os-paginated":true},"post":{"operationId":"createImageCategory","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"image_category":{"properties":{"album_cover_id":{"type":"integer"},"name":{"type":"string"},"private":{"default":false,"type":"boolean"}},"required":["name"],"title":"ImageCategory","type":"object"}},"required":["image_category"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"album_cover_id":{"nullable":true,"type":"integer"},"count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"},"private":{"type":"boolean"}},"title":"ImageCategory","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create image category","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/image_categories/ids_with_images":{"get":{"operationId":"listImageCategoriesIdsWithImages","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"integer"},"type":"array"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Image Category IDs That Contain Images","tags":["photos"],"x-os-idempotent":false,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/image_categories/{id}":{"delete":{"description":"Delete an empty album (project_id query parameter required). An album that still holds photos returns 409; move or delete them first. Needs photos delete permission.","operationId":"deleteImageCategory","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."}},"summary":"Delete image category","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false},"get":{"operationId":"getImageCategory","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"album_cover_id":{"nullable":true,"type":"integer"},"count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"},"private":{"type":"boolean"}},"title":"ImageCategory","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show image category","tags":["photos"],"x-os-idempotent":false,"x-os-module":"photos","x-os-paginated":false},"patch":{"operationId":"updateImageCategory","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"image_category":{"properties":{"album_cover_id":{"type":"integer"},"name":{"type":"string"},"private":{"default":false,"type":"boolean"}},"required":["name"],"title":"ImageCategory","type":"object"}},"required":["image_category"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"album_cover_id":{"nullable":true,"type":"integer"},"count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"},"private":{"type":"boolean"}},"title":"ImageCategory","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update image category","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/image_tags":{"get":{"description":"Requires photos:read and Photos view permission in the specified project. Returns the project's live tag catalog. Usage counts include photos visible to the caller. Set in_use=true to limit results to tags with visible assignments.","operationId":"listImageTags","parameters":[{"description":"Project id in the authenticated company.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Include only tags assigned to a currently visible photo.","in":"query","name":"in_use","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/photos_PhotoMetadataTagWithCount"},"type":"array"}}},"description":"The matching tags in name order, with current usage counts for visible photos."},"400":{"$ref":"#/components/responses/photos_PhotoMetadataBadRequest"},"401":{"$ref":"#/components/responses/photos_PhotoMetadataUnauthorized"},"403":{"$ref":"#/components/responses/photos_PhotoMetadataForbidden"},"404":{"$ref":"#/components/responses/photos_PhotoMetadataNotFound"},"429":{"$ref":"#/components/responses/photos_PhotoMetadataRateLimited"},"500":{"$ref":"#/components/responses/photos_PhotoMetadataInternalError"},"503":{"$ref":"#/components/responses/photos_PhotoMetadataAuthUnavailable"}},"summary":"List catalog tags for a project","tags":["photos"],"x-os-idempotent":false,"x-os-module":"photos","x-os-paginated":false},"post":{"description":"Requires photos:write and Photos create permission in the specified project. Finds or creates a project catalog tag using a case-insensitive name match. An existing tag retains its color.","operationId":"createImageTag","parameters":[{"description":"Project id in the authenticated company.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataTagCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataTag"}}},"description":"The created or matching live catalog tag."},"400":{"$ref":"#/components/responses/photos_PhotoMetadataBadRequest"},"401":{"$ref":"#/components/responses/photos_PhotoMetadataUnauthorized"},"403":{"$ref":"#/components/responses/photos_PhotoMetadataForbidden"},"404":{"$ref":"#/components/responses/photos_PhotoMetadataNotFound"},"422":{"$ref":"#/components/responses/photos_PhotoMetadataInvalidBody"},"429":{"$ref":"#/components/responses/photos_PhotoMetadataRateLimited"},"500":{"$ref":"#/components/responses/photos_PhotoMetadataInternalError"},"503":{"$ref":"#/components/responses/photos_PhotoMetadataAuthUnavailable"}},"summary":"Create or find a project photo tag","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/image_tags/available_tags":{"get":{"description":"Requires photos:read and Photos view permission in the specified project. Includes a live catalog tag when at least one photo currently visible to the caller uses it.","operationId":"listImageTagsAvailableTags","parameters":[{"description":"Project id in the authenticated company.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/photos_PhotoMetadataTagWithCount"},"type":"array"}}},"description":"The matching tags in name order, with current usage counts for visible photos."},"400":{"$ref":"#/components/responses/photos_PhotoMetadataBadRequest"},"401":{"$ref":"#/components/responses/photos_PhotoMetadataUnauthorized"},"403":{"$ref":"#/components/responses/photos_PhotoMetadataForbidden"},"404":{"$ref":"#/components/responses/photos_PhotoMetadataNotFound"},"429":{"$ref":"#/components/responses/photos_PhotoMetadataRateLimited"},"500":{"$ref":"#/components/responses/photos_PhotoMetadataInternalError"},"503":{"$ref":"#/components/responses/photos_PhotoMetadataAuthUnavailable"}},"summary":"List project photo tags with visible assignments","tags":["photos"],"x-os-idempotent":false,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/image_tags/{id}":{"delete":{"description":"Requires photos:write and Photos delete permission in the specified project. Soft-deletes a live catalog tag in the project and removes its assignments across project photos, including private or deleted photos.","operationId":"deleteImageTag","parameters":[{"description":"Project id in the authenticated company.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Live photo tag id in the specified project.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataDeleteResult"}}},"description":"The deleted catalog tag id."},"400":{"$ref":"#/components/responses/photos_PhotoMetadataBadRequest"},"401":{"$ref":"#/components/responses/photos_PhotoMetadataUnauthorized"},"403":{"$ref":"#/components/responses/photos_PhotoMetadataForbidden"},"404":{"$ref":"#/components/responses/photos_PhotoMetadataNotFound"},"429":{"$ref":"#/components/responses/photos_PhotoMetadataRateLimited"},"500":{"$ref":"#/components/responses/photos_PhotoMetadataInternalError"},"503":{"$ref":"#/components/responses/photos_PhotoMetadataAuthUnavailable"}},"summary":"Delete a project photo tag","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/images":{"get":{"operationId":"listImages","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"image_category_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"filters[log_date]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[private]","schema":{"default":false,"type":"boolean"}},{"in":"query","name":"filters[starred]","schema":{"default":false,"type":"boolean"}},{"explode":false,"in":"query","name":"filters[location_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[include_sublocations]","schema":{"default":false,"type":"boolean"}},{"explode":false,"in":"query","name":"filters[trade_ids]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[projection]","required":false,"schema":{"enum":["360","regular"],"type":"string"}},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[uploader_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"sort","schema":{"enum":["deleted_at","created_at","exposure_date","taken_at","most_recent"],"type":"string"}},{"in":"query","name":"serializer_view","required":false,"schema":{"enum":["normal","android","mobile","mobile_feed","prostore_file","ids_only"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"comments_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"daily_log_header_id":{"nullable":true,"type":"integer"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"filename":{"nullable":true,"type":"string"},"gps_lat":{"nullable":true,"type":"string"},"gps_long":{"nullable":true,"type":"string"},"height":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"image_category_id":{"type":"integer"},"image_category_name":{"type":"string"},"image_category_private":{"type":"boolean"},"links":{"properties":{"delete":{"type":"string"},"permanentlyDelete":{"type":"string"},"retrieve":{"type":"string"},"self":{"type":"string"},"update":{"type":"string"}},"title":"Links","type":"object"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"origin_id":{"nullable":true,"type":"integer"},"permanently_deleted":{"type":"boolean"},"private":{"type":"boolean"},"projection":{"enum":["unknown","regular","360"],"type":"string"},"size":{"nullable":true,"type":"integer"},"starred":{"type":"boolean"},"taken_at":{"format":"date-time","nullable":true,"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"uploader":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"url":{"nullable":true,"type":"string"},"width":{"nullable":true,"type":"integer"}},"title":"Image","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List images","tags":["photos"],"x-os-idempotent":false,"x-os-module":"photos","x-os-paginated":true},"post":{"operationId":"createImage","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"image":{"properties":{"daily_log_segment_id":{"nullable":true,"type":"integer"},"image_category_id":{"type":"integer"},"location_id":{"type":"integer"},"log_date":{"type":"string"},"mt_location":{"items":{"type":"string"},"type":"array"},"private":{"type":"boolean"},"provider_id":{"type":"integer"},"provider_type":{"type":"string"},"source":{"type":"string"},"starred":{"type":"boolean"},"trade_ids":{"items":{"type":"integer"},"type":"array"}},"title":"Image","type":"object"},"image_name":{"type":"string"},"source_image_id":{"type":"integer"},"upload_uuid":{"type":"string"}},"required":["image"],"title":"Body","type":"object"}},"multipart/form-data":{"schema":{"properties":{"image":{"properties":{"daily_log_segment_id":{"nullable":true,"type":"integer"},"data":{"format":"binary","type":"string"},"image_category_id":{"type":"integer"},"location_id":{"type":"integer"},"log_date":{"type":"string"},"mt_location":{"items":{"type":"string"},"type":"array"},"private":{"type":"boolean"},"provider_id":{"type":"integer"},"provider_type":{"type":"string"},"source":{"type":"string"},"starred":{"type":"boolean"},"trade_ids":{"items":{"type":"integer"},"type":"array"}},"title":"Image","type":"object"},"image_name":{"type":"string"},"source_image_id":{"type":"integer"},"upload_uuid":{"type":"string"}},"required":["image"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"comments_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"daily_log_header_id":{"nullable":true,"type":"integer"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"filename":{"nullable":true,"type":"string"},"gps_lat":{"nullable":true,"type":"string"},"gps_long":{"nullable":true,"type":"string"},"height":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"image_category_id":{"type":"integer"},"image_category_name":{"type":"string"},"image_category_private":{"type":"boolean"},"links":{"properties":{"delete":{"type":"string"},"permanentlyDelete":{"type":"string"},"retrieve":{"type":"string"},"self":{"type":"string"},"update":{"type":"string"}},"title":"Links","type":"object"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"origin_id":{"nullable":true,"type":"integer"},"permanently_deleted":{"type":"boolean"},"private":{"type":"boolean"},"projection":{"enum":["unknown","regular","360"],"type":"string"},"size":{"nullable":true,"type":"integer"},"starred":{"type":"boolean"},"taken_at":{"format":"date-time","nullable":true,"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"uploader":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"url":{"nullable":true,"type":"string"},"width":{"nullable":true,"type":"integer"}},"title":"Image","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create image","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/images/{id}":{"delete":{"operationId":"deleteImage","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"permanent","required":false,"schema":{"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete image","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false},"get":{"operationId":"getImage","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"comments_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"daily_log_header_id":{"nullable":true,"type":"integer"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"filename":{"nullable":true,"type":"string"},"gps_lat":{"nullable":true,"type":"string"},"gps_long":{"nullable":true,"type":"string"},"height":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"image_category_id":{"type":"integer"},"image_category_name":{"type":"string"},"image_category_private":{"type":"boolean"},"links":{"properties":{"delete":{"type":"string"},"permanentlyDelete":{"type":"string"},"retrieve":{"type":"string"},"self":{"type":"string"},"update":{"type":"string"}},"title":"Links","type":"object"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"origin_id":{"nullable":true,"type":"integer"},"permanently_deleted":{"type":"boolean"},"private":{"type":"boolean"},"projection":{"enum":["unknown","regular","360"],"type":"string"},"size":{"nullable":true,"type":"integer"},"starred":{"type":"boolean"},"taken_at":{"format":"date-time","nullable":true,"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"uploader":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"url":{"nullable":true,"type":"string"},"width":{"nullable":true,"type":"integer"}},"title":"Image","type":"object"},{"properties":{"tiles_config":{"nullable":true,"properties":{"cube_resolution":{"type":"integer"},"extension":{"type":"string"},"id":{"type":"integer"},"max_zoom_level":{"type":"integer"},"path_pattern":{"type":"string"},"tile_resolution":{"type":"integer"}},"title":"Image Tiles Config","type":"object"},"tiling_status":{"enum":["not_tiled","pending","processing","tiled","failed"],"type":"string"}},"type":"object"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show image","tags":["photos"],"x-os-idempotent":false,"x-os-module":"photos","x-os-paginated":false},"patch":{"operationId":"updateImage","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"image":{"properties":{"daily_log_segment_id":{"nullable":true,"type":"integer"},"image_category_id":{"type":"integer"},"location_id":{"type":"integer"},"log_date":{"type":"string"},"mt_location":{"items":{"type":"string"},"type":"array"},"private":{"type":"boolean"},"starred":{"type":"boolean"},"trade_ids":{"items":{"type":"integer"},"type":"array"}},"title":"Image","type":"object"}},"required":["image"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"comments_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"daily_log_header_id":{"nullable":true,"type":"integer"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"filename":{"nullable":true,"type":"string"},"gps_lat":{"nullable":true,"type":"string"},"gps_long":{"nullable":true,"type":"string"},"height":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"image_category_id":{"type":"integer"},"image_category_name":{"type":"string"},"image_category_private":{"type":"boolean"},"links":{"properties":{"delete":{"type":"string"},"permanentlyDelete":{"type":"string"},"retrieve":{"type":"string"},"self":{"type":"string"},"update":{"type":"string"}},"title":"Links","type":"object"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"origin_id":{"nullable":true,"type":"integer"},"permanently_deleted":{"type":"boolean"},"private":{"type":"boolean"},"projection":{"enum":["unknown","regular","360"],"type":"string"},"size":{"nullable":true,"type":"integer"},"starred":{"type":"boolean"},"taken_at":{"format":"date-time","nullable":true,"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"uploader":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"url":{"nullable":true,"type":"string"},"width":{"nullable":true,"type":"integer"}},"title":"Image","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update image","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/images/{id}/annotations":{"get":{"operationId":"listImageAnnotations","parameters":[{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"image_id":{"type":"integer"},"note":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"x":{"nullable":true,"type":"number"},"y":{"nullable":true,"type":"number"}},"required":["id","image_id","note","created_at","updated_at"],"title":"PhotoAnnotation","type":"object"},"type":"array"}}}}},"summary":"List photo annotations (markup)","tags":["photos"],"x-os-idempotent":false,"x-os-module":"photos","x-os-paginated":false},"post":{"operationId":"createImageAnnotation","parameters":[{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"annotation":{"properties":{"note":{"type":"string"},"x":{"nullable":true,"type":"number"},"y":{"nullable":true,"type":"number"}},"required":["note"],"type":"object"}},"required":["annotation"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"image_id":{"type":"integer"},"note":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"x":{"nullable":true,"type":"number"},"y":{"nullable":true,"type":"number"}},"required":["id","image_id","note","created_at","updated_at"],"title":"PhotoAnnotation","type":"object"}}}}},"summary":"Create a photo annotation (markup)","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/images/{id}/annotations/{annotation_id}":{"delete":{"operationId":"deleteImageAnnotation","parameters":[{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"annotation_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"}},"required":["id"],"type":"object"}}}}},"summary":"Delete a photo annotation","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/images/{id}/comments":{"get":{"description":"Requires photos:read and Photos view permission in the specified project. The photo and its album must be visible to the caller. Private photos or albums require Photos admin access. Returns live comments in chronological order, with ascending id breaking timestamp ties.","operationId":"listImageComments","parameters":[{"description":"Project id in the authenticated company.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Photo id in the project.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"One-based comment page number.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Requested comment page size.","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/photos_PhotoMetadataComment"},"type":"array"}}},"description":"A page of the photo's comment thread.","headers":{"Link":{"description":"Page navigation links for this comment thread.","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size.","schema":{"maximum":1000,"minimum":1,"type":"integer"}},"Total":{"description":"Number of live comments before pagination.","schema":{"minimum":0,"type":"integer"}}}},"400":{"$ref":"#/components/responses/photos_PhotoMetadataBadRequest"},"401":{"$ref":"#/components/responses/photos_PhotoMetadataUnauthorized"},"403":{"$ref":"#/components/responses/photos_PhotoMetadataForbidden"},"404":{"$ref":"#/components/responses/photos_PhotoMetadataNotFound"},"429":{"$ref":"#/components/responses/photos_PhotoMetadataRateLimited"},"500":{"$ref":"#/components/responses/photos_PhotoMetadataInternalError"},"503":{"$ref":"#/components/responses/photos_PhotoMetadataAuthUnavailable"}},"summary":"List comments on a photo","tags":["photos"],"x-os-idempotent":false,"x-os-module":"photos","x-os-paginated":true},"post":{"description":"Requires photos:write and Photos edit permission in the specified project. The photo and its album must be visible to the caller. Private photos or albums require Photos admin access. Creates a comment authored by the authenticated caller.","operationId":"createImageComment","parameters":[{"description":"Project id in the authenticated company.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Photo id in the project.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataCommentCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataComment"}}},"description":"The new comment."},"400":{"$ref":"#/components/responses/photos_PhotoMetadataBadRequest"},"401":{"$ref":"#/components/responses/photos_PhotoMetadataUnauthorized"},"403":{"$ref":"#/components/responses/photos_PhotoMetadataForbidden"},"404":{"$ref":"#/components/responses/photos_PhotoMetadataNotFound"},"422":{"$ref":"#/components/responses/photos_PhotoMetadataInvalidBody"},"429":{"$ref":"#/components/responses/photos_PhotoMetadataRateLimited"},"500":{"$ref":"#/components/responses/photos_PhotoMetadataInternalError"},"503":{"$ref":"#/components/responses/photos_PhotoMetadataAuthUnavailable"}},"summary":"Add a comment to a photo","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/images/{id}/comments/{comment_id}":{"delete":{"description":"Requires photos:write and Photos delete permission in the specified project. The photo and its album must be visible to the caller. Private photos or albums require Photos admin access. Soft-deletes a live comment on the specified photo.","operationId":"deleteImageComment","parameters":[{"description":"Project id in the authenticated company.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Photo id in the project.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Live comment id on the specified photo.","in":"path","name":"comment_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataDeleteResult"}}},"description":"The deleted comment id."},"400":{"$ref":"#/components/responses/photos_PhotoMetadataBadRequest"},"401":{"$ref":"#/components/responses/photos_PhotoMetadataUnauthorized"},"403":{"$ref":"#/components/responses/photos_PhotoMetadataForbidden"},"404":{"$ref":"#/components/responses/photos_PhotoMetadataNotFound"},"429":{"$ref":"#/components/responses/photos_PhotoMetadataRateLimited"},"500":{"$ref":"#/components/responses/photos_PhotoMetadataInternalError"},"503":{"$ref":"#/components/responses/photos_PhotoMetadataAuthUnavailable"}},"summary":"Delete a photo comment","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/images/{id}/tags":{"get":{"description":"Requires photos:read and Photos view permission in the specified project. The photo and its album must be visible to the caller. Private photos or albums require Photos admin access.","operationId":"listImageTagsGet","parameters":[{"description":"Project id in the authenticated company.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Photo id in the project.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/photos_PhotoMetadataTag"},"type":"array"}}},"description":"The photo's current tags, ordered by name."},"400":{"$ref":"#/components/responses/photos_PhotoMetadataBadRequest"},"401":{"$ref":"#/components/responses/photos_PhotoMetadataUnauthorized"},"403":{"$ref":"#/components/responses/photos_PhotoMetadataForbidden"},"404":{"$ref":"#/components/responses/photos_PhotoMetadataNotFound"},"429":{"$ref":"#/components/responses/photos_PhotoMetadataRateLimited"},"500":{"$ref":"#/components/responses/photos_PhotoMetadataInternalError"},"503":{"$ref":"#/components/responses/photos_PhotoMetadataAuthUnavailable"}},"summary":"List tags assigned to a photo","tags":["photos"],"x-os-idempotent":false,"x-os-module":"photos","x-os-paginated":false},"post":{"description":"Requires photos:write and Photos edit permission in the specified project. The photo and its album must be visible to the caller. Private photos or albums require Photos admin access. Specify a live tag id in the project or provide a name to find or create the tag. A supplied id takes precedence. Repeating an assignment preserves a single link.","operationId":"createImageTagPost","parameters":[{"description":"Project id in the authenticated company.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Photo id in the project.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/photos_PhotoMetadataTagAssign"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/photos_PhotoMetadataTag"},"type":"array"}}},"description":"The photo's current tags, ordered by name."},"400":{"$ref":"#/components/responses/photos_PhotoMetadataBadRequest"},"401":{"$ref":"#/components/responses/photos_PhotoMetadataUnauthorized"},"403":{"$ref":"#/components/responses/photos_PhotoMetadataForbidden"},"404":{"$ref":"#/components/responses/photos_PhotoMetadataNotFound"},"422":{"$ref":"#/components/responses/photos_PhotoMetadataInvalidBody"},"429":{"$ref":"#/components/responses/photos_PhotoMetadataRateLimited"},"500":{"$ref":"#/components/responses/photos_PhotoMetadataInternalError"},"503":{"$ref":"#/components/responses/photos_PhotoMetadataAuthUnavailable"}},"summary":"Assign a tag to a photo","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/images/{id}/tags/{tag_id}":{"delete":{"description":"Requires photos:write and Photos edit permission in the specified project. The photo and its album must be visible to the caller. Private photos or albums require Photos admin access. Removes the tag from this photo and preserves the catalog tag. An already absent assignment leaves the current tag list intact.","operationId":"deleteImageTagDelete","parameters":[{"description":"Project id in the authenticated company.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Photo id in the project.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Catalog tag id to detach from the photo.","in":"path","name":"tag_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/photos_PhotoMetadataTag"},"type":"array"}}},"description":"The photo's current tags, ordered by name."},"400":{"$ref":"#/components/responses/photos_PhotoMetadataBadRequest"},"401":{"$ref":"#/components/responses/photos_PhotoMetadataUnauthorized"},"403":{"$ref":"#/components/responses/photos_PhotoMetadataForbidden"},"404":{"$ref":"#/components/responses/photos_PhotoMetadataNotFound"},"429":{"$ref":"#/components/responses/photos_PhotoMetadataRateLimited"},"500":{"$ref":"#/components/responses/photos_PhotoMetadataInternalError"},"503":{"$ref":"#/components/responses/photos_PhotoMetadataAuthUnavailable"}},"summary":"Remove a tag assignment from a photo","tags":["photos"],"x-os-idempotent":true,"x-os-module":"photos","x-os-paginated":false}},"/rest/v1.0/jobs/{id}":{"get":{"description":"Status of a single background job (tenant-scoped). Returns the serialized Job including status, progress, result, and any error. A scoped API token needs `jobs:read`.","operationId":"getJob","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Status of a single background job","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false}},"/rest/v1.0/jobs/{id}/download":{"get":{"description":"A scoped API token needs `jobs:read`.","operationId":"listJobDownload","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Download job","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false}},"/rest/v1.0/line_item_types":{"get":{"operationId":"listLineItemTypes","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/wbs_CostType"},"type":"array"}}}}},"summary":"List cost types (line item types)","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"post":{"operationId":"createLineItemType","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_CostType"}}}}},"summary":"Create a cost type","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/line_item_types/{id}":{"delete":{"operationId":"deleteLineItemType","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete line item type","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"get":{"operationId":"getLineItemType","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_CostType"}}}}},"summary":"Show a cost type","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"patch":{"operationId":"updateLineItemType","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_CostType"}}}}},"summary":"Update a cost type","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/meeting_attendee_records":{"post":{"operationId":"createMeetingAttendeeRecord","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"meeting_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"meeting_attendee_record":{"properties":{"login_information_id":{"type":"integer"},"status":{"enum":["Present","Absent","For Distribution Only","Conference"],"type":"string"}},"type":"object"}},"required":["meeting_attendee_record"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"login_information":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"meeting_id":{"type":"integer"},"status":{"enum":["Present","Absent","For Distribution Only","Conference"],"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create meeting attendee record","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.0/meeting_attendee_records/{id}":{"delete":{"operationId":"deleteMeetingAttendeeRecord","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"meeting_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete meeting attendee record","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false},"patch":{"operationId":"updateMeetingAttendeeRecord","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"meeting_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"meeting_attendee_record":{"properties":{"login_information_id":{"type":"integer"},"status":{"enum":["Present","Absent","For Distribution Only","Conference"],"type":"string"}},"type":"object"}},"required":["meeting_attendee_record"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"login_information":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"meeting_id":{"type":"integer"},"status":{"enum":["Present","Absent","For Distribution Only","Conference"],"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update meeting attendee record","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.0/meeting_categories":{"get":{"operationId":"listMeetingCategories","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"meeting_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List meeting categories","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":true},"post":{"operationId":"createMeetingCategory","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"meeting_category":{"properties":{"position":{"type":"integer"},"title":{"type":"string"}},"title":"Meeting Category","type":"object"},"meeting_id":{"type":"integer"},"project_id":{"type":"integer"}},"required":["project_id","meeting_id","meeting_category"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string"}},"type":"object"}],"properties":{"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"}}}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create meeting category","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.0/meeting_categories/{id}":{"patch":{"operationId":"updateMeetingCategory","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"meeting_category":{"properties":{"position":{"type":"integer"},"title":{"type":"string"}},"title":"Meeting Category","type":"object"},"meeting_id":{"type":"integer"},"project_id":{"type":"integer"}},"required":["project_id","meeting_id","meeting_category"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string"}},"type":"object"}],"properties":{"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"}}}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update meeting category","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.0/meeting_topics":{"post":{"deprecated":true,"description":"Create a meeting topic. Same as POST /rest/v1.1/projects/{project_id}/meeting_topics with project_id in the body.","operationId":"createMeetingTopic","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"meeting_id":{"type":"integer"},"meeting_topic":{"properties":{"added_under_agenda":{"default":true,"type":"boolean"},"assignment_ids":{"items":{"oneOf":[{"type":"integer"},{"type":"string"}]},"type":"array"},"closed_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"is_private":{"type":"boolean"},"meeting_category_id":{"type":"integer"},"meeting_wide_number":{"type":"integer"},"minutes":{"type":"string"},"priority":{"enum":["","High","Medium","Low"],"type":"string"},"status":{"enum":["Open","On Hold","Closed"],"type":"string"},"title":{"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"title":"Meeting Topic","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","meeting_id","meeting_topic"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/meetings_MeetingTopic"}}},"description":"The created topic."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Create meeting topic","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.0/meeting_topics/parent_minutes":{"get":{"deprecated":true,"description":"Minutes recorded on the same topic in earlier meetings of the series, newest ancestor first. The project comes from the meeting.","operationId":"listMeetingTopicsParentMinutes","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"meeting_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"meeting_topic_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_on":{"format":"date","type":"string"},"id":{"type":"integer"},"marked":{"type":"boolean"},"meeting_id":{"type":"integer"},"meeting_position":{"type":"integer"},"minutes":{"type":"string"},"no_minutes":{"type":"boolean"}},"type":"object"},"type":"array"}}},"description":"Ancestor minutes."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Get the minutes and date created for all parent topics","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.0/meeting_topics/{id}":{"patch":{"deprecated":true,"description":"Update a meeting topic. Same as PATCH /rest/v1.1/projects/{project_id}/meeting_topics/{id} with project_id in the body.","operationId":"updateMeetingTopic","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"meeting_id":{"type":"integer"},"meeting_topic":{"properties":{"added_under_agenda":{"default":true,"type":"boolean"},"assignment_ids":{"items":{"oneOf":[{"type":"integer"},{"type":"string"}]},"type":"array"},"closed_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"is_private":{"type":"boolean"},"meeting_category_id":{"type":"integer"},"meeting_wide_number":{"type":"integer"},"minutes":{"type":"string"},"priority":{"enum":["","High","Medium","Low"],"type":"string"},"status":{"enum":["Open","On Hold","Closed"],"type":"string"},"title":{"type":"string"}},"title":"Meeting Topic","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","meeting_topic"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/meetings_MeetingTopic"}}},"description":"The updated topic."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Update meeting topic","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.0/meetings":{"get":{"deprecated":true,"description":"Meetings of the project in project_id, grouped by series (same response as GET /rest/v1.1/projects/{project_id}/meetings). Private meetings are visible to admins, their creator and attendees. deleted_only=true lists the recycle bin.","operationId":"listMeetings","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"deleted_only","schema":{"type":"boolean"}},{"in":"query","name":"serializer_view","required":false,"schema":{"enum":["normal","extended"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/meetings_MeetingListGroup"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."}},"summary":"List meetings","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":true},"post":{"deprecated":true,"description":"Create a meeting in project_id. Same body and behaviour as POST /rest/v1.1/projects/{project_id}/meetings.","operationId":"createMeeting","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"meeting":{"$ref":"#/components/schemas/meetings_MeetingBody"},"project_id":{"type":"integer"}},"required":["project_id","meeting"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/meetings_Meeting"}}},"description":"The created meeting."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Create meeting","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.0/meetings/{id}":{"delete":{"deprecated":true,"description":"Send the meeting to the recycle bin (meetings delete permission).","operationId":"deleteMeeting","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Recycled."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Delete meeting","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false},"get":{"deprecated":true,"operationId":"getMeeting","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/meetings_Meeting"}}},"description":"The meeting."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Show meeting","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":false},"patch":{"deprecated":true,"description":"Update a meeting. Same body as PATCH /rest/v1.1/projects/{project_id}/meetings/{id}, plus project_id.","operationId":"updateMeeting","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"meeting":{"$ref":"#/components/schemas/meetings_MeetingBody"},"project_id":{"type":"integer"}},"required":["project_id","meeting"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/meetings_Meeting"}}},"description":"The updated meeting."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Update meeting","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.0/observations/assignees":{"get":{"operationId":"listObservationsAssignees","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[category_id]","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"title":"Observation Item Assignee","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Observation Assignee options","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":true}},"/rest/v1.0/observations/default_distribution":{"get":{"operationId":"listObservationsDefaultDistribution","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Observation Item Default Distribution","type":"object"},"title":"Array of Observation Distribution Members","type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Observation Default Distribution Members","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":true}},"/rest/v1.0/observations/items":{"get":{"operationId":"listObservationsItems","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[assignee_company_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[checklist_list_id]","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[location_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[assignee_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[checklist_item_id]","required":false,"schema":{"type":"integer"}},{"in":"query","name":"filters[custom_fields]","required":false,"schema":{"type":"object"}},{"explode":false,"in":"query","name":"filters[priority]","schema":{"items":{"enum":["Low","Medium","High","Urgent"],"type":"string"},"type":"array"},"style":"form"},{"in":"query","name":"filters[search]","schema":{"type":"string"}},{"explode":false,"in":"query","name":"filters[status]","schema":{"items":{"enum":[0,1,2,3,4],"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[type_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[trade_ids]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"sort","schema":{"enum":["assignee","assignee_company","contributing_behavior","contributing_condition","created_at","created_by","date_notified","due_date","hazard","location","name","number","origin","priority","specification_section","status","trade","type"],"type":"string"}},{"in":"query","name":"view","required":false,"schema":{"default":"normal","enum":["base","compact","full","ids","normal","permissions","safety_hub","web"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"assignee":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"title":"Observation Item Assignee","type":"object"},"assignees":{"items":{"properties":{"current":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"category":{"nullable":true,"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"name":{"type":"string"}},"type":"object"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_notified":{"format":"date","nullable":true,"type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_rich_text":{"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"number":{"type":"string"},"origin":{"nullable":true,"properties":{"payload":{"properties":{"bim_model_id":{"type":"integer"},"bim_model_name":{"type":"string"},"checklist_item_id":{"type":"integer"},"checklist_list_id":{"type":"integer"},"coordination_issue_id":{"type":"integer"},"coordination_issue_number":{"type":"integer"},"incident_action_id":{"type":"integer"},"incident_id":{"type":"integer"}},"title":"Origin Payload","type":"object"},"type":{"enum":["incident","bim_model","inspection","coordination_issue"],"type":"string"}},"title":"Observation origin","type":"object"},"permissions":{"nullable":true,"properties":{"can_edit":{"type":"boolean"}},"type":"object"},"personal":{"type":"boolean"},"priority":{"enum":["Low","Medium","High","Urgent"],"type":"string"},"specification_section":{"nullable":true,"properties":{"current_revision_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"number":{"type":"string"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":{"properties":{"active":{"type":"boolean"},"category":{"type":"string"},"category_id":{"deprecated":true,"type":"integer"},"category_key":{"type":"string"},"company_active":{"type":"boolean"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"kind":{"enum":["company","project"],"type":"string"},"localized_name":{"type":"string"},"name":{"type":"string"},"name_translations":{"additionalProperties":{"type":"string"},"nullable":true,"properties":{"en":{"type":"string"},"en-AU":{"type":"string"},"es":{"type":"string"},"fr-CA":{"type":"string"}},"type":"object"},"observations_category":{"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"parent_inactive":{"type":"boolean"}},"required":["id","category","name"],"title":"Observation Type","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Observation Item","type":"object"},"title":"Array of Observation Items","type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Observation Items","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":true},"post":{"operationId":"createObservationsItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","schema":{"type":"boolean"}},{"in":"query","name":"view","required":false,"schema":{"default":"normal","enum":["flat_v0","normal","safety_hub"],"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"inspection_item_failed":{"type":"integer"},"observation":{"allOf":[{"properties":{"asset_ids":{"items":{"type":"string"},"type":"array"},"assignee_id":{"type":"integer"},"assignee_ids":{"items":{"type":"integer"},"type":"array"},"checklist_item_id":{"type":"integer"},"contributing_behavior_id":{"type":"integer"},"contributing_condition_id":{"type":"integer"},"coordination_issue_id":{"type":"integer"},"created_by_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"hazard_id":{"type":"integer"},"incident_action_id":{"type":"integer"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"number":{"type":"integer"},"personal":{"type":"boolean"},"priority":{"enum":["Low","Medium","High","Urgent"],"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"specification_section_id":{"type":"integer"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"},"trade_id":{"type":"integer"},"type_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"required":["name","type_id"],"title":"Observation","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","observation"],"title":"Body","type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"format":"binary","type":"string"},"type":"array"},"inspection_item_failed":{"type":"integer"},"observation":{"properties":{"assignee_id":{"type":"integer"},"assignee_ids":{"items":{"type":"integer"},"type":"array"},"checklist_item_id":{"type":"integer"},"contributing_behavior_id":{"type":"integer"},"contributing_condition_id":{"type":"integer"},"coordination_issue_id":{"type":"integer"},"created_by_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"hazard_id":{"type":"integer"},"incident_action_id":{"type":"integer"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"number":{"type":"string"},"personal":{"type":"boolean"},"priority":{"enum":["Low","Medium","High","Urgent"],"type":"string"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"},"trade_id":{"type":"integer"},"type_id":{"type":"integer"}},"required":["name","type_id"],"title":"Observation","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","observation"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"asset_ids":{"items":{"type":"string"},"type":"array"},"assignee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Assignee's Company","type":"object"}},"title":"Observation Item assignee","type":"object"},"assignees":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Assignee's Company","type":"object"}},"type":"object"},"type":"array"},"attachments":{"items":{"oneOf":[{"properties":{"attached_to_item_id":{"type":"string"},"attached_to_item_type":{"type":"string"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"attached_to_item_id":{"nullable":true,"type":"string"},"attached_to_item_type":{"nullable":true,"type":"string"},"can_be_viewed":{"type":"boolean"},"filename":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"}]},"type":"array"},"checklist_item":{"nullable":true,"properties":{"id":{"type":"integer"}},"type":"object"},"checklist_list":{"nullable":true,"properties":{"id":{"type":"integer"}},"type":"object"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"contributing_behavior":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"created_at":{"deprecated":true,"format":"date-time","type":"string"},"global":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Contributing Behavior","type":"object"},"contributing_condition":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"created_at":{"deprecated":true,"format":"date-time","type":"string"},"global":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Contributing Condition","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"deprecated":true,"type":"string"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Creator's Company","type":"object"}},"title":"Observation Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_notified":{"format":"date","nullable":true,"type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_rich_text":{"type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"download_all_attachments_uuid":{"type":"string"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revisions":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","nullable":true,"type":"string"},"hazard":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"created_at":{"deprecated":true,"format":"date-time","type":"string"},"global":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Hazard","type":"object"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"deprecated":true,"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"deprecated":true,"type":"integer"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"number":{"type":"string"},"origin":{"properties":{"payload":{"properties":{"bim_model_id":{"type":"integer"},"bim_model_name":{"type":"string"},"checklist_item_id":{"type":"integer"},"checklist_list_id":{"type":"integer"},"coordination_issue_id":{"type":"integer"},"coordination_issue_number":{"type":"integer"},"incident_action_id":{"type":"integer"},"incident_id":{"type":"integer"},"name":{"type":"string"}},"title":"Origin Payload","type":"object"},"type":{"enum":["inspection","incident","coordination_issue","bim_model"],"type":"string"}},"title":"Observation origin","type":"object"},"personal":{"type":"boolean"},"priority":{"enum":["Low","Medium","High","Urgent"],"type":"string"},"specification_section":{"nullable":true,"properties":{"current_revision_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"number":{"deprecated":true,"type":"string"},"section":{"type":"string"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"},"trade":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":{"properties":{"active":{"deprecated":true,"type":"boolean"},"category":{"type":"string"},"category_id":{"deprecated":true,"type":"integer"},"category_key":{"type":"string"},"company_active":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"in_use":{"deprecated":true,"type":"boolean"},"kind":{"deprecated":true,"type":"string"},"localized_name":{"deprecated":true,"type":"string"},"name":{"type":"string"},"name_translations":{"additionalProperties":{"type":"string"},"nullable":true,"properties":{"en":{"type":"string"},"en-AU":{"type":"string"},"es":{"type":"string"},"fr-CA":{"type":"string"}},"type":"object"},"observations_category":{"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"parent_inactive":{"deprecated":true,"type":"boolean"}},"title":"Observation Type","type":"object"},"updated_at":{"format":"date-time","type":"string"},"viewpoint":{"properties":{"bim_file_id":{"type":"integer"},"camera_data":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"redlines_data":{"additionalProperties":true,"type":"object"},"sections_data":{"additionalProperties":true,"type":"object"},"snapshot":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"}},"title":"BIM Viewpoint","type":"object"}},"title":"Observation Item","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"items":{"type":"string"},"type":"array"},"ineligible_assignees":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"ineligible_distribution_members":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Observation Item","tags":["observations"],"x-os-idempotent":true,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/observations/items/next_available_number":{"get":{"operationId":"listObservationsItemsNextAvailableNumber","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"next_available_number":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Next Available Number for Observation Items","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/observations/items/send_unsent":{"post":{"operationId":"createObservationsItemsSendUnsent","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"}},"required":["project_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"assignee":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"title":"Observation Item Assignee","type":"object"},"assignees":{"items":{"properties":{"current":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"category":{"nullable":true,"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"name":{"type":"string"}},"type":"object"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_notified":{"format":"date","nullable":true,"type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_rich_text":{"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"number":{"type":"string"},"origin":{"nullable":true,"properties":{"payload":{"properties":{"bim_model_id":{"type":"integer"},"bim_model_name":{"type":"string"},"checklist_item_id":{"type":"integer"},"checklist_list_id":{"type":"integer"},"coordination_issue_id":{"type":"integer"},"coordination_issue_number":{"type":"integer"},"incident_action_id":{"type":"integer"},"incident_id":{"type":"integer"}},"title":"Origin Payload","type":"object"},"type":{"enum":["incident","bim_model","inspection","coordination_issue"],"type":"string"}},"title":"Observation origin","type":"object"},"permissions":{"nullable":true,"properties":{"can_edit":{"type":"boolean"}},"type":"object"},"personal":{"type":"boolean"},"priority":{"enum":["Low","Medium","High","Urgent"],"type":"string"},"specification_section":{"nullable":true,"properties":{"current_revision_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"number":{"type":"string"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":{"properties":{"active":{"type":"boolean"},"category":{"type":"string"},"category_id":{"deprecated":true,"type":"integer"},"category_key":{"type":"string"},"company_active":{"type":"boolean"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"kind":{"enum":["company","project"],"type":"string"},"localized_name":{"type":"string"},"name":{"type":"string"},"name_translations":{"additionalProperties":{"type":"string"},"nullable":true,"properties":{"en":{"type":"string"},"en-AU":{"type":"string"},"es":{"type":"string"},"fr-CA":{"type":"string"}},"type":"object"},"observations_category":{"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"parent_inactive":{"type":"boolean"}},"required":["id","category","name"],"title":"Observation Type","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Observation Item","type":"object"},"title":"Array of Observation Items that were sent out","type":"array"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Send unsent Observation Items","tags":["observations"],"x-os-idempotent":true,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/observations/items/{id}":{"get":{"operationId":"getObservationsItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"default":"normal","enum":["flat_v0","normal","safety_hub"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"asset_ids":{"items":{"type":"string"},"type":"array"},"assignee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Assignee's Company","type":"object"}},"title":"Observation Item assignee","type":"object"},"assignees":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Assignee's Company","type":"object"}},"type":"object"},"type":"array"},"attachments":{"items":{"oneOf":[{"properties":{"attached_to_item_id":{"type":"string"},"attached_to_item_type":{"type":"string"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"attached_to_item_id":{"nullable":true,"type":"string"},"attached_to_item_type":{"nullable":true,"type":"string"},"can_be_viewed":{"type":"boolean"},"filename":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"}]},"type":"array"},"checklist_item":{"nullable":true,"properties":{"id":{"type":"integer"}},"type":"object"},"checklist_list":{"nullable":true,"properties":{"id":{"type":"integer"}},"type":"object"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"contributing_behavior":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"created_at":{"deprecated":true,"format":"date-time","type":"string"},"global":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Contributing Behavior","type":"object"},"contributing_condition":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"created_at":{"deprecated":true,"format":"date-time","type":"string"},"global":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Contributing Condition","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"deprecated":true,"type":"string"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Creator's Company","type":"object"}},"title":"Observation Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_notified":{"format":"date","nullable":true,"type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_rich_text":{"type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"download_all_attachments_uuid":{"type":"string"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revisions":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","nullable":true,"type":"string"},"hazard":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"created_at":{"deprecated":true,"format":"date-time","type":"string"},"global":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Hazard","type":"object"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"deprecated":true,"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"deprecated":true,"type":"integer"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"number":{"type":"string"},"origin":{"properties":{"payload":{"properties":{"bim_model_id":{"type":"integer"},"bim_model_name":{"type":"string"},"checklist_item_id":{"type":"integer"},"checklist_list_id":{"type":"integer"},"coordination_issue_id":{"type":"integer"},"coordination_issue_number":{"type":"integer"},"incident_action_id":{"type":"integer"},"incident_id":{"type":"integer"},"name":{"type":"string"}},"title":"Origin Payload","type":"object"},"type":{"enum":["inspection","incident","coordination_issue","bim_model"],"type":"string"}},"title":"Observation origin","type":"object"},"personal":{"type":"boolean"},"priority":{"enum":["Low","Medium","High","Urgent"],"type":"string"},"specification_section":{"nullable":true,"properties":{"current_revision_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"number":{"deprecated":true,"type":"string"},"section":{"type":"string"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"},"trade":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":{"properties":{"active":{"deprecated":true,"type":"boolean"},"category":{"type":"string"},"category_id":{"deprecated":true,"type":"integer"},"category_key":{"type":"string"},"company_active":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"in_use":{"deprecated":true,"type":"boolean"},"kind":{"deprecated":true,"type":"string"},"localized_name":{"deprecated":true,"type":"string"},"name":{"type":"string"},"name_translations":{"additionalProperties":{"type":"string"},"nullable":true,"properties":{"en":{"type":"string"},"en-AU":{"type":"string"},"es":{"type":"string"},"fr-CA":{"type":"string"}},"type":"object"},"observations_category":{"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"parent_inactive":{"deprecated":true,"type":"boolean"}},"title":"Observation Type","type":"object"},"updated_at":{"format":"date-time","type":"string"},"viewpoint":{"properties":{"bim_file_id":{"type":"integer"},"camera_data":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"redlines_data":{"additionalProperties":true,"type":"object"},"sections_data":{"additionalProperties":true,"type":"object"},"snapshot":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"}},"title":"BIM Viewpoint","type":"object"}},"title":"Observation Item","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Observation Item","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":false},"patch":{"operationId":"updateObservationsItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"default":"normal","enum":["flat_v0","normal","safety_hub"],"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"observation":{"allOf":[{"properties":{"asset_ids":{"items":{"type":"string"},"type":"array"},"assignee_id":{"nullable":true,"type":"integer"},"assignee_ids":{"items":{"type":"integer"},"type":"array"},"checklist_item_id":{"type":"integer"},"contributing_behavior_id":{"type":"integer"},"contributing_condition_id":{"type":"integer"},"coordination_issue_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"hazard_id":{"type":"integer"},"incident_action_id":{"type":"integer"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"number":{"type":"string"},"personal":{"default":true,"type":"boolean"},"priority":{"enum":["Low","Medium","High","Urgent"],"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"specification_section_id":{"type":"integer"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"},"trade_id":{"type":"integer"},"type_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"required":["name","type_id"],"title":"Observation","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","observation"],"title":"Body","type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"format":"binary","type":"string"},"type":"array"},"observation":{"properties":{"assignee_id":{"nullable":true,"type":"integer"},"assignee_ids":{"items":{"type":"integer"},"type":"array"},"checklist_item_id":{"type":"integer"},"contributing_behavior_id":{"type":"integer"},"contributing_condition_id":{"type":"integer"},"coordination_issue_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"hazard_id":{"type":"integer"},"incident_action_id":{"type":"integer"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"number":{"type":"string"},"personal":{"default":true,"type":"boolean"},"priority":{"enum":["Low","Medium","High","Urgent"],"type":"string"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"},"trade_id":{"type":"integer"},"type_id":{"type":"integer"}},"required":["name","type_id"],"title":"Observation","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","observation"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"asset_ids":{"items":{"type":"string"},"type":"array"},"assignee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Assignee's Company","type":"object"}},"title":"Observation Item assignee","type":"object"},"assignees":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Assignee's Company","type":"object"}},"type":"object"},"type":"array"},"attachments":{"items":{"oneOf":[{"properties":{"attached_to_item_id":{"type":"string"},"attached_to_item_type":{"type":"string"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"attached_to_item_id":{"nullable":true,"type":"string"},"attached_to_item_type":{"nullable":true,"type":"string"},"can_be_viewed":{"type":"boolean"},"filename":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"}]},"type":"array"},"checklist_item":{"nullable":true,"properties":{"id":{"type":"integer"}},"type":"object"},"checklist_list":{"nullable":true,"properties":{"id":{"type":"integer"}},"type":"object"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"contributing_behavior":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"created_at":{"deprecated":true,"format":"date-time","type":"string"},"global":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Contributing Behavior","type":"object"},"contributing_condition":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"created_at":{"deprecated":true,"format":"date-time","type":"string"},"global":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Contributing Condition","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"deprecated":true,"type":"string"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Creator's Company","type":"object"}},"title":"Observation Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_notified":{"format":"date","nullable":true,"type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_rich_text":{"type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"download_all_attachments_uuid":{"type":"string"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revisions":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","nullable":true,"type":"string"},"hazard":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"created_at":{"deprecated":true,"format":"date-time","type":"string"},"global":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Hazard","type":"object"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"deprecated":true,"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"deprecated":true,"type":"integer"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"number":{"type":"string"},"origin":{"properties":{"payload":{"properties":{"bim_model_id":{"type":"integer"},"bim_model_name":{"type":"string"},"checklist_item_id":{"type":"integer"},"checklist_list_id":{"type":"integer"},"coordination_issue_id":{"type":"integer"},"coordination_issue_number":{"type":"integer"},"incident_action_id":{"type":"integer"},"incident_id":{"type":"integer"},"name":{"type":"string"}},"title":"Origin Payload","type":"object"},"type":{"enum":["inspection","incident","coordination_issue","bim_model"],"type":"string"}},"title":"Observation origin","type":"object"},"personal":{"type":"boolean"},"priority":{"enum":["Low","Medium","High","Urgent"],"type":"string"},"specification_section":{"nullable":true,"properties":{"current_revision_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"number":{"deprecated":true,"type":"string"},"section":{"type":"string"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"},"trade":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":{"properties":{"active":{"deprecated":true,"type":"boolean"},"category":{"type":"string"},"category_id":{"deprecated":true,"type":"integer"},"category_key":{"type":"string"},"company_active":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"in_use":{"deprecated":true,"type":"boolean"},"kind":{"deprecated":true,"type":"string"},"localized_name":{"deprecated":true,"type":"string"},"name":{"type":"string"},"name_translations":{"additionalProperties":{"type":"string"},"nullable":true,"properties":{"en":{"type":"string"},"en-AU":{"type":"string"},"es":{"type":"string"},"fr-CA":{"type":"string"}},"type":"object"},"observations_category":{"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"parent_inactive":{"deprecated":true,"type":"boolean"}},"title":"Observation Type","type":"object"},"updated_at":{"format":"date-time","type":"string"},"viewpoint":{"properties":{"bim_file_id":{"type":"integer"},"camera_data":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"redlines_data":{"additionalProperties":true,"type":"object"},"sections_data":{"additionalProperties":true,"type":"object"},"snapshot":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"}},"title":"BIM Viewpoint","type":"object"}},"title":"Observation Item","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"items":{"type":"string"},"type":"array"},"ineligible_assignees":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"ineligible_distribution_members":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Observation Item","tags":["observations"],"x-os-idempotent":true,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/observations/items/{id}/attachments":{"post":{"operationId":"createObservationsItemAttachment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Upload observation item attachment","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/observations/items/{id}/pdf":{"get":{"description":"The observation as a PDF document (general information, description and response log). The project is the observation's own; a supplied project_id must match it.","operationId":"listObservationsItemPdf","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"PDF document."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Download Observation as PDF","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/observations/items/{id}/response_logs/{response_id}/attachments":{"post":{"operationId":"createObservationsItemResponseLogAttachment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"response_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Upload response log attachment","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/observations/items/{id}/send_email":{"post":{"operationId":"sendEmailObservationsItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bcc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"body":{"type":"string"},"cc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"subject":{"type":"string"}},"title":"Body","type":"object"}}},"required":true},"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Send Observation Item Email","tags":["observations"],"x-os-idempotent":true,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/observations/items/{item_id}/response_logs":{"get":{"operationId":"listObservationsItemResponseLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"oneOf":[{"properties":{"attached_to_item_id":{"nullable":true,"type":"string"},"attached_to_item_type":{"nullable":true,"type":"string"},"can_be_viewed":{"type":"boolean"},"filename":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"attached_to_item_id":{"type":"string"},"attached_to_item_type":{"type":"string"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"}],"type":"object"},"type":"array"},"comment":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Created By","type":"object"},"created_by_name":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"item_id":{"type":"integer"},"status":{"enum":["Initiated","Ready For Review","Not Accepted","Closed","Draft"],"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Observation Item Response Log","type":"object"},"title":"Array of Observation Item Response Logs","type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Observation Item Response Logs","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":true},"post":{"operationId":"createObservationsItemResponseLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"response_log":{"properties":{"comment":{"type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"title":"Response Log","type":"object"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"}},"required":["project_id","response_log"],"title":"ObservationItemResponseLogBody","type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"format":"binary","type":"string"},"type":"array"},"project_id":{"type":"integer"},"response_log":{"properties":{"comment":{"type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"}},"title":"Response Log","type":"object"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"}},"required":["project_id","response_log"],"title":"ObservationItemResponseLogBody","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"oneOf":[{"properties":{"attached_to_item_id":{"nullable":true,"type":"string"},"attached_to_item_type":{"nullable":true,"type":"string"},"can_be_viewed":{"type":"boolean"},"filename":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"attached_to_item_id":{"type":"string"},"attached_to_item_type":{"type":"string"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"}],"type":"object"},"type":"array"},"comment":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Created By","type":"object"},"created_by_name":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"item_id":{"type":"integer"},"status":{"enum":["Initiated","Ready For Review","Not Accepted","Closed","Draft"],"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Observation Item Response Log","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Observation Item Response Log","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/observations/potential_distribution_members":{"get":{"operationId":"listObservationsPotentialDistributionMembers","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[search]","schema":{"type":"string"}},{"in":"query","name":"filters[category_id]","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Observation Item Default Distribution","type":"object"},"title":"Array of Observation Distribution Members","type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Observation Potential Distribution Members","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":true}},"/rest/v1.0/observations/types":{"get":{"operationId":"listObservationsTypes","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"company_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"active":{"type":"boolean"},"category":{"type":"string"},"category_id":{"type":"integer"},"category_key":{"type":"string"},"company_active":{"type":"boolean"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"kind":{"enum":["company","project"],"type":"string"},"localized_name":{"type":"string"},"name":{"type":"string"},"name_translations":{"additionalProperties":{"type":"string"},"nullable":true,"properties":{"en":{"type":"string"},"en-AU":{"type":"string"},"es":{"type":"string"},"fr-CA":{"type":"string"}},"type":"object"},"parent_inactive":{"type":"boolean"}},"required":["id","category","category_id","name"],"title":"Observation Type","type":"object"},"title":"Array of Observation Types","type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Observation Types","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":true}},"/rest/v1.0/potential_change_orders":{"get":{"operationId":"listPotentialChangeOrders","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[origin_id]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[due_date]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[contract_id]","required":false,"schema":{"type":"integer"}},{"in":"query","name":"filters[include_deleted]","required":false,"schema":{"enum":["only","with"],"type":"string"}},{"in":"query","name":"filters[invoiced_date]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[paid_date]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[reviewed_at]","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"default":false,"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Potential Change Orders","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":true},"post":{"operationId":"createPotentialChangeOrder","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"change_order":{"properties":{"commitment_change_event_id":{"type":"integer"},"currency_exchange_rate":{"type":"string"},"due_date":{"format":"date-time","type":"string"},"grand_total":{"format":"float","type":"string"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"paid_date":{"format":"date","type":"string"},"prime_change_event_id":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"}},"type":"object"},"contract_id":{"type":"integer"},"project_id":{"type":"integer"}},"required":["change_order","project_id","contract_id"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"change_order_request_id":{"type":"integer"},"commitment_change_event_id":{"type":"integer"},"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"due_date":{"format":"date-time","type":"string"},"field_change":{"type":"boolean"},"grand_total":{"format":"float","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"line_items":{"items":{"type":"object"},"type":"array"},"line_items_extended_total":{"format":"float","type":"string"},"line_items_total":{"format":"float","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid":{"type":"boolean"},"paid_date":{"format":"date","type":"string"},"position":{"type":"integer"},"prime_change_event_id":{"type":"integer"},"private":{"type":"boolean"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]},"void":{"type":"boolean"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Potential Change Order","tags":["change_orders"],"x-os-idempotent":true,"x-os-module":"change_orders","x-os-paginated":false}},"/rest/v1.0/potential_change_orders/{id}":{"get":{"operationId":"getPotentialChangeOrder","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"contract_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"change_order_change_reason_id":{"type":"integer"},"change_order_request_id":{"type":"integer"},"commitment_change_event_id":{"type":"integer"},"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"designated_reviewer":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"due_date":{"format":"date-time","type":"string"},"field_change":{"type":"boolean"},"grand_total":{"format":"float","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_code_id":{"type":"integer"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"markup_line_items":{"items":{"properties":{"amount":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"id":{"type":"integer"},"markup":{"properties":{"compounds_markups_above":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"desitination_budget_line_item_id":{"type":"integer"},"destination_cost_code":{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"type":"object"},"destination_line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"destination_sub_job":{"allOf":[{"properties":{"created_at":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"updated_at":{"type":"string"}},"type":"object"},{"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"id":{"type":"integer"},"markup_set":{"type":"string"},"name":{"type":"string"},"percentage":{"type":"string"},"position":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"position":{"type":"integer"},"quantity":{"format":"float","type":"number"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"number"},"uom":{"type":"string"}},"type":"object"},"type":"array"},"line_items_extended_total":{"format":"float","type":"string"},"line_items_total":{"format":"float","type":"string"},"location_id":{"type":"integer"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid":{"type":"boolean"},"paid_date":{"format":"date","type":"string"},"position":{"type":"integer"},"prime_change_event_id":{"type":"integer"},"private":{"type":"boolean"},"reason":{"type":"string"},"received_from":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"reference":{"type":"string"},"request_for_quote_id":{"type":"integer"},"reviewed_at":{"format":"date-time","type":"string"},"reviewer":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]},"void":{"type":"boolean"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Potential Change Orders","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":false},"patch":{"operationId":"updatePotentialChangeOrder","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"change_order":{"properties":{"change_order_request":{"properties":{"change_order_package_id":{"type":"integer"}},"type":"object"},"change_order_request_id":{"type":"integer"},"commitment_change_event_id":{"type":"integer"},"currency_exchange_rate":{"type":"string"},"due_date":{"format":"date-time","type":"string"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"prime_change_event_id":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"}},"type":"object"},"contract_id":{"type":"integer"},"project_id":{"type":"integer"}},"required":["change_order","project_id","contract_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"change_order_change_reason_id":{"type":"integer"},"change_order_request_id":{"type":"integer"},"commitment_change_event_id":{"type":"integer"},"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"designated_reviewer":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"due_date":{"format":"date-time","type":"string"},"field_change":{"type":"boolean"},"grand_total":{"format":"float","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_code_id":{"type":"integer"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"markup_line_items":{"items":{"properties":{"amount":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"id":{"type":"integer"},"markup":{"properties":{"compounds_markups_above":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"desitination_budget_line_item_id":{"type":"integer"},"destination_cost_code":{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"type":"object"},"destination_line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"destination_sub_job":{"allOf":[{"properties":{"created_at":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"updated_at":{"type":"string"}},"type":"object"},{"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"id":{"type":"integer"},"markup_set":{"type":"string"},"name":{"type":"string"},"percentage":{"type":"string"},"position":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"position":{"type":"integer"},"quantity":{"format":"float","type":"number"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"number"},"uom":{"type":"string"}},"type":"object"},"type":"array"},"line_items_extended_total":{"format":"float","type":"string"},"line_items_total":{"format":"float","type":"string"},"location_id":{"type":"integer"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid":{"type":"boolean"},"paid_date":{"format":"date","type":"string"},"position":{"type":"integer"},"prime_change_event_id":{"type":"integer"},"private":{"type":"boolean"},"reason":{"type":"string"},"received_from":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"reference":{"type":"string"},"request_for_quote_id":{"type":"integer"},"reviewed_at":{"format":"date-time","type":"string"},"reviewer":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]},"void":{"type":"boolean"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Potential Change Order","tags":["change_orders"],"x-os-idempotent":true,"x-os-module":"change_orders","x-os-paginated":false}},"/rest/v1.0/potential_change_orders/{id}/line_items/{line_item_id}/markup_line_items":{"get":{"description":"Requires change_orders:read, permission to view the project's Change Orders tool, and access to the live governing contract's schedule of values. A private potential change order requires administrative permission on the governing contract tool. Returns the line item's markup entries in position order.","operationId":"listPotentialChangeOrderLineItemMarkupLineItems","parameters":[{"description":"Potential change order ID.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Line item ID on the potential change order.","in":"path","name":"line_item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional assertion of the project ID on the potential change order.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/change_orders_PcoMarkupLineItem"},"type":"array"}}},"description":"Markup entries."},"401":{"description":"Authentication required."},"403":{"description":"The project action, Change Orders tool, or governing contract schedule of values is unavailable to the caller."},"404":{"description":"The potential change order, its live governing contract, or the requested child record is unavailable."},"409":{"description":"A retained financial reference is unavailable."},"422":{"description":"The markup fields, mode, or computed financial values did not pass validation."}},"summary":"List markups on a potential change-order line item","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":false},"post":{"description":"Requires change_orders:write, permission to create records in the project's Change Orders tool, and access to the live governing contract's schedule of values. A private potential change order requires administrative permission on the governing contract tool. Supply one fixed amount or one percentage. A percentage applies to the line base and can include preceding markups. The returned amount is the computed contribution.","operationId":"createPotentialChangeOrderLineItemMarkupLineItem","parameters":[{"description":"Potential change order ID.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Line item ID on the potential change order.","in":"path","name":"line_item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional assertion of the project ID on the potential change order.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"markup_line_item":{"$ref":"#/components/schemas/change_orders_PcoMarkupCreateFields"}},"required":["markup_line_item"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/change_orders_PcoMarkupLineItem"}}},"description":"Created markup entry."},"400":{"description":"Invalid JSON body."},"401":{"description":"Authentication required."},"403":{"description":"The project action, Change Orders tool, or governing contract schedule of values is unavailable to the caller."},"404":{"description":"The potential change order, its live governing contract, or the requested child record is unavailable."},"409":{"description":"The retained change-order governing reference chain is inconsistent."},"422":{"description":"The markup fields, mode, or computed financial values did not pass validation."}},"summary":"Create a markup on a potential change-order line item","tags":["change_orders"],"x-os-idempotent":true,"x-os-module":"change_orders","x-os-paginated":false}},"/rest/v1.0/potential_change_orders/{id}/line_items/{line_item_id}/markup_line_items/{markup_id}":{"delete":{"description":"Requires change_orders:write, permission to delete records in the project's Change Orders tool, and access to the live governing contract's schedule of values. A private potential change order requires administrative permission on the governing contract tool. Removes the specified markup entry from the line item.","operationId":"deletePotentialChangeOrderLineItemMarkupLineItem","parameters":[{"description":"Potential change order ID.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Line item ID on the potential change order.","in":"path","name":"line_item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Markup ID on the specified line item.","in":"path","name":"markup_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional assertion of the project ID on the potential change order.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Markup entry deleted."},"401":{"description":"Authentication required."},"403":{"description":"The project action, Change Orders tool, or governing contract schedule of values is unavailable to the caller."},"404":{"description":"The potential change order, its live governing contract, or the requested child record is unavailable."},"409":{"description":"The retained change-order governing reference chain is inconsistent."}},"summary":"Delete a potential change-order line item markup","tags":["change_orders"],"x-os-idempotent":true,"x-os-module":"change_orders","x-os-paginated":false},"get":{"description":"Requires change_orders:read, permission to view the project's Change Orders tool, and access to the live governing contract's schedule of values. A private potential change order requires administrative permission on the governing contract tool. Returns the markup and its computed contribution based on the line and preceding markups.","operationId":"getPotentialChangeOrderLineItemMarkupLineItem","parameters":[{"description":"Potential change order ID.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Line item ID on the potential change order.","in":"path","name":"line_item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Markup ID on the specified line item.","in":"path","name":"markup_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional assertion of the project ID on the potential change order.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/change_orders_PcoMarkupLineItem"}}},"description":"Markup entry."},"401":{"description":"Authentication required."},"403":{"description":"The project action, Change Orders tool, or governing contract schedule of values is unavailable to the caller."},"404":{"description":"The potential change order, its live governing contract, or the requested child record is unavailable."},"409":{"description":"A retained financial reference is unavailable."},"422":{"description":"The markup fields, mode, or computed financial values did not pass validation."}},"summary":"Show a potential change-order line item markup","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":false},"patch":{"description":"Requires change_orders:write, permission to edit records in the project's Change Orders tool, and access to the live governing contract's schedule of values. A private potential change order requires administrative permission on the governing contract tool. Omitted fields keep their current values. To switch markup modes, send null for the old field and a value for the new field in the same request.","operationId":"updatePotentialChangeOrderLineItemMarkupLineItem","parameters":[{"description":"Potential change order ID.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Line item ID on the potential change order.","in":"path","name":"line_item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Markup ID on the specified line item.","in":"path","name":"markup_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional assertion of the project ID on the potential change order.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"markup_line_item":{"$ref":"#/components/schemas/change_orders_PcoMarkupUpdateFields"}},"required":["markup_line_item"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/change_orders_PcoMarkupLineItem"}}},"description":"Updated markup entry."},"400":{"description":"Invalid JSON body."},"401":{"description":"Authentication required."},"403":{"description":"The project action, Change Orders tool, or governing contract schedule of values is unavailable to the caller."},"404":{"description":"The potential change order, its live governing contract, or the requested child record is unavailable."},"409":{"description":"The retained change-order governing reference chain is inconsistent."},"422":{"description":"The markup fields, mode, or computed financial values did not pass validation."}},"summary":"Update a potential change-order line item markup","tags":["change_orders"],"x-os-idempotent":true,"x-os-module":"change_orders","x-os-paginated":false}},"/rest/v1.0/potential_change_orders/{potential_change_order_id}/line_items":{"get":{"operationId":"listPotentialChangeOrderLineItems","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"potential_change_order_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[cost_code_id]","schema":{"type":"string"}},{"in":"query","name":"filters[line_item_type_id]","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Potential Change Order Line Items","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":true},"post":{"operationId":"createPotentialChangeOrderLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"potential_change_order_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"line_item":{"properties":{"amount":{"type":"string"},"cost_code_id":{"type":"integer"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"line_item_type_id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"type":"string"},"tax_code_id":{"type":"integer"},"unit_cost":{"type":"string"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"},"wbs_code_id":{"type":"integer"}},"title":"Line Item","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","line_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Potential Change Order Line Item","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":false}},"/rest/v1.0/potential_change_orders/{potential_change_order_id}/line_items/{id}":{"delete":{"operationId":"deletePotentialChangeOrderLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"potential_change_order_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Potential Change Order Line Item","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":false},"get":{"operationId":"getPotentialChangeOrderLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"potential_change_order_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Potential Change Order Line Item","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":false},"patch":{"operationId":"updatePotentialChangeOrderLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"potential_change_order_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"line_item":{"properties":{"amount":{"type":"string"},"cost_code_id":{"type":"integer"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"line_item_type_id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"type":"string"},"tax_code_id":{"type":"integer"},"unit_cost":{"type":"string"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"},"wbs_code_id":{"type":"integer"}},"title":"Line Item","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","line_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Potential Change Order Line Item","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":false}},"/rest/v1.0/prime_contract":{"get":{"operationId":"listPrimeContract","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","type":"string"},"allow_comments":{"type":"boolean"},"allow_markups":{"type":"boolean"},"allow_payment_applications":{"type":"boolean"},"allow_payments":{"type":"boolean"},"allow_redistributions":{"type":"boolean"},"approval_letter_date":{"format":"date","type":"string"},"approved_change_orders":{"type":"string"},"architect":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assigned_to":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bill_to":{"type":"string"},"budget_line_item_id":{"type":"integer"},"change_order_packages":{"items":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"change_order_requests":{"items":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"type":"array"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"format":"date","type":"string"},"contract_start_date":{"format":"date","type":"string"},"contract_termination_date":{"format":"date","type":"string"},"contractor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"delivery_date":{"format":"date","type":"string"},"display_materials_retainage":{"type":"boolean"},"display_stored_materials":{"type":"boolean"},"display_work_retainage":{"type":"boolean"},"draft_change_orders_amount":{"type":"string"},"exclusions":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"has_change_order_packages":{"type":"boolean"},"has_potential_change_orders":{"type":"boolean"},"id":{"type":"integer"},"inclusions":{"type":"string"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"line_items_extended_total":{"type":"string"},"line_items_total":{"type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"original_substantial_completion_date":{"format":"date","type":"string"},"outstanding_balance":{"type":"string"},"owner_invoices_amount":{"type":"string"},"payment_terms":{"type":"string"},"payments_received":{"items":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"check_number":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"date":{"format":"date","type":"string"},"draw_request_number":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_number":{"type":"integer"}},"type":"object"},"type":"array"},"pending_change_orders_amount":{"type":"string"},"pending_revised_contract_amount":{"type":"string"},"percentage_paid":{"type":"string"},"position":{"type":"integer"},"potential_change_orders":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"private":{"type":"boolean"},"received_from":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"requisition_number":{"type":"string"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract_amount":{"type":"string"},"ship_to":{"type":"string"},"ship_via":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated"],"type":"string"},"substantial_completion_date":{"format":"date","type":"string"},"title":{"type":"string"},"total_payments":{"type":"string"},"type":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show First Prime Contract","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false},"post":{"operationId":"createPrimeContract","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"prime_contract":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"type":"string"},"approval_letter_date":{"format":"date","type":"string"},"architect_id":{"type":"integer"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"type":"string"},"contract_start_date":{"type":"string"},"contract_termination_date":{"format":"date","type":"string"},"contractor_id":{"type":"integer"},"currency_exchange_rate":{"type":"number"},"currency_iso_code":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"exclusions":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"inclusions":{"type":"string"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"private":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated"],"type":"string"},"substantial_completion_date":{"format":"date","type":"string"},"title":{"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"},"vendor_id":{"type":"integer"}},"title":"Prime Contract","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","prime_contract"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","type":"string"},"allow_comments":{"type":"boolean"},"allow_markups":{"type":"boolean"},"allow_payment_applications":{"type":"boolean"},"allow_payments":{"type":"boolean"},"allow_redistributions":{"type":"boolean"},"approval_letter_date":{"format":"date","type":"string"},"approved_change_orders":{"type":"string"},"architect":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assigned_to":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bill_to":{"type":"string"},"budget_line_item_id":{"type":"integer"},"change_order_packages":{"items":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"change_order_requests":{"items":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"type":"array"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"format":"date","type":"string"},"contract_start_date":{"format":"date","type":"string"},"contract_termination_date":{"format":"date","type":"string"},"contractor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"delivery_date":{"format":"date","type":"string"},"display_materials_retainage":{"type":"boolean"},"display_stored_materials":{"type":"boolean"},"display_work_retainage":{"type":"boolean"},"draft_change_orders_amount":{"type":"string"},"exclusions":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"has_change_order_packages":{"type":"boolean"},"has_potential_change_orders":{"type":"boolean"},"id":{"type":"integer"},"inclusions":{"type":"string"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"line_items_extended_total":{"type":"string"},"line_items_total":{"type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"original_substantial_completion_date":{"format":"date","type":"string"},"outstanding_balance":{"type":"string"},"owner_invoices_amount":{"type":"string"},"payment_terms":{"type":"string"},"payments_received":{"items":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"check_number":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"date":{"format":"date","type":"string"},"draw_request_number":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_number":{"type":"integer"}},"type":"object"},"type":"array"},"pending_change_orders_amount":{"type":"string"},"pending_revised_contract_amount":{"type":"string"},"percentage_paid":{"type":"string"},"position":{"type":"integer"},"potential_change_orders":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"private":{"type":"boolean"},"received_from":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"requisition_number":{"type":"string"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract_amount":{"type":"string"},"ship_to":{"type":"string"},"ship_via":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated"],"type":"string"},"substantial_completion_date":{"format":"date","type":"string"},"title":{"type":"string"},"total_payments":{"type":"string"},"type":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Prime Contract","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/prime_contract/{id}":{"delete":{"operationId":"deletePrimeContract","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Prime Contract","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false},"get":{"operationId":"getPrimeContract","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","type":"string"},"allow_comments":{"type":"boolean"},"allow_markups":{"type":"boolean"},"allow_payment_applications":{"type":"boolean"},"allow_payments":{"type":"boolean"},"allow_redistributions":{"type":"boolean"},"approval_letter_date":{"format":"date","type":"string"},"approved_change_orders":{"type":"string"},"architect":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assigned_to":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bill_to":{"type":"string"},"budget_line_item_id":{"type":"integer"},"change_order_packages":{"items":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"change_order_requests":{"items":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"type":"array"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"format":"date","type":"string"},"contract_start_date":{"format":"date","type":"string"},"contract_termination_date":{"format":"date","type":"string"},"contractor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"delivery_date":{"format":"date","type":"string"},"display_materials_retainage":{"type":"boolean"},"display_stored_materials":{"type":"boolean"},"display_work_retainage":{"type":"boolean"},"draft_change_orders_amount":{"type":"string"},"exclusions":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"has_change_order_packages":{"type":"boolean"},"has_potential_change_orders":{"type":"boolean"},"id":{"type":"integer"},"inclusions":{"type":"string"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"line_items_extended_total":{"type":"string"},"line_items_total":{"type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"original_substantial_completion_date":{"format":"date","type":"string"},"outstanding_balance":{"type":"string"},"owner_invoices_amount":{"type":"string"},"payment_terms":{"type":"string"},"payments_received":{"items":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"check_number":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"date":{"format":"date","type":"string"},"draw_request_number":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_number":{"type":"integer"}},"type":"object"},"type":"array"},"pending_change_orders_amount":{"type":"string"},"pending_revised_contract_amount":{"type":"string"},"percentage_paid":{"type":"string"},"position":{"type":"integer"},"potential_change_orders":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"private":{"type":"boolean"},"received_from":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"requisition_number":{"type":"string"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract_amount":{"type":"string"},"ship_to":{"type":"string"},"ship_via":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated"],"type":"string"},"substantial_completion_date":{"format":"date","type":"string"},"title":{"type":"string"},"total_payments":{"type":"string"},"type":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Prime Contract","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false},"patch":{"operationId":"updatePrimeContract","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"prime_contract":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"type":"string"},"approval_letter_date":{"format":"date","type":"string"},"architect_id":{"type":"integer"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"type":"string"},"contract_start_date":{"type":"string"},"contract_termination_date":{"format":"date","type":"string"},"contractor_id":{"type":"integer"},"currency_exchange_rate":{"type":"number"},"currency_iso_code":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"exclusions":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"inclusions":{"type":"string"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"private":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated"],"type":"string"},"substantial_completion_date":{"format":"date","type":"string"},"title":{"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"},"vendor_id":{"type":"integer"}},"title":"Prime Contract","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","prime_contract"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","type":"string"},"allow_comments":{"type":"boolean"},"allow_markups":{"type":"boolean"},"allow_payment_applications":{"type":"boolean"},"allow_payments":{"type":"boolean"},"allow_redistributions":{"type":"boolean"},"approval_letter_date":{"format":"date","type":"string"},"approved_change_orders":{"type":"string"},"architect":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assigned_to":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bill_to":{"type":"string"},"budget_line_item_id":{"type":"integer"},"change_order_packages":{"items":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"change_order_requests":{"items":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"type":"array"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"format":"date","type":"string"},"contract_start_date":{"format":"date","type":"string"},"contract_termination_date":{"format":"date","type":"string"},"contractor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"delivery_date":{"format":"date","type":"string"},"display_materials_retainage":{"type":"boolean"},"display_stored_materials":{"type":"boolean"},"display_work_retainage":{"type":"boolean"},"draft_change_orders_amount":{"type":"string"},"exclusions":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"has_change_order_packages":{"type":"boolean"},"has_potential_change_orders":{"type":"boolean"},"id":{"type":"integer"},"inclusions":{"type":"string"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"line_items_extended_total":{"type":"string"},"line_items_total":{"type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"original_substantial_completion_date":{"format":"date","type":"string"},"outstanding_balance":{"type":"string"},"owner_invoices_amount":{"type":"string"},"payment_terms":{"type":"string"},"payments_received":{"items":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"check_number":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"date":{"format":"date","type":"string"},"draw_request_number":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_number":{"type":"integer"}},"type":"object"},"type":"array"},"pending_change_orders_amount":{"type":"string"},"pending_revised_contract_amount":{"type":"string"},"percentage_paid":{"type":"string"},"position":{"type":"integer"},"potential_change_orders":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"private":{"type":"boolean"},"received_from":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"requisition_number":{"type":"string"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract_amount":{"type":"string"},"ship_to":{"type":"string"},"ship_via":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated"],"type":"string"},"substantial_completion_date":{"format":"date","type":"string"},"title":{"type":"string"},"total_payments":{"type":"string"},"type":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Prime Contract","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/prime_contracts":{"get":{"operationId":"listPrimeContracts","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","type":"string"},"approval_letter_date":{"format":"date","type":"string"},"approved_change_orders":{"type":"string"},"architect":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"format":"date","type":"string"},"contract_start_date":{"format":"date","type":"string"},"contract_termination_date":{"format":"date","type":"string"},"contractor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"draft_change_orders_amount":{"type":"string"},"exclusions":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"has_change_order_packages":{"type":"boolean"},"has_potential_change_orders":{"type":"boolean"},"id":{"type":"integer"},"inclusions":{"type":"string"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"original_substantial_completion_date":{"format":"date","type":"string"},"outstanding_balance":{"type":"string"},"owner_invoices_amount":{"type":"string"},"pending_change_orders_amount":{"type":"string"},"pending_revised_contract_amount":{"type":"string"},"percentage_paid":{"type":"string"},"private":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract_amount":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated"],"type":"string"},"substantial_completion_date":{"format":"date","type":"string"},"title":{"type":"string"},"total_payments":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},{"properties":{"abbreviated_name":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_phone":{"nullable":true,"type":"string"},"business_register":{"nullable":true,"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"nullable":true,"type":"string"},"verified_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"city":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"string"},"contact_count":{"type":"integer"},"country_code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","nullable":true,"type":"string"},"email_address":{"format":"email","nullable":true,"type":"string"},"fax_number":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"nullable":true,"type":"string"},"license_number":{"nullable":true,"type":"string"},"logo":{"nullable":true,"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"nullable":true,"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"prequalified":{"type":"boolean"},"primary_contact":{"nullable":true,"properties":{"business_phone":{"nullable":true,"type":"string"},"business_phone_extension":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"state_code":{"nullable":true,"type":"string"},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"vendor_group":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":"object"},"website":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"bidding":{"nullable":true,"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":"object"},"bidding_distribution":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":"array"}},"type":"object"},{"properties":{"project_ids":{"items":{"type":"integer"},"type":"array"},"standard_cost_codes":{"items":{"properties":{"code":{"type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"}},"title":"Standard Cost Code","type":"object"},"type":"array"}},"type":"object"}]}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List all Prime Contracts","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":true}},"/rest/v1.0/prime_contracts/{prime_contract_id}/line_items":{"get":{"operationId":"listPrimeContractLineItems","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[cost_code_id]","schema":{"type":"string"}},{"in":"query","name":"filters[line_item_type_id]","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Prime Contract line items","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":true},"post":{"operationId":"createPrimeContractLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"line_item":{"properties":{"amount":{"type":"string"},"cost_code_id":{"type":"integer"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"line_item_type_id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"type":"string"},"tax_code_id":{"type":"integer"},"unit_cost":{"type":"string"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"},"wbs_code_id":{"type":"integer"}},"title":"Line Item","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","line_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Prime Contract line item","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/prime_contracts/{prime_contract_id}/line_items/sync":{"patch":{"operationId":"updatePrimeContractLineItemsSync","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"updates":{"items":{"properties":{"amount":{"type":"string"},"cost_code_id":{"type":"integer"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"id":{"nullable":true,"type":"integer"},"line_item_type_id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"type":"string"},"tax_code_id":{"type":"integer"},"unit_cost":{"type":"string"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"},"wbs_code_id":{"type":"integer"}},"title":"Line Item","type":"object"},"type":"array"}},"required":["updates"],"title":"Line Item Sync Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"entities":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"errors":{"items":{"allOf":[{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},{"properties":{"errors":{"properties":{"field_name":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"}],"type":"object"},"type":"array"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"413":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Sync Prime Contract Line Items","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/prime_contracts/{prime_contract_id}/line_items/{id}":{"delete":{"operationId":"deletePrimeContractLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete a Prime Contract line item","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false},"get":{"operationId":"getPrimeContractLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Prime Contract line item","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false},"patch":{"operationId":"updatePrimeContractLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"line_item":{"properties":{"amount":{"type":"string"},"cost_code_id":{"type":"integer"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"line_item_type_id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"type":"string"},"tax_code_id":{"type":"integer"},"unit_cost":{"type":"string"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"},"wbs_code_id":{"type":"integer"}},"title":"Line Item","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","line_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Prime Contract line item","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/prime_contracts/{prime_contract_id}/payment_application_line_items/{id}":{"patch":{"operationId":"updatePrimeContractPaymentApplicationLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"payment_application_line_item":{"properties":{"materials_presently_stored":{"type":"string"},"materials_stored_retainage_retained_this_period":{"type":"string"},"work_completed_retainage_released_this_period":{"type":"string"},"work_completed_retainage_retained_this_period":{"type":"string"},"work_completed_this_period":{"type":"string"},"work_completed_this_period_quantity":{"type":"string"}},"title":"Payment Application (Owner Invoice) Line Item","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","payment_application_line_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"balance_to_finish":{"type":"string"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"description_of_work":{"nullable":true,"type":"string"},"id":{"type":"integer"},"item_number":{"type":"integer"},"materials_moved":{"type":"string"},"materials_presently_stored":{"type":"string"},"materials_retainage_retained_moved":{"type":"string"},"materials_stored_retainage_currently_retained":{"type":"string"},"materials_stored_retainage_from_previous_application":{"type":"string"},"materials_stored_retainage_percent_this_period":{"type":"string"},"materials_stored_retainage_released_this_period":{"type":"string"},"materials_stored_retainage_retained_this_period":{"type":"string"},"scheduled_quantity":{"type":"string"},"scheduled_unit_price":{"type":"string"},"scheduled_value":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_completed_and_stored_to_date_percent":{"type":"string"},"total_completed_and_stored_to_date_quantity":{"type":"string"},"total_retainage_currently_retained":{"type":"string"},"total_retainage_from_previous_application":{"type":"string"},"type":{"type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"title":"Wbs Code","type":"object"},"work_completed_from_previous_application":{"type":"string"},"work_completed_from_previous_application_quantity":{"type":"string"},"work_completed_retainage_currently_retained":{"type":"string"},"work_completed_retainage_from_previous_application":{"type":"string"},"work_completed_retainage_percent_this_period":{"type":"string"},"work_completed_retainage_released_this_period":{"type":"string"},"work_completed_retainage_retained_this_period":{"type":"string"},"work_completed_this_period":{"type":"string"},"work_completed_this_period_quantity":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Payment Application (Owner Invoice) Line Item for Prime Contract","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/prime_contracts/{prime_contract_id}/payment_applications":{"get":{"operationId":"listPrimeContractPaymentApplications","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[is_last]","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"billing_date":{"format":"date","type":"string"},"billing_period":{"nullable":true,"properties":{"end_date":{"format":"date","type":"string"},"start_date":{"format":"date","type":"string"}},"type":"object"},"contract":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"base_currency_iso_code":{"type":"string"},"currency_exchange_rate":{"type":"string"},"currency_iso_code":{"type":"string"}},"type":"object"},"formatted_contract_company":{"type":"string"},"g702":{"properties":{"balance_to_finish_including_retainage":{"type":"string"},"completed_work_retainage_amount":{"type":"string"},"completed_work_retainage_percent":{"type":"string"},"contract_sum_to_date":{"type":"string"},"current_payment_due":{"type":"string"},"formatted_period":{"type":"string"},"less_previous_certificates_for_payment":{"type":"string"},"negative_change_order_item_total":{"type":"string"},"negative_new_change_order_item_total":{"type":"string"},"negative_previous_change_order_item_total":{"type":"string"},"net_change_by_change_orders":{"type":"string"},"original_contract_sum":{"type":"string"},"positive_change_order_item_total":{"type":"string"},"positive_new_change_order_item_total":{"type":"string"},"positive_previous_change_order_item_total":{"type":"string"},"stored_materials_retainage_amount":{"type":"string"},"stored_materials_retainage_percent":{"type":"string"},"tax_applicable_to_this_payment":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_earned_less_retainage":{"type":"string"},"total_retainage":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"number":{"type":"integer"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"percent_complete":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_id":{"nullable":true,"type":"integer"},"period_start":{"format":"date","type":"string"},"status":{"enum":["draft","under_review","revise_and_resubmit","approved"],"type":"string"},"total_amount_accrued_this_period":{"type":"string"},"total_amount_paid":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Payment Applications (Owner Invoices) for Prime Contract","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":true},"post":{"operationId":"createPrimeContractPaymentApplication","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"payment_application":{"properties":{"billing_date":{"format":"date","type":"string"},"commitment_billing_period_id":{"type":"integer"},"include_attachments":{"type":"boolean"},"invoice_number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"status":{"enum":["draft","under_review","revise_and_resubmit","approved"],"type":"string"}},"title":"Payment Application (Owner Invoice)","type":"object"},"project_id":{"type":"integer"}},"required":["project_id"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"g703":{"items":{"properties":{"balance_to_finish":{"type":"string"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"currency_configuration":{"properties":{"base_currency_iso_code":{"type":"string"},"currency_exchange_rate":{"type":"string"},"currency_iso_code":{"type":"string"}},"type":"object"},"description_of_work":{"nullable":true,"type":"string"},"description_override":{"nullable":true,"type":"string"},"id":{"type":"integer"},"item_number":{"type":"integer"},"materials_presently_stored":{"type":"string"},"materials_stored_retainage_currently_retained":{"type":"string"},"materials_stored_retainage_from_previous_application":{"type":"string"},"materials_stored_retainage_percent_this_period":{"type":"string"},"materials_stored_retainage_released_this_period":{"type":"string"},"materials_stored_retainage_retained_this_period":{"type":"string"},"scheduled_quantity":{"type":"string"},"scheduled_unit_price":{"type":"string"},"scheduled_value":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_completed_and_stored_to_date_percent":{"type":"string"},"total_completed_and_stored_to_date_quantity":{"type":"string"},"total_retainage_currently_retained":{"type":"string"},"total_retainage_from_previous_application":{"type":"string"},"type":{"type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"title":"Wbs Code","type":"object"},"work_completed_from_previous_application":{"type":"string"},"work_completed_from_previous_application_quantity":{"type":"string"},"work_completed_retainage_currently_retained":{"type":"string"},"work_completed_retainage_from_previous_application":{"type":"string"},"work_completed_retainage_percent_this_period":{"type":"string"},"work_completed_retainage_released_this_period":{"type":"string"},"work_completed_retainage_retained_this_period":{"type":"string"},"work_completed_this_period":{"type":"string"},"work_completed_this_period_quantity":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},{"properties":{"billing_date":{"format":"date","type":"string"},"billing_period":{"nullable":true,"properties":{"end_date":{"format":"date","type":"string"},"start_date":{"format":"date","type":"string"}},"type":"object"},"contract":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"base_currency_iso_code":{"type":"string"},"currency_exchange_rate":{"type":"string"},"currency_iso_code":{"type":"string"}},"type":"object"},"description_type":{"default":"automatic","enum":["custom","automatic"],"type":"string"},"formatted_contract_company":{"type":"string"},"g702":{"properties":{"balance_to_finish_including_retainage":{"type":"string"},"completed_work_retainage_amount":{"type":"string"},"completed_work_retainage_percent":{"type":"string"},"contract_sum_to_date":{"type":"string"},"current_payment_due":{"type":"string"},"formatted_period":{"type":"string"},"less_previous_certificates_for_payment":{"type":"string"},"negative_change_order_item_total":{"type":"string"},"negative_new_change_order_item_total":{"type":"string"},"negative_previous_change_order_item_total":{"type":"string"},"net_change_by_change_orders":{"type":"string"},"original_contract_sum":{"type":"string"},"positive_change_order_item_total":{"type":"string"},"positive_new_change_order_item_total":{"type":"string"},"positive_previous_change_order_item_total":{"type":"string"},"stored_materials_retainage_amount":{"type":"string"},"stored_materials_retainage_percent":{"type":"string"},"tax_applicable_to_this_payment":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_earned_less_retainage":{"type":"string"},"total_retainage":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"number":{"type":"integer"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"percent_complete":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_id":{"nullable":true,"type":"integer"},"period_start":{"format":"date","type":"string"},"status":{"enum":["draft","under_review","revise_and_resubmit","approved"],"type":"string"},"total_amount_accrued_this_period":{"type":"string"},"total_amount_paid":{"type":"string"}},"type":"object"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Payment Application (Owner Invoice) for Prime Contract","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/prime_contracts/{prime_contract_id}/payment_applications/{id}":{"delete":{"operationId":"deletePrimeContractPaymentApplication","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete prime contract payment application","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false},"get":{"description":"Requires the `view` permission on the project's prime contracts tool. A scoped API token needs `prime_contracts:read`.","operationId":"getPrimeContractPaymentApplication","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"payment_application":{"properties":{"billing_date":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},{"type":"null"}]},"description":{"type":["string","null"]},"invoice_number":{"type":["string","null"]},"number":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"origin_data":{"type":["string","null"]},"origin_id":{"type":["string","null"]},"period_end":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},{"type":"null"}]},"period_start":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},{"type":"null"}]},"retainage_percent":{"type":["string","number","null"]},"status":{"type":"string"}},"type":"object"},"project_id":{"exclusiveMinimum":0,"type":"integer"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"Get prime contract payment application","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false},"patch":{"operationId":"updatePrimeContractPaymentApplication","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"payment_application":{"properties":{"billing_date":{"format":"date","type":"string"},"commitment_billing_period_id":{"type":"integer"},"invoice_number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"status":{"enum":["draft","under_review","revise_and_resubmit","approved"],"type":"string"}},"title":"Payment Application (Owner Invoice)","type":"object"},"project_id":{"type":"integer"}},"required":["project_id"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"g703":{"items":{"properties":{"balance_to_finish":{"type":"string"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"currency_configuration":{"properties":{"base_currency_iso_code":{"type":"string"},"currency_exchange_rate":{"type":"string"},"currency_iso_code":{"type":"string"}},"type":"object"},"description_of_work":{"nullable":true,"type":"string"},"description_override":{"nullable":true,"type":"string"},"id":{"type":"integer"},"item_number":{"type":"integer"},"materials_presently_stored":{"type":"string"},"materials_stored_retainage_currently_retained":{"type":"string"},"materials_stored_retainage_from_previous_application":{"type":"string"},"materials_stored_retainage_percent_this_period":{"type":"string"},"materials_stored_retainage_released_this_period":{"type":"string"},"materials_stored_retainage_retained_this_period":{"type":"string"},"scheduled_quantity":{"type":"string"},"scheduled_unit_price":{"type":"string"},"scheduled_value":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_completed_and_stored_to_date_percent":{"type":"string"},"total_completed_and_stored_to_date_quantity":{"type":"string"},"total_retainage_currently_retained":{"type":"string"},"total_retainage_from_previous_application":{"type":"string"},"type":{"type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"title":"Wbs Code","type":"object"},"work_completed_from_previous_application":{"type":"string"},"work_completed_from_previous_application_quantity":{"type":"string"},"work_completed_retainage_currently_retained":{"type":"string"},"work_completed_retainage_from_previous_application":{"type":"string"},"work_completed_retainage_percent_this_period":{"type":"string"},"work_completed_retainage_released_this_period":{"type":"string"},"work_completed_retainage_retained_this_period":{"type":"string"},"work_completed_this_period":{"type":"string"},"work_completed_this_period_quantity":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},{"properties":{"billing_date":{"format":"date","type":"string"},"billing_period":{"nullable":true,"properties":{"end_date":{"format":"date","type":"string"},"start_date":{"format":"date","type":"string"}},"type":"object"},"contract":{"properties":{"id":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"base_currency_iso_code":{"type":"string"},"currency_exchange_rate":{"type":"string"},"currency_iso_code":{"type":"string"}},"type":"object"},"description_type":{"default":"automatic","enum":["custom","automatic"],"type":"string"},"formatted_contract_company":{"type":"string"},"g702":{"properties":{"balance_to_finish_including_retainage":{"type":"string"},"completed_work_retainage_amount":{"type":"string"},"completed_work_retainage_percent":{"type":"string"},"contract_sum_to_date":{"type":"string"},"current_payment_due":{"type":"string"},"formatted_period":{"type":"string"},"less_previous_certificates_for_payment":{"type":"string"},"negative_change_order_item_total":{"type":"string"},"negative_new_change_order_item_total":{"type":"string"},"negative_previous_change_order_item_total":{"type":"string"},"net_change_by_change_orders":{"type":"string"},"original_contract_sum":{"type":"string"},"positive_change_order_item_total":{"type":"string"},"positive_new_change_order_item_total":{"type":"string"},"positive_previous_change_order_item_total":{"type":"string"},"stored_materials_retainage_amount":{"type":"string"},"stored_materials_retainage_percent":{"type":"string"},"tax_applicable_to_this_payment":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_earned_less_retainage":{"type":"string"},"total_retainage":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"number":{"type":"integer"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"percent_complete":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_id":{"nullable":true,"type":"integer"},"period_start":{"format":"date","type":"string"},"status":{"enum":["draft","under_review","revise_and_resubmit","approved"],"type":"string"},"total_amount_accrued_this_period":{"type":"string"},"total_amount_paid":{"type":"string"}},"type":"object"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Payment Application (Owner Invoice) for Prime Contract","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/project/{project_id}/email_communications":{"post":{"operationId":"createProjectEmailCommunication","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"topic_type","required":true,"schema":{"enum":["rfi","submittal_log","submittal_package","project","task","checklist","purchase_order_contract","work_order_contract","prime_contract","billings_requisition","payment_application","daily_log_header","generic_tool_item","meeting","form","observation","direct_cost_item","change_event_event","punch_item","incident","request_for_quote"],"type":"string"}},{"in":"query","name":"topic_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"communication":{"properties":{"private":{"type":"boolean"},"subject":{"type":"string"}},"type":"object"},"email":{"properties":{"bcc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"body":{"type":"string"},"cc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"required":["communication","email"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"emails":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bcc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"body":{"type":"string"},"cc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"communication_id":{"type":"integer"},"distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"email_sent_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"sanitized_body_html":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"private":{"type":"boolean"},"subject":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Email Communication","tags":["emails"],"x-os-idempotent":true,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/project/{project_id}/email_communications/emails":{"get":{"operationId":"listProjectEmailCommunicationsEmails","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"topic_type","required":true,"schema":{"enum":["rfi","submittal_log","submittal_package","project","task","checklist","purchase_order_contract","work_order_contract","prime_contract","billings_requisition","payment_application","daily_log_header","generic_tool_item","meeting","form","observation","direct_cost_item","change_event_event","punch_item","incident","request_for_quote"],"type":"string"}},{"in":"query","name":"topic_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"emails":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bcc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"body":{"type":"string"},"cc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"communication_id":{"type":"integer"},"distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"email_sent_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"sanitized_body_html":{"type":"string"},"subject":{"type":"string"}},"type":"object"},"type":"array"},"new_communication_email":{"type":"string"},"total":{"type":"integer"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List of Emails","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":true}},"/rest/v1.0/project/{project_id}/email_communications/folder_counts":{"get":{"description":"Requires the `view` permission on the project's emails tool. A scoped API token needs `emails:read`.","operationId":"listProjectEmailCommunicationsFolderCounts","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Count email communications by folder","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/project/{project_id}/email_communications/{communication_id}/emails":{"post":{"operationId":"createProjectEmailCommunicationEmail","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"communication_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"topic_type","required":true,"schema":{"enum":["rfi","submittal_log","submittal_package","project","task","checklist","purchase_order_contract","work_order_contract","prime_contract","billings_requisition","payment_application","daily_log_header","generic_tool_item","meeting","form","observation","direct_cost_item","change_event_event","punch_item","incident","request_for_quote"],"type":"string"}},{"in":"query","name":"topic_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"allOf":[{"properties":{"bcc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"body":{"type":"string"},"cc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["email"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"emails":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bcc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"body":{"type":"string"},"cc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"communication_id":{"type":"integer"},"distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"email_sent_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"sanitized_body_html":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"private":{"type":"boolean"},"subject":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Email","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/project/{project_id}/email_communications/{communication_id}/emails/{email_id}/download_attachments":{"get":{"operationId":"listProjectEmailCommunicationEmailDownloadAttachments","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"communication_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"email_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"download_all_attachments_url":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Download all email attachments","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/project/{project_id}/email_communications/{communication_id}/export":{"get":{"operationId":"listProjectEmailCommunicationExport","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"communication_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"topic_type","required":true,"schema":{"enum":["rfi","submittal_log","submittal_package","project","task","checklist","purchase_order_contract","work_order_contract","prime_contract","billings_requisition","payment_application","daily_log_header","generic_tool_item","meeting","form","observation","direct_cost_item","change_event_event","punch_item","incident","request_for_quote"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pdf_url":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Export Email Communication to PDF","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/project/{project_id}/email_communications/{id}":{"get":{"operationId":"getProjectEmailCommunication","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"emails":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bcc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"body":{"type":"string"},"cc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"communication_id":{"type":"integer"},"distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"email_sent_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"sanitized_body_html":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"private":{"type":"boolean"},"subject":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Email Communication","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false},"patch":{"operationId":"updateProjectEmailCommunication","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"private":{"type":"boolean"}},"required":["private"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"emails":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bcc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"body":{"type":"string"},"cc_distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"communication_id":{"type":"integer"},"distribution":{"items":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"email_sent_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"avatar":{"nullable":true,"type":"string"},"company_name":{"type":"string"},"id":{"type":"integer"},"initials":{"nullable":true,"type":"string"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"sanitized_body_html":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"private":{"type":"boolean"},"subject":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update a private field in Email Communication","tags":["emails"],"x-os-idempotent":true,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/project/{project_id}/email_communications/{id}/move":{"post":{"description":"Move a communication's visible active messages to a folder tab (inbox/archive/spam). If none are active, restore its visible recycled messages first. Active conversations retain recycled siblings. Folder state is modeled locally. Returns the updated communication show shape.","operationId":"moveProjectEmailCommunication","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Move email communication","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/project/{project_id}/email_communications/{id}/read":{"post":{"operationId":"readProjectEmailCommunication","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Mark a whole communication thread read","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/project/{project_id}/email_communications/{id}/related_items":{"get":{"description":"Requires the `view` permission on the project's emails tool. A scoped API token needs `emails:read`.","operationId":"listProjectEmailCommunicationRelatedItems","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"related_item":{"properties":{"commitment_type":{"anyOf":[{"enum":["WorkOrderContract","PurchaseOrderContract"],"type":"string"},{"type":"null"}]},"item_id":{"exclusiveMinimum":0,"type":"integer"},"item_type":{"enum":["rfis","submittals","commitments","drawings","observations"],"type":"string"}},"required":["item_type","item_id"],"type":"object"}},"required":["related_item"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"array"}}},"description":"Created."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"List email communication related items","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false},"post":{"operationId":"createProjectEmailCommunicationRelatedItem","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create email communication related item","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/project/{project_id}/email_communications/{id}/related_items/{related_item_id}":{"delete":{"operationId":"deleteProjectEmailCommunicationRelatedItem","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"related_item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete email communication related item","tags":["emails"],"x-os-idempotent":false,"x-os-module":"emails","x-os-paginated":false}},"/rest/v1.0/projects":{"get":{"description":"Projects in the company that the caller can see (company admins: all; members: projects they belong to). Local subset.","operationId":"listProjects","parameters":[{"description":"Company the call is scoped to. Required unless the OS-Company-Id header (or, for POST, body company_id) is sent; all supplied values must agree and match the caller's company.","in":"query","name":"company_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Alternative to the company_id parameter.","in":"header","name":"OS-Company-Id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"true = active only, false = archived only; omit for both.","in":"query","name":"filters[active]","required":false,"schema":{"enum":["true","false"],"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"accounting_project_number":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"actual_start_date":{"format":"date","type":"string"},"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"code":{"nullable":true,"type":"string"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectCompany","type":"object"},"completion_date":{"format":"date","nullable":true,"type":"string"},"country_code":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"delivery_method":{"enum":["construction_management_at_risk_cmar","construction_manager_as_agent_owners_rep","design_bid_build_dbb","design_build_db","indefinite_delivery_indefinite_quantity_idiq","integrated_project_delivery","multi_prime","public_private_partnership_p3","other",null],"nullable":true,"title":"Delivery Method","type":"string"},"departments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectDepartment","type":"object"},"type":"array"},"designated_market_area":{"nullable":true,"type":"string"},"dictionary_type":{"type":"string"},"display_name":{"type":"string"},"estimated_completion_date":{"format":"date","nullable":true,"type":"string"},"estimated_start_date":{"format":"date","nullable":true,"type":"string"},"estimated_value":{"format":"float","nullable":true,"type":"string"},"flag":{"enum":["Red","Yellow","Green",null],"nullable":true,"type":"string"},"from_project_template_id":{"nullable":true,"title":"fromProjectTemplateId","type":"integer"},"id":{"type":"integer"},"inbound_email":{"nullable":true,"type":"string"},"inbound_email_address":{"format":"email","nullable":true,"type":"string"},"is_demo":{"nullable":true,"type":"boolean"},"is_erp_integrated":{"type":"boolean"},"latitude":{"format":"float","nullable":true,"type":"number"},"locale":{"nullable":true,"type":"string"},"logo_id":{"nullable":true,"type":"integer"},"logo_url":{"type":"string"},"longitude":{"format":"float","nullable":true,"type":"number"},"name":{"type":"string"},"office":{"properties":{"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"country_code":{"nullable":true,"type":"string"},"division":{"nullable":true,"type":"string"},"fax":{"nullable":true,"type":"string"},"id":{"type":"integer"},"logo":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"name":{"type":"string"},"phone":{"nullable":true,"type":"string"},"state_code":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"title":"ProjectOffice","type":"object"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"owners_project_id":{"nullable":true,"type":"integer"},"parent_job":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ParentJob","type":"object"},"parent_job_id":{"nullable":true,"title":"ParentJob","type":"integer"},"persistent_message":{"properties":{"message":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"}},"title":"ProjectPersistentMessage","type":"object"},"phone":{"nullable":true,"type":"string"},"photo_id":{"nullable":true,"type":"integer"},"photo_url":{"nullable":true,"type":"string"},"program":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectProgram","type":"object"},"project_bid_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectBidType","type":"object"},"project_bid_type_id":{"nullable":true,"type":"integer"},"project_number":{"nullable":true,"type":"string"},"project_owner_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectOwnerType","type":"object"},"project_owner_type_id":{"nullable":true,"type":"integer"},"project_region":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectRegion","type":"object"},"project_region_id":{"nullable":true,"type":"integer"},"project_sector_id":{"type":"integer"},"project_stage":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectStage","type":"object"},"project_stage_id":{"type":"integer"},"project_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectType","type":"object"},"projected_finish_date":{"format":"date","nullable":true,"type":"string"},"public_notes":{"nullable":true,"type":"string"},"sector":{"enum":["agriculture","airport","alcohol_establishment","amusement_park","animal_health_veterinary","animal_lodging","assembly","auto_parts_store","auto_service","auto_vehicle_terminal","automobile_retail","aviation","bank","bar_tavern","battery_energy_storage","behavioral_health","big_box_store","bowling_alley","brewery","bridges","business_park","campground","car_wash","casino","casino_hotel","cemetery","city_hall_operations","civil_infrastructure","college_university","commercial","convenience_store","convention_center","courthouse","cultural","dam","data_center","daycare_pre_k","dealership","death","dental","department_store","distillery","distribution_warehouse","district_operations","drug_store","dry_storage","educational","electrical_substation","elementary_school","energy","energy_distribution","energy_production","energy_storage","entertainment","entertainment_production","environmentally_controlled","event_space","fast_food_restaurant","fire_station","funeral_home","gas_station","golf","government","government_buildings","grocery_store","gym_athletic_studio","hangar","hazardous_storage","health_care","high_school","hospital","hospitality","hotel","hydro_power","individual_space","indoor","industrial","institutional","jail_prison","k_12","library","liquor_store","lodging","manufacturing","medical_center","medical_office_building_mob","middle_school","military_naval","miscellaneous_pavement","mixed_use","movie_theater","multifamily","museum","nuclear_power_plant","office","office_retail","oil_gas_mining","outdoor","outpatient_care","park","parking_garage","parking_lot","performing_arts","personal_service","pipe_line","playground","police_station","pool_swim_facility","post_office","production","psychiatric_hospital","public_safety","race_track","railway_terminal","railways","recreation","rehab_facility","religious_institution","research_development","reservoir","residential","residential_office_retail","residential_retail","restaurant","retail","roads_highways","runway_taxiway","rv_park","self_storage","senior_housing","sewer_systems","shopping_center_mall","sidewalk_walkways","single_family","solar_power","specialist_office","specialty_store","sports_courts","sports_fields","stadium_arena","storage","street_lights","student_housing","telecommunication","telecommunication_lines","terminal","trailer_park","transportation","transportation_terminals","tunnel","urgent_care","waste_collection","waste_infrastructure","waste_processing","waste_water","water_distribution","water_infrastructure","water_retention","water_treatment_plant_wwtp","wind_power","winery","winter_sports","zoo_aquarium",null],"nullable":true,"title":"Project Sector","type":"string"},"square_feet":{"nullable":true,"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"start_date":{"format":"date","nullable":true,"type":"string"},"state_code":{"nullable":true,"type":"string"},"store_number":{"nullable":true,"type":"string"},"template":{"type":"boolean"},"time_zone":{"type":"string"},"total_value":{"format":"float","nullable":true,"type":"string"},"tz_name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"warranty_end_date":{"format":"date","nullable":true,"type":"string"},"warranty_start_date":{"format":"date","nullable":true,"type":"string"},"work_scope":{"enum":["new_construction","renovation_alteration","maintenance_service",null],"nullable":true,"title":"Work Scope","type":"string"},"zip":{"nullable":true,"type":"string"}},"title":"Project","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}}}},"summary":"List projects","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":true},"post":{"description":"Create a project in the company (company admins only; read-only workspaces get 403). Allocates default cost codes, a Site location, project dates and the company's standard stages if missing, and adds the caller as Project Admin. With template_project_id, cost codes, team permission assignments and tool settings are copied from that project instead.","operationId":"createProject","parameters":[{"description":"Company the call is scoped to. Required unless the OS-Company-Id header (or, for POST, body company_id) is sent; all supplied values must agree and match the caller's company.","in":"query","name":"company_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Alternative to the company_id parameter.","in":"header","name":"OS-Company-Id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"company_id":{"minimum":1,"type":"integer"},"project":{"properties":{"address":{"maxLength":255,"nullable":true,"type":"string"},"city":{"maxLength":120,"nullable":true,"type":"string"},"completion_date":{"format":"date","nullable":true,"type":"string"},"country_code":{"description":"ISO 3166-1 alpha-2","maxLength":2,"nullable":true,"type":"string"},"description":{"maxLength":5000,"nullable":true,"type":"string"},"name":{"maxLength":200,"minLength":1,"type":"string"},"project_number":{"maxLength":50,"nullable":true,"type":"string"},"project_stage_id":{"nullable":true,"type":"integer"},"project_type_id":{"nullable":true,"type":"integer"},"start_date":{"format":"date","nullable":true,"type":"string"},"state_code":{"maxLength":50,"nullable":true,"type":"string"},"template_project_id":{"description":"Copy setup from this project in the same company.","nullable":true,"type":"integer"},"zip":{"maxLength":20,"nullable":true,"type":"string"}},"required":["name"],"type":"object"}},"required":["project"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"accounting_project_number":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"actual_start_date":{"format":"date","type":"string"},"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"code":{"nullable":true,"type":"string"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectCompany","type":"object"},"completion_date":{"format":"date","nullable":true,"type":"string"},"country_code":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"delivery_method":{"enum":["construction_management_at_risk_cmar","construction_manager_as_agent_owners_rep","design_bid_build_dbb","design_build_db","indefinite_delivery_indefinite_quantity_idiq","integrated_project_delivery","multi_prime","public_private_partnership_p3","other",null],"nullable":true,"title":"Delivery Method","type":"string"},"departments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectDepartment","type":"object"},"type":"array"},"designated_market_area":{"nullable":true,"type":"string"},"dictionary_type":{"type":"string"},"display_name":{"type":"string"},"estimated_completion_date":{"format":"date","nullable":true,"type":"string"},"estimated_start_date":{"format":"date","nullable":true,"type":"string"},"estimated_value":{"format":"float","nullable":true,"type":"string"},"flag":{"enum":["Red","Yellow","Green",null],"nullable":true,"type":"string"},"from_project_template_id":{"nullable":true,"title":"fromProjectTemplateId","type":"integer"},"id":{"type":"integer"},"inbound_email":{"nullable":true,"type":"string"},"inbound_email_address":{"format":"email","nullable":true,"type":"string"},"is_demo":{"nullable":true,"type":"boolean"},"is_erp_integrated":{"type":"boolean"},"latitude":{"format":"float","nullable":true,"type":"number"},"locale":{"nullable":true,"type":"string"},"logo_id":{"nullable":true,"type":"integer"},"logo_url":{"type":"string"},"longitude":{"format":"float","nullable":true,"type":"number"},"name":{"type":"string"},"office":{"properties":{"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"country_code":{"nullable":true,"type":"string"},"division":{"nullable":true,"type":"string"},"fax":{"nullable":true,"type":"string"},"id":{"type":"integer"},"logo":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"name":{"type":"string"},"phone":{"nullable":true,"type":"string"},"state_code":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"title":"ProjectOffice","type":"object"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"owners_project_id":{"nullable":true,"type":"integer"},"parent_job":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ParentJob","type":"object"},"parent_job_id":{"nullable":true,"title":"ParentJob","type":"integer"},"persistent_message":{"properties":{"message":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"}},"title":"ProjectPersistentMessage","type":"object"},"phone":{"nullable":true,"type":"string"},"photo_id":{"nullable":true,"type":"integer"},"photo_url":{"nullable":true,"type":"string"},"program":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectProgram","type":"object"},"project_bid_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectBidType","type":"object"},"project_bid_type_id":{"nullable":true,"type":"integer"},"project_number":{"nullable":true,"type":"string"},"project_owner_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectOwnerType","type":"object"},"project_owner_type_id":{"nullable":true,"type":"integer"},"project_region":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectRegion","type":"object"},"project_region_id":{"nullable":true,"type":"integer"},"project_sector_id":{"type":"integer"},"project_stage":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectStage","type":"object"},"project_stage_id":{"type":"integer"},"project_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectType","type":"object"},"projected_finish_date":{"format":"date","nullable":true,"type":"string"},"public_notes":{"nullable":true,"type":"string"},"sector":{"enum":["agriculture","airport","alcohol_establishment","amusement_park","animal_health_veterinary","animal_lodging","assembly","auto_parts_store","auto_service","auto_vehicle_terminal","automobile_retail","aviation","bank","bar_tavern","battery_energy_storage","behavioral_health","big_box_store","bowling_alley","brewery","bridges","business_park","campground","car_wash","casino","casino_hotel","cemetery","city_hall_operations","civil_infrastructure","college_university","commercial","convenience_store","convention_center","courthouse","cultural","dam","data_center","daycare_pre_k","dealership","death","dental","department_store","distillery","distribution_warehouse","district_operations","drug_store","dry_storage","educational","electrical_substation","elementary_school","energy","energy_distribution","energy_production","energy_storage","entertainment","entertainment_production","environmentally_controlled","event_space","fast_food_restaurant","fire_station","funeral_home","gas_station","golf","government","government_buildings","grocery_store","gym_athletic_studio","hangar","hazardous_storage","health_care","high_school","hospital","hospitality","hotel","hydro_power","individual_space","indoor","industrial","institutional","jail_prison","k_12","library","liquor_store","lodging","manufacturing","medical_center","medical_office_building_mob","middle_school","military_naval","miscellaneous_pavement","mixed_use","movie_theater","multifamily","museum","nuclear_power_plant","office","office_retail","oil_gas_mining","outdoor","outpatient_care","park","parking_garage","parking_lot","performing_arts","personal_service","pipe_line","playground","police_station","pool_swim_facility","post_office","production","psychiatric_hospital","public_safety","race_track","railway_terminal","railways","recreation","rehab_facility","religious_institution","research_development","reservoir","residential","residential_office_retail","residential_retail","restaurant","retail","roads_highways","runway_taxiway","rv_park","self_storage","senior_housing","sewer_systems","shopping_center_mall","sidewalk_walkways","single_family","solar_power","specialist_office","specialty_store","sports_courts","sports_fields","stadium_arena","storage","street_lights","student_housing","telecommunication","telecommunication_lines","terminal","trailer_park","transportation","transportation_terminals","tunnel","urgent_care","waste_collection","waste_infrastructure","waste_processing","waste_water","water_distribution","water_infrastructure","water_retention","water_treatment_plant_wwtp","wind_power","winery","winter_sports","zoo_aquarium",null],"nullable":true,"title":"Project Sector","type":"string"},"square_feet":{"nullable":true,"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"start_date":{"format":"date","nullable":true,"type":"string"},"state_code":{"nullable":true,"type":"string"},"store_number":{"nullable":true,"type":"string"},"template":{"type":"boolean"},"time_zone":{"type":"string"},"total_value":{"format":"float","nullable":true,"type":"string"},"tz_name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"warranty_end_date":{"format":"date","nullable":true,"type":"string"},"warranty_start_date":{"format":"date","nullable":true,"type":"string"},"work_scope":{"enum":["new_construction","renovation_alteration","maintenance_service",null],"nullable":true,"title":"Work Scope","type":"string"},"zip":{"nullable":true,"type":"string"}},"title":"Project","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}}}},"summary":"Create project","tags":["admin"],"x-os-idempotent":true,"x-os-module":"admin","x-os-paginated":false}},"/rest/v1.0/projects/{id}":{"get":{"operationId":"getProject","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounting_project_number":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"actual_start_date":{"format":"date","type":"string"},"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"code":{"nullable":true,"type":"string"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectCompany","type":"object"},"completion_date":{"format":"date","nullable":true,"type":"string"},"country_code":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"delivery_method":{"enum":["construction_management_at_risk_cmar","construction_manager_as_agent_owners_rep","design_bid_build_dbb","design_build_db","indefinite_delivery_indefinite_quantity_idiq","integrated_project_delivery","multi_prime","public_private_partnership_p3","other",null],"nullable":true,"title":"Delivery Method","type":"string"},"departments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectDepartment","type":"object"},"type":"array"},"designated_market_area":{"nullable":true,"type":"string"},"dictionary_type":{"type":"string"},"display_name":{"type":"string"},"estimated_completion_date":{"format":"date","nullable":true,"type":"string"},"estimated_start_date":{"format":"date","nullable":true,"type":"string"},"estimated_value":{"format":"float","nullable":true,"type":"string"},"flag":{"enum":["Red","Yellow","Green",null],"nullable":true,"type":"string"},"from_project_template_id":{"nullable":true,"title":"fromProjectTemplateId","type":"integer"},"id":{"type":"integer"},"inbound_email":{"nullable":true,"type":"string"},"inbound_email_address":{"format":"email","nullable":true,"type":"string"},"is_demo":{"nullable":true,"type":"boolean"},"is_erp_integrated":{"type":"boolean"},"latitude":{"format":"float","nullable":true,"type":"number"},"locale":{"nullable":true,"type":"string"},"logo_id":{"nullable":true,"type":"integer"},"logo_url":{"type":"string"},"longitude":{"format":"float","nullable":true,"type":"number"},"name":{"type":"string"},"office":{"properties":{"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"country_code":{"nullable":true,"type":"string"},"division":{"nullable":true,"type":"string"},"fax":{"nullable":true,"type":"string"},"id":{"type":"integer"},"logo":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"name":{"type":"string"},"phone":{"nullable":true,"type":"string"},"state_code":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"title":"ProjectOffice","type":"object"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"owners_project_id":{"nullable":true,"type":"integer"},"parent_job":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ParentJob","type":"object"},"parent_job_id":{"nullable":true,"title":"ParentJob","type":"integer"},"persistent_message":{"properties":{"message":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"}},"title":"ProjectPersistentMessage","type":"object"},"phone":{"nullable":true,"type":"string"},"photo_id":{"nullable":true,"type":"integer"},"photo_url":{"nullable":true,"type":"string"},"program":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectProgram","type":"object"},"project_bid_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectBidType","type":"object"},"project_bid_type_id":{"nullable":true,"type":"integer"},"project_number":{"nullable":true,"type":"string"},"project_owner_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectOwnerType","type":"object"},"project_owner_type_id":{"nullable":true,"type":"integer"},"project_region":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectRegion","type":"object"},"project_region_id":{"nullable":true,"type":"integer"},"project_sector_id":{"type":"integer"},"project_stage":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectStage","type":"object"},"project_stage_id":{"type":"integer"},"project_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectType","type":"object"},"projected_finish_date":{"format":"date","nullable":true,"type":"string"},"public_notes":{"nullable":true,"type":"string"},"sector":{"enum":["agriculture","airport","alcohol_establishment","amusement_park","animal_health_veterinary","animal_lodging","assembly","auto_parts_store","auto_service","auto_vehicle_terminal","automobile_retail","aviation","bank","bar_tavern","battery_energy_storage","behavioral_health","big_box_store","bowling_alley","brewery","bridges","business_park","campground","car_wash","casino","casino_hotel","cemetery","city_hall_operations","civil_infrastructure","college_university","commercial","convenience_store","convention_center","courthouse","cultural","dam","data_center","daycare_pre_k","dealership","death","dental","department_store","distillery","distribution_warehouse","district_operations","drug_store","dry_storage","educational","electrical_substation","elementary_school","energy","energy_distribution","energy_production","energy_storage","entertainment","entertainment_production","environmentally_controlled","event_space","fast_food_restaurant","fire_station","funeral_home","gas_station","golf","government","government_buildings","grocery_store","gym_athletic_studio","hangar","hazardous_storage","health_care","high_school","hospital","hospitality","hotel","hydro_power","individual_space","indoor","industrial","institutional","jail_prison","k_12","library","liquor_store","lodging","manufacturing","medical_center","medical_office_building_mob","middle_school","military_naval","miscellaneous_pavement","mixed_use","movie_theater","multifamily","museum","nuclear_power_plant","office","office_retail","oil_gas_mining","outdoor","outpatient_care","park","parking_garage","parking_lot","performing_arts","personal_service","pipe_line","playground","police_station","pool_swim_facility","post_office","production","psychiatric_hospital","public_safety","race_track","railway_terminal","railways","recreation","rehab_facility","religious_institution","research_development","reservoir","residential","residential_office_retail","residential_retail","restaurant","retail","roads_highways","runway_taxiway","rv_park","self_storage","senior_housing","sewer_systems","shopping_center_mall","sidewalk_walkways","single_family","solar_power","specialist_office","specialty_store","sports_courts","sports_fields","stadium_arena","storage","street_lights","student_housing","telecommunication","telecommunication_lines","terminal","trailer_park","transportation","transportation_terminals","tunnel","urgent_care","waste_collection","waste_infrastructure","waste_processing","waste_water","water_distribution","water_infrastructure","water_retention","water_treatment_plant_wwtp","wind_power","winery","winter_sports","zoo_aquarium",null],"nullable":true,"title":"Project Sector","type":"string"},"square_feet":{"nullable":true,"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"start_date":{"format":"date","nullable":true,"type":"string"},"state_code":{"nullable":true,"type":"string"},"store_number":{"nullable":true,"type":"string"},"template":{"type":"boolean"},"time_zone":{"type":"string"},"total_value":{"format":"float","nullable":true,"type":"string"},"tz_name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"warranty_end_date":{"format":"date","nullable":true,"type":"string"},"warranty_start_date":{"format":"date","nullable":true,"type":"string"},"work_scope":{"enum":["new_construction","renovation_alteration","maintenance_service",null],"nullable":true,"title":"Work Scope","type":"string"},"zip":{"nullable":true,"type":"string"}},"title":"Project","type":"object"}}}}},"summary":"GET /rest/v1.0/projects/{id}","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false},"patch":{"operationId":"updateProject","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"company_id":{"type":"integer"},"project":{"properties":{"accounting_project_number":{"type":"string"},"active":{"default":true,"type":"boolean"},"address":{"type":"string"},"city":{"type":"string"},"completion_date":{"format":"date","type":"string"},"country_code":{"type":"string"},"county":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"delivery_method":{"enum":["construction_management_at_risk_cmar","construction_manager_as_agent_owners_rep","design_bid_build_dbb","design_build_db","indefinite_delivery_indefinite_quantity_idiq","integrated_project_delivery","multi_prime","public_private_partnership_p3","other",null],"nullable":true,"title":"Delivery Method","type":"string"},"department_ids":{"items":{"type":"integer"},"type":"array"},"designated_market_area":{"type":"string"},"erp_integrated":{"default":false,"type":"boolean"},"estimated_completion_date":{"format":"date","type":"string"},"estimated_start_date":{"format":"date","type":"string"},"estimated_value":{"format":"float","type":"number"},"fax":{"type":"string"},"flag":{"enum":["Red","Yellow","Green"],"type":"string"},"image_id":{"type":"integer"},"locale":{"enum":["de-DE","en","en-AE","en-AU","en-CA","en-GB","en-SG","en-US-x-owner","en-US-x-sc","en-budget","en-owner","es","es-419","es-ES","fr-CA","fr-FR","ja-JP","ko","pl-PL","pseudo","pt-BR","th-TH","zh-SG"],"type":"string"},"name":{"type":"string"},"office_id":{"type":"integer"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"parent_job_id":{"type":"integer"},"phone":{"type":"string"},"portfolio_program_uuid":{"format":"uuid","nullable":true,"type":"string"},"program_id":{"type":"integer"},"project_bid_type_id":{"type":"integer"},"project_number":{"type":"string"},"project_owner_type_id":{"type":"integer"},"project_region_id":{"type":"integer"},"project_sector_id":{"type":"integer"},"project_stage_id":{"type":"integer"},"project_template_id":{"type":"integer"},"project_type_id":{"type":"integer"},"public_notes":{"type":"string"},"sector":{"enum":["agriculture","airport","alcohol_establishment","amusement_park","animal_health_veterinary","animal_lodging","assembly","auto_parts_store","auto_service","auto_vehicle_terminal","automobile_retail","aviation","bank","bar_tavern","battery_energy_storage","behavioral_health","big_box_store","bowling_alley","brewery","bridges","business_park","campground","car_wash","casino","casino_hotel","cemetery","city_hall_operations","civil_infrastructure","college_university","commercial","convenience_store","convention_center","courthouse","cultural","dam","data_center","daycare_pre_k","dealership","death","dental","department_store","distillery","distribution_warehouse","district_operations","drug_store","dry_storage","educational","electrical_substation","elementary_school","energy","energy_distribution","energy_production","energy_storage","entertainment","entertainment_production","environmentally_controlled","event_space","fast_food_restaurant","fire_station","funeral_home","gas_station","golf","government","government_buildings","grocery_store","gym_athletic_studio","hangar","hazardous_storage","health_care","high_school","hospital","hospitality","hotel","hydro_power","individual_space","indoor","industrial","institutional","jail_prison","k_12","library","liquor_store","lodging","manufacturing","medical_center","medical_office_building_mob","middle_school","military_naval","miscellaneous_pavement","mixed_use","movie_theater","multifamily","museum","nuclear_power_plant","office","office_retail","oil_gas_mining","outdoor","outpatient_care","park","parking_garage","parking_lot","performing_arts","personal_service","pipe_line","playground","police_station","pool_swim_facility","post_office","production","psychiatric_hospital","public_safety","race_track","railway_terminal","railways","recreation","rehab_facility","religious_institution","research_development","reservoir","residential","residential_office_retail","residential_retail","restaurant","retail","roads_highways","runway_taxiway","rv_park","self_storage","senior_housing","sewer_systems","shopping_center_mall","sidewalk_walkways","single_family","solar_power","specialist_office","specialty_store","sports_courts","sports_fields","stadium_arena","storage","street_lights","student_housing","telecommunication","telecommunication_lines","terminal","trailer_park","transportation","transportation_terminals","tunnel","urgent_care","waste_collection","waste_infrastructure","waste_processing","waste_water","water_distribution","water_infrastructure","water_retention","water_treatment_plant_wwtp","wind_power","winery","winter_sports","zoo_aquarium",null],"nullable":true,"title":"Project Sector","type":"string"},"square_feet":{"type":"integer"},"standard_cost_code_list_id":{"type":"integer"},"start_date":{"format":"date","type":"string"},"state_code":{"type":"string"},"store_number":{"type":"string"},"time_zone":{"type":"string"},"total_value":{"format":"float","type":"number"},"warranty_end_date":{"format":"date","type":"string"},"warranty_start_date":{"format":"date","type":"string"},"work_scope":{"enum":["new_construction","renovation_alteration","maintenance_service",null],"nullable":true,"title":"Work Scope","type":"string"},"zip":{"type":"string"}},"title":"Project","type":"object"}},"required":["company_id","project"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounting_project_number":{"nullable":true,"type":"string"},"active":{"type":"boolean"},"actual_start_date":{"format":"date","type":"string"},"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"code":{"nullable":true,"type":"string"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectCompany","type":"object"},"completion_date":{"format":"date","nullable":true,"type":"string"},"country_code":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"delivery_method":{"enum":["construction_management_at_risk_cmar","construction_manager_as_agent_owners_rep","design_bid_build_dbb","design_build_db","indefinite_delivery_indefinite_quantity_idiq","integrated_project_delivery","multi_prime","public_private_partnership_p3","other",null],"nullable":true,"title":"Delivery Method","type":"string"},"departments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectDepartment","type":"object"},"type":"array"},"designated_market_area":{"nullable":true,"type":"string"},"dictionary_type":{"type":"string"},"display_name":{"type":"string"},"estimated_completion_date":{"format":"date","nullable":true,"type":"string"},"estimated_start_date":{"format":"date","nullable":true,"type":"string"},"estimated_value":{"format":"float","nullable":true,"type":"string"},"flag":{"enum":["Red","Yellow","Green",null],"nullable":true,"type":"string"},"from_project_template_id":{"nullable":true,"title":"fromProjectTemplateId","type":"integer"},"id":{"type":"integer"},"inbound_email":{"nullable":true,"type":"string"},"inbound_email_address":{"format":"email","nullable":true,"type":"string"},"is_demo":{"nullable":true,"type":"boolean"},"is_erp_integrated":{"type":"boolean"},"latitude":{"format":"float","nullable":true,"type":"number"},"locale":{"nullable":true,"type":"string"},"logo_id":{"nullable":true,"type":"integer"},"logo_url":{"type":"string"},"longitude":{"format":"float","nullable":true,"type":"number"},"name":{"type":"string"},"office":{"properties":{"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"country_code":{"nullable":true,"type":"string"},"division":{"nullable":true,"type":"string"},"fax":{"nullable":true,"type":"string"},"id":{"type":"integer"},"logo":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"name":{"type":"string"},"phone":{"nullable":true,"type":"string"},"state_code":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"title":"ProjectOffice","type":"object"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"owners_project_id":{"nullable":true,"type":"integer"},"parent_job":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ParentJob","type":"object"},"parent_job_id":{"nullable":true,"title":"ParentJob","type":"integer"},"persistent_message":{"properties":{"message":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"}},"title":"ProjectPersistentMessage","type":"object"},"phone":{"nullable":true,"type":"string"},"photo_id":{"nullable":true,"type":"integer"},"photo_url":{"nullable":true,"type":"string"},"program":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectProgram","type":"object"},"project_bid_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectBidType","type":"object"},"project_bid_type_id":{"nullable":true,"type":"integer"},"project_number":{"nullable":true,"type":"string"},"project_owner_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectOwnerType","type":"object"},"project_owner_type_id":{"nullable":true,"type":"integer"},"project_region":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectRegion","type":"object"},"project_region_id":{"nullable":true,"type":"integer"},"project_sector_id":{"type":"integer"},"project_stage":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectStage","type":"object"},"project_stage_id":{"type":"integer"},"project_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"ProjectType","type":"object"},"projected_finish_date":{"format":"date","nullable":true,"type":"string"},"public_notes":{"nullable":true,"type":"string"},"sector":{"enum":["agriculture","airport","alcohol_establishment","amusement_park","animal_health_veterinary","animal_lodging","assembly","auto_parts_store","auto_service","auto_vehicle_terminal","automobile_retail","aviation","bank","bar_tavern","battery_energy_storage","behavioral_health","big_box_store","bowling_alley","brewery","bridges","business_park","campground","car_wash","casino","casino_hotel","cemetery","city_hall_operations","civil_infrastructure","college_university","commercial","convenience_store","convention_center","courthouse","cultural","dam","data_center","daycare_pre_k","dealership","death","dental","department_store","distillery","distribution_warehouse","district_operations","drug_store","dry_storage","educational","electrical_substation","elementary_school","energy","energy_distribution","energy_production","energy_storage","entertainment","entertainment_production","environmentally_controlled","event_space","fast_food_restaurant","fire_station","funeral_home","gas_station","golf","government","government_buildings","grocery_store","gym_athletic_studio","hangar","hazardous_storage","health_care","high_school","hospital","hospitality","hotel","hydro_power","individual_space","indoor","industrial","institutional","jail_prison","k_12","library","liquor_store","lodging","manufacturing","medical_center","medical_office_building_mob","middle_school","military_naval","miscellaneous_pavement","mixed_use","movie_theater","multifamily","museum","nuclear_power_plant","office","office_retail","oil_gas_mining","outdoor","outpatient_care","park","parking_garage","parking_lot","performing_arts","personal_service","pipe_line","playground","police_station","pool_swim_facility","post_office","production","psychiatric_hospital","public_safety","race_track","railway_terminal","railways","recreation","rehab_facility","religious_institution","research_development","reservoir","residential","residential_office_retail","residential_retail","restaurant","retail","roads_highways","runway_taxiway","rv_park","self_storage","senior_housing","sewer_systems","shopping_center_mall","sidewalk_walkways","single_family","solar_power","specialist_office","specialty_store","sports_courts","sports_fields","stadium_arena","storage","street_lights","student_housing","telecommunication","telecommunication_lines","terminal","trailer_park","transportation","transportation_terminals","tunnel","urgent_care","waste_collection","waste_infrastructure","waste_processing","waste_water","water_distribution","water_infrastructure","water_retention","water_treatment_plant_wwtp","wind_power","winery","winter_sports","zoo_aquarium",null],"nullable":true,"title":"Project Sector","type":"string"},"square_feet":{"nullable":true,"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"start_date":{"format":"date","nullable":true,"type":"string"},"state_code":{"nullable":true,"type":"string"},"store_number":{"nullable":true,"type":"string"},"template":{"type":"boolean"},"time_zone":{"type":"string"},"total_value":{"format":"float","nullable":true,"type":"string"},"tz_name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"warranty_end_date":{"format":"date","nullable":true,"type":"string"},"warranty_start_date":{"format":"date","nullable":true,"type":"string"},"work_scope":{"enum":["new_construction","renovation_alteration","maintenance_service",null],"nullable":true,"title":"Work Scope","type":"string"},"zip":{"nullable":true,"type":"string"}},"title":"Project","type":"object"}}}}},"summary":"PATCH /rest/v1.0/projects/{id}","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/accident_logs":{"get":{"operationId":"listProjectAccidentLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"type":"integer"},"style":"form"},{"explode":false,"in":"query","name":"filters[location_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"involved_company":{"type":"string"},"involved_name":{"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Accident Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectAccidentLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"accident_log":{"allOf":[{"properties":{"comments":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"involved_company":{"type":"string"},"involved_name":{"type":"string"},"location_id":{"type":"integer"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"required":["time_hour","time_minute"],"type":"object"}},"required":["accident_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"accident_log":{"properties":{"comments":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"involved_company":{"type":"string"},"involved_name":{"type":"string"},"location_id":{"type":"integer"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"vendor_id":{"type":"integer"}},"required":["time_hour","time_minute"],"type":"object"},"attachments":{"items":{"format":"binary","type":"string"},"type":"array"}},"required":["accident_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"involved_company":{"type":"string"},"involved_name":{"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Accident Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/accident_logs/{id}":{"delete":{"operationId":"deleteProjectAccidentLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Accident Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectAccidentLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"involved_company":{"type":"string"},"involved_name":{"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Accident Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectAccidentLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"accident_log":{"allOf":[{"properties":{"comments":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"involved_company":{"type":"string"},"involved_name":{"type":"string"},"location_id":{"type":"integer"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["accident_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"accident_log":{"properties":{"comments":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"involved_company":{"type":"string"},"involved_name":{"type":"string"},"location_id":{"type":"integer"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"vendor_id":{"type":"integer"}},"type":"object"},"attachments":{"items":{"type":"string"},"type":"array"}},"required":["accident_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"involved_company":{"type":"string"},"involved_name":{"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Accident Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/filter_options/status":{"get":{"operationId":"listProjectActionPlansFilterOptionsStatus","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/action_plans/filter_options/status","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/parties":{"get":{"operationId":"listProjectActionPlansParties","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/action_plans_ProjectParty"},"type":"array"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/action_plans/parties","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plan_approvers":{"get":{"operationId":"listProjectActionPlansPlanApprovers","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/action_plans_PlanParty"},"type":"array"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/action_plans/plan_approvers","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false},"post":{"operationId":"createProjectActionPlansPlanApprover","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanParty"}}}}},"summary":"POST /rest/v1.0/projects/{project_id}/action_plans/plan_approvers","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plan_approvers/{plan_approver_id}":{"delete":{"description":"Requires action_plans:write. Requires project action_plans delete permission, an enabled tool, matching tenant and visible plan. Permanently removes the party record from the visible plan. Catalog presence does not grant authorization.","operationId":"deleteProjectActionPlansPlanApprover","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"plan_approver_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Success with an empty response body"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Remove a plan approver","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false},"get":{"operationId":"getProjectActionPlansPlanApprover","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"plan_approver_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanParty"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/action_plans/plan_approvers/{plan_approver_id}","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plan_approvers/{plan_approver_id}/signature":{"delete":{"description":"Requires action_plans:write. Requires project action_plans edit permission, an enabled tool, matching tenant and visible plan. Clears signature metadata without removing the party. Only the assigned user or a project action_plans administrator may clear it. Catalog presence does not grant authorization.","operationId":"deleteSignatureProjectActionPlansPlanApprover","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"plan_approver_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Success with an empty response body"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Clear a plan approver signature","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false},"patch":{"operationId":"signatureProjectActionPlansPlanApproverPatch","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"plan_approver_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanParty"}}}}},"summary":"PATCH /rest/v1.0/projects/{project_id}/action_plans/plan_approvers/{plan_approver_id}/signature","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false},"post":{"description":"Requires action_plans:write. Requires project action_plans edit permission, an enabled tool, matching tenant and visible plan. The signer must be the assigned party user. Omitted or null signed_off_by_id uses the actor; representing another signer requires project action_plans admin permission. Replaces a previous signature. filename and url store metadata only; this endpoint does not upload or fetch image bytes. Catalog presence does not grant authorization.","operationId":"signatureProjectActionPlansPlanApprover","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"plan_approver_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_WorkflowPartySignature"}}},"description":"An absent body uses the current actor and no note. If JSON is supplied it must match this wrapper.","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanParty"}}},"description":"Success"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Capture a plan approver signature","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plan_receivers":{"get":{"operationId":"listProjectActionPlansPlanReceivers","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/action_plans_PlanParty"},"type":"array"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/action_plans/plan_receivers","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false},"post":{"operationId":"createProjectActionPlansPlanReceiver","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanParty"}}}}},"summary":"POST /rest/v1.0/projects/{project_id}/action_plans/plan_receivers","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plan_receivers/{plan_receiver_id}":{"delete":{"description":"Requires action_plans:write. Requires project action_plans delete permission, an enabled tool, matching tenant and visible plan. Permanently removes the party record from the visible plan. Catalog presence does not grant authorization.","operationId":"deleteProjectActionPlansPlanReceiver","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"plan_receiver_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Success with an empty response body"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Remove a plan receiver","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false},"get":{"operationId":"getProjectActionPlansPlanReceiver","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"plan_receiver_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanParty"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/action_plans/plan_receivers/{plan_receiver_id}","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plan_receivers/{plan_receiver_id}/signature":{"delete":{"description":"Requires action_plans:write. Requires project action_plans edit permission, an enabled tool, matching tenant and visible plan. Clears signature metadata without removing the party. Only the assigned user or a project action_plans administrator may clear it. Catalog presence does not grant authorization.","operationId":"deleteSignatureProjectActionPlansPlanReceiver","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"plan_receiver_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Success with an empty response body"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Clear a plan receiver signature","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false},"patch":{"operationId":"signatureProjectActionPlansPlanReceiverPatch","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"plan_receiver_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanParty"}}}}},"summary":"PATCH /rest/v1.0/projects/{project_id}/action_plans/plan_receivers/{plan_receiver_id}/signature","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false},"post":{"description":"Requires action_plans:write. Requires project action_plans edit permission, an enabled tool, matching tenant and visible plan. The signer must be the assigned party user. Omitted or null signed_off_by_id uses the actor; representing another signer requires project action_plans admin permission. Replaces a previous signature. filename and url store metadata only; this endpoint does not upload or fetch image bytes. Catalog presence does not grant authorization.","operationId":"signatureProjectActionPlansPlanReceiver","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"plan_receiver_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_WorkflowPartySignature"}}},"description":"An absent body uses the current actor and no note. If JSON is supplied it must match this wrapper.","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanParty"}}},"description":"Success"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Capture a plan receiver signature","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plans":{"get":{"operationId":"listProjectActionPlansPlans","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"items":{"$ref":"#/components/schemas/action_plans_PlanListItem"},"title":"default","type":"array"},{"items":{"type":"integer"},"title":"ids_only","type":"array"}]}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/action_plans/plans","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false},"post":{"operationId":"createProjectActionPlansPlan","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanShow"}}}}},"summary":"POST /rest/v1.0/projects/{project_id}/action_plans/plans","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plans/create_from_template":{"post":{"description":"Requires action_plans:write. Requires project action_plans create permission, an enabled tool, matching tenant and visible plan. The template must be live, published and in the same company. Creates a draft plan with copied template items and assignments. Null or blank title falls back to the template title. Referenced users and plan visibility are validated. Catalog presence does not grant authorization.","operationId":"createProjectActionPlansPlansCreateFromTemplate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_WorkflowCreateFromTemplate"}}},"description":"JSON request body.","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanShow"}}},"description":"Success"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Create an action plan from a published template","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plans/recycle_bin":{"get":{"operationId":"listProjectActionPlansPlansRecycleBin","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/action_plans_PlanListItem"},"type":"array"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/action_plans/plans/recycle_bin","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plans/{id}":{"get":{"operationId":"getProjectActionPlansPlan","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanShow"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/action_plans/plans/{id}","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false},"patch":{"operationId":"updateProjectActionPlansPlan","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanShow"}}}}},"summary":"PATCH /rest/v1.0/projects/{project_id}/action_plans/plans/{id}","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plans/{id}/items":{"get":{"operationId":"listProjectActionPlansPlanItems","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/action_plans_PlanItem"},"type":"array"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/action_plans/plans/{id}/items","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false},"post":{"operationId":"createProjectActionPlansPlanItem","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanItem"}}}}},"summary":"POST /rest/v1.0/projects/{project_id}/action_plans/plans/{id}/items","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plans/{id}/items/{item_id}":{"delete":{"description":"Requires action_plans:write. Requires project action_plans delete permission, an enabled tool, matching tenant and visible plan. Permanently deletes the item, despite the service recycle name. Plans with configured assignments or blocking scopes must be draft or in_revision. Recalculates plan completion. Catalog presence does not grant authorization.","operationId":"deleteProjectActionPlansPlanItem","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"description":"Success with an empty response body"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Delete an action plan item","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false},"get":{"operationId":"getProjectActionPlansPlanItem","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanItem"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/action_plans/plans/{id}/items/{item_id}","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false},"patch":{"operationId":"updateProjectActionPlansPlanItem","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanItem"}}}}},"summary":"PATCH /rest/v1.0/projects/{project_id}/action_plans/plans/{id}/items/{item_id}","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plans/{id}/items/{item_id}/assign":{"patch":{"operationId":"assignProjectActionPlansPlanItem","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanItem"}}}}},"summary":"PATCH /rest/v1.0/projects/{project_id}/action_plans/plans/{id}/items/{item_id}/assign","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plans/{id}/items/{item_id}/assignments/{assignment_id}/sign_off":{"delete":{"description":"Requires action_plans:write. Requires project action_plans edit permission, an enabled tool, matching tenant and visible plan. Clears the assignment signature and recalculates plan completion. Only its assigned user or a project action_plans administrator may clear it. Configured plans must be published; downstream integrity conflicts return 409. Catalog presence does not grant authorization.","operationId":"deleteSignOffProjectActionPlansPlanItemAssignment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"assignment_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanItem"}}},"description":"Success"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Clear an individual assignment signature","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false},"post":{"description":"Requires action_plans:write. Requires project action_plans edit permission, an enabled tool, matching tenant and visible plan. Signs only this assignment; it does not close the item. The signer must be its assigned user; representing another signer requires project action_plans admin permission. Configured plans must be published; already signed or blocked assignments return 409. Workflow integrity is rechecked. Catalog presence does not grant authorization.","operationId":"signOffProjectActionPlansPlanItemAssignment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"assignment_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_WorkflowAssignmentSignOff"}}},"description":"An absent body uses the current actor and no note. If JSON is supplied it must match this wrapper.","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanItem"}}},"description":"Success"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Sign an individual plan-item assignment","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plans/{id}/items/{item_id}/reference":{"delete":{"description":"Requires action_plans:write. Requires project action_plans edit permission, an enabled tool, matching tenant and visible plan. Clears both reference fields without deleting the item; returns the updated item. Catalog presence does not grant authorization.","operationId":"deleteReferenceProjectActionPlansPlanItem","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanItem"}}},"description":"Success"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Clear an item source reference","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false},"patch":{"description":"Requires action_plans:write. Requires project action_plans edit permission, an enabled tool, matching tenant and visible plan. Both fields must be non-null or both null. Linking requires the source tool read scope and live source-record visibility in this project; unavailable sources are rejected. The response redacts source details when the caller lacks source access. Catalog presence does not grant authorization.","operationId":"referenceProjectActionPlansPlanItem","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_WorkflowReference"}}},"description":"JSON request body.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanItem"}}},"description":"Success"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Set or clear an item source reference","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plans/{id}/items/{item_id}/sign_off":{"delete":{"operationId":"deleteSignOffProjectActionPlansPlanItem","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanItem"}}}}},"summary":"DELETE /rest/v1.0/projects/{project_id}/action_plans/plans/{id}/items/{item_id}/sign_off","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false},"post":{"operationId":"signOffProjectActionPlansPlanItem","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanItem"}}}}},"summary":"POST /rest/v1.0/projects/{project_id}/action_plans/plans/{id}/items/{item_id}/sign_off","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plans/{id}/publish":{"patch":{"description":"Requires action_plans:write. Requires project action_plans edit permission, an enabled tool, matching tenant and visible plan. Sets status to in_progress. Every legacy hold point must have an explicit blocking scope or the operation returns 409. Source details retain their independent read-scope and record-visibility checks. Catalog presence does not grant authorization.","operationId":"publishProjectActionPlansPlan","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanShow"}}},"description":"Success"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Publish an action plan","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plans/{id}/recycle":{"delete":{"description":"Requires action_plans:write. Requires project action_plans delete permission, an enabled tool, matching tenant and visible plan. Soft-deletes the plan. PATCH and DELETE are equivalent aliases, both returning HTTP 200 with no body. Catalog presence does not grant authorization.","operationId":"deleteRecycleProjectActionPlansPlan","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"description":"Success with an empty response body"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Recycle an action plan","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false},"patch":{"description":"Requires action_plans:write. Requires project action_plans delete permission, an enabled tool, matching tenant and visible plan. Soft-deletes the plan. PATCH and DELETE are equivalent aliases, both returning HTTP 200 with no body. Catalog presence does not grant authorization.","operationId":"recycleProjectActionPlansPlan","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"description":"Success with an empty response body"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Recycle an action plan","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/plans/{id}/revise":{"patch":{"description":"Requires action_plans:write. Requires project action_plans edit permission, an enabled tool, matching tenant and visible plan. Sets status to in_revision for assignment and blocking-configuration edits. Source details retain their independent read-scope and record-visibility checks. Catalog presence does not grant authorization.","operationId":"reviseProjectActionPlansPlan","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/action_plans_PlanShow"}}},"description":"Success"},"400":{"description":"Invalid identity, signer selection, template state or malformed JSON"},"401":{"description":"Authentication required"},"403":{"description":"Missing token scope, role or source-record permission"},"404":{"description":"Record unavailable within the authorized company/project and visibility scope"},"409":{"description":"Workflow state, blocking configuration or signature conflict"},"422":{"description":"Invalid request schema"}},"summary":"Revise an action plan","tags":["action_plans"],"x-os-idempotent":true,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/action_plans/potential_assignees":{"get":{"operationId":"listProjectActionPlansPotentialAssignees","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login","name"],"type":"object"},"type":"array"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/action_plans/potential_assignees","tags":["action_plans"],"x-os-idempotent":false,"x-os-module":"action_plans","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/activities":{"get":{"description":"Requires the `view` permission on the project's activity tool. A scoped API token needs `activity:read`.","operationId":"listProjectActivities","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Page number, starting at 1.","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Records per page.","in":"query","name":"per_page","schema":{"minimum":1,"type":"integer"}},{"description":"Filters as `filters[field]=value` query parameters.","explode":true,"in":"query","name":"filters","schema":{"additionalProperties":true,"type":"object"},"style":"deepObject"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Project activity feed","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/analytics/catalog":{"get":{"description":"Read semantics: token scope `analytics:read` (not :write) plus analytics view. Every metric additionally needs read access to its source tool, the tool enabled, and the source's token scope; metrics failing that are listed in `unavailable` with null values, never 0.","operationId":"listProjectAnalyticsCatalog","parameters":[{"description":"Project id.","example":2,"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"compat":{"pm.rfis_late":["project","program"],"pm.rfis_open":["project","program"],"pm.rfis_total":["project","program"]},"dimensions":[{"description":"The project the record belongs to.","entity":"project","key":"project","label":"Project","type":"category"},{"description":"Portfolio program grouping projects.","entity":"program","key":"program","label":"Program","type":"category"}],"metrics":[{"additive":true,"description":"Number of rfis (excluding deleted).","direction":"neutral","domain":"pm","key":"pm.rfis_total","kind":"agg","label":"RFIs","source":"rfis","synonyms":["rfi","rfis"],"unit":"count"},{"additive":true,"description":"RFIs not yet closed.","direction":"lower_better","domain":"pm","key":"pm.rfis_open","kind":"agg","label":"Open rfis","snapshot":true,"source":"rfis","synonyms":["rfi","rfis"],"unit":"count"}],"sources":[{"defaultTime":"created","dims":["project","program"],"key":"rfis","label":"RFIs","privacy":"row","scopes":["rfis:read"],"tool":"rfis"},{"defaultTime":"created","dims":["project","program"],"key":"submittals","label":"Submittals","privacy":"row","scopes":["submittals:read"],"tool":"submittals"}]},"schema":{"$ref":"#/components/schemas/analytics_Catalog"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Catalog of metrics and dimensions readable by the caller (project)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/analytics/dashboards":{"get":{"description":"Visible = own private dashboards + project/company-visible ones the caller can view. Token scope: `analytics:read`.","operationId":"listProjectAnalyticsDashboards","parameters":[{"description":"Project id.","example":2,"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"private | project | company","in":"query","name":"filters[visibility]","required":false,"schema":{"type":"string"}},{"description":"Certified only","in":"query","name":"filters[certified]","required":false,"schema":{"type":"boolean"}},{"description":"Caller's favorites only","in":"query","name":"filters[favorite]","required":false,"schema":{"type":"boolean"}},{"description":"1-based page","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size (default 100, max 1000)","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":[{"can_edit":true,"certified":false,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.402Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/3/data","description":"From original budget to forecast at completion: the budget bridge, where costs are committed, which cost codes are burning fastest, and the spend curve.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/3/data?format=csv","favorite":false,"id":3,"name":"Riverside cost review","owner_id":2,"pack_key":"budget-cost","project_id":2,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"division","key":"division","kind":"multi","label":"Division"}],"tabs":[{"key":"forecast","label":"Forecast"},{"key":"codes","label":"Cost codes"}],"tiles":[{"filterMap":{"period":null},"id":"revised","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"forecast","title":"Revised budget","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"projected-costs","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.projected_costs"],"sort":[]},"tab":"forecast","title":"Projected costs","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.402Z","version":1,"view_count":0,"visibility":"project","web_url":"/companies/1/projects/2/tools/analytics/d/3"},{"can_edit":true,"certified":true,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.377Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/2/data","description":"Open and late RFIs, submittals and punch items, who holds the ball and for how long, turnaround trends and submittals at procurement risk.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/2/data?format=csv","favorite":false,"id":2,"name":"Riverside PM","owner_id":1,"pack_key":"project-management","project_id":2,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"location","key":"location","kind":"multi","label":"Location"}],"tabs":[{"key":"overview","label":"Overview"},{"key":"rfis","label":"RFIs"}],"tiles":[{"click":"drill","filterMap":{"period":null},"id":"rfis-open","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["pm.rfis_open"],"sort":[]},"tab":"overview","title":"Open RFIs","viz":{"options":{},"type":"kpi"}},{"click":"drill","filterMap":{"period":null},"id":"rfis-late","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["pm.rfis_late"],"sort":[]},"tab":"overview","title":"Late RFIs","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.377Z","version":1,"view_count":0,"visibility":"project","web_url":"/companies/1/projects/2/tools/analytics/d/2"}],"schema":{"items":{"$ref":"#/components/schemas/analytics_Dashboard"},"type":"array"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"List dashboards (project)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":true},"post":{"description":"Requires analytics standard. `spec` is a DashboardSpec, validated on write and read. Token scope: `analytics:write`.","operationId":"createProjectAnalyticsDashboard","parameters":[{"description":"Project id.","example":2,"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"dashboard":{"name":"PM weekly overview","spec":{"filters":[{"default":{"preset":"last_12m"},"dim":"created","key":"period","kind":"date_range","label":"Created"},{"dim":"status","key":"status","kind":"multi","label":"Status"}],"tiles":[{"id":"open","kind":"query","layout":{"h":2,"w":3,"x":0,"y":0},"query":{"metrics":["pm.rfis_open"]},"title":"Open RFIs","viz":{"options":{},"type":"kpi"}},{"id":"by_status","kind":"query","layout":{"h":4,"w":9,"x":3,"y":0},"query":{"dimensions":[{"key":"status"}],"metrics":["pm.rfis_total"]},"title":"RFIs by status","viz":{"options":{},"type":"bar"}}],"version":1},"visibility":"project"}},"schema":{"properties":{"dashboard":{"$ref":"#/components/schemas/analytics_DashboardInput"}},"required":["dashboard"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"example":{"can_edit":true,"certified":true,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.334Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data","description":"Contract value, forecast margin, WIP, cash and safety across every active project, ranked by where to look first.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?format=csv","favorite":false,"id":1,"name":"Executive Portfolio","owner_id":1,"pack_key":"executive-portfolio","project_id":null,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"region","key":"region","kind":"multi","label":"Region"}],"tabs":[{"key":"overview","label":"Overview"},{"key":"wip","label":"WIP & cash"}],"tiles":[{"filterMap":{"period":null},"id":"contract","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_contract_value"],"sort":[]},"tab":"overview","title":"Revised contract value","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"revised-budget","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"overview","title":"Revised budget","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.334Z","version":1,"view_count":0,"visibility":"company","web_url":"/companies/1/analytics/d/1"},"schema":{"$ref":"#/components/schemas/analytics_Dashboard"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Create a dashboard (project)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/analytics/dashboards/{id}":{"delete":{"description":"Soft delete. Owner or analytics admin. Token scope: `analytics:write`.","operationId":"deleteProjectAnalyticsDashboard","parameters":[{"description":"Project id.","example":2,"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Delete a dashboard (project)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false},"get":{"description":"Token scope: `analytics:read`.","operationId":"getProjectAnalyticsDashboard","parameters":[{"description":"Project id.","example":2,"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"certified":false,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.402Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/3/data","description":"From original budget to forecast at completion: the budget bridge, where costs are committed, which cost codes are burning fastest, and the spend curve.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/3/data?format=csv","favorite":false,"id":3,"name":"Riverside cost review","owner_id":2,"pack_key":"budget-cost","project_id":2,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"division","key":"division","kind":"multi","label":"Division"}],"tabs":[{"key":"forecast","label":"Forecast"},{"key":"codes","label":"Cost codes"}],"tiles":[{"filterMap":{"period":null},"id":"revised","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"forecast","title":"Revised budget","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"projected-costs","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.projected_costs"],"sort":[]},"tab":"forecast","title":"Projected costs","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.402Z","version":1,"view_count":0,"visibility":"project","web_url":"/companies/1/projects/2/tools/analytics/d/3"},"schema":{"$ref":"#/components/schemas/analytics_Dashboard"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Show a dashboard (project)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"patch":{"description":"Owner (standard) or analytics admin. `certified` is admin-only. Token scope: `analytics:write`.","operationId":"updateProjectAnalyticsDashboard","parameters":[{"description":"Project id.","example":2,"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"example":42,"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"dashboard":{"name":"PM weekly overview (FY27)","version":3}},"schema":{"properties":{"dashboard":{"$ref":"#/components/schemas/analytics_DashboardPatch"}},"required":["dashboard"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"can_edit":true,"certified":true,"certified_at":null,"certified_by":null,"company_id":1,"created_at":"2026-10-26T04:16:53.334Z","data_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data","description":"Contract value, forecast margin, WIP, cash and safety across every active project, ranked by where to look first.","export_url":"/rest/v1.0/companies/1/analytics/dashboards/1/data?format=csv","favorite":false,"id":1,"name":"Executive Portfolio","owner_id":1,"pack_key":"executive-portfolio","project_id":null,"spec":{"filters":[{"dim":"project","key":"project","kind":"multi","label":"Project"},{"dim":"region","key":"region","kind":"multi","label":"Region"}],"tabs":[{"key":"overview","label":"Overview"},{"key":"wip","label":"WIP & cash"}],"tiles":[{"filterMap":{"period":null},"id":"contract","kind":"query","layout":{"h":2,"w":2,"x":0,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_contract_value"],"sort":[]},"tab":"overview","title":"Revised contract value","viz":{"options":{},"type":"kpi"}},{"filterMap":{"period":null},"id":"revised-budget","kind":"query","layout":{"h":2,"w":2,"x":2,"y":0},"query":{"dimensions":[],"filters":[],"limit":1000,"metrics":["financials.revised_budget"],"sort":[]},"tab":"overview","title":"Revised budget","viz":{"options":{},"type":"kpi"}}],"version":1},"updated_at":"2026-10-26T04:16:53.334Z","version":1,"view_count":0,"visibility":"company","web_url":"/companies/1/analytics/d/1"},"schema":{"$ref":"#/components/schemas/analytics_Dashboard"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Conflict"}}},"description":"Edited by someone else since `version`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Update a dashboard (project)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/analytics/query":{"get":{"description":"Read semantics: token scope `analytics:read` (not :write) plus analytics view. Every metric additionally needs read access to its source tool, the tool enabled, and the source's token scope; metrics failing that are listed in `unavailable` with null values, never 0. Supports ETag / If-None-Match (304).","operationId":"listProjectAnalyticsQuery","parameters":[{"description":"Project id.","example":2,"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"base64url(JSON QuerySpec): the shared ?q= codec","in":"query","name":"q","required":true,"schema":{"type":"string"}},{"description":"An ETag from a previous response: 304 when unchanged.","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"columns":[{"key":"status","label":"Status","role":"dim","type":"string"},{"direction":"lower_better","key":"pm.rfis_open","label":"Open rfis","role":"metric","type":"number","unit":"count"}],"labels":{"status":{"closed":"Closed","draft":"Draft","open":"Open"}},"meta":{"asOf":"2026-10-26T04:52:51.361Z","cached":false,"ms":53,"plans":[{"source":"rfis","via":"base"}],"projects":1,"timezone":"UTC"},"partial":[],"rows":[["open",4],["closed",0],["draft",0]],"totals":[4,8],"truncated":false,"unavailable":[]},"schema":{"$ref":"#/components/schemas/analytics_QueryResult"}}},"description":"OK","headers":{"ETag":{"description":"Weak validator over the result. Send it back as If-None-Match.","schema":{"type":"string"}}}},"304":{"description":"Not modified (no body)."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"408":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Run an analytics query (project, GET form)","tags":["analytics"],"x-os-idempotent":false,"x-os-module":"analytics","x-os-paginated":false},"post":{"description":"Read semantics: token scope `analytics:read` (not :write) plus analytics view. Every metric additionally needs read access to its source tool, the tool enabled, and the source's token scope; metrics failing that are listed in `unavailable` with null values, never 0. POST is unavailable (403) on read-only (expired trial / suspended) workspaces; use the GET form with `?q=`. No ETag on POST.","operationId":"createProjectAnalyticsQuery","parameters":[{"description":"Project id.","example":2,"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"query":{"dimensions":[{"key":"status"}],"metrics":["pm.rfis_open","pm.rfis_total"],"time":{"preset":"last_90d"}}},"schema":{"properties":{"query":{"$ref":"#/components/schemas/analytics_QuerySpec"}},"required":["query"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"columns":[{"key":"status","label":"Status","role":"dim","type":"string"},{"direction":"lower_better","key":"pm.rfis_open","label":"Open rfis","role":"metric","type":"number","unit":"count"}],"labels":{"status":{"closed":"Closed","draft":"Draft","open":"Open"}},"meta":{"asOf":"2026-10-26T04:51:43.045Z","cached":false,"ms":391,"plans":[{"source":"rfis","via":"base"}],"projects":1,"timezone":"UTC"},"partial":[],"rows":[["open",4],["closed",0],["draft",0]],"totals":[4,8],"truncated":false,"unavailable":[]},"schema":{"$ref":"#/components/schemas/analytics_QueryResult"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"408":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Run an analytics query (project)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/analytics/query/detail":{"post":{"description":"Read semantics: token scope `analytics:read` (not :write) plus analytics view. Every metric additionally needs read access to its source tool, the tool enabled, and the source's token scope; metrics failing that are listed in `unavailable` with null values, never 0. POST is unavailable (403) on read-only (expired trial / suspended) workspaces; use the GET form with `?q=`. Keyset paging, 200 rows per page; each row deep-links to the record.","operationId":"createProjectAnalyticsQueryDetail","parameters":[{"description":"Project id.","example":2,"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"cell":[{"dim":"status","value":"open"}],"metric":"pm.rfis_open","query":{"dimensions":[{"key":"status"}],"metrics":["pm.rfis_open"]}},"schema":{"$ref":"#/components/schemas/analytics_DetailRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"columns":[{"key":"pm.rfis_open","label":"Open RFIs","type":"string"}],"next_cursor":"open","rows":[{"href":"/rest/v1.0/companies/1/analytics/dashboards/42/data","id":42,"project_id":2,"values":{}}],"source":"open","total":12},"schema":{"$ref":"#/components/schemas/analytics_DetailPage"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"408":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics_Error"}}},"description":"Error"}},"summary":"Records behind a result cell (project)","tags":["analytics"],"x-os-idempotent":true,"x-os-module":"analytics","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/available_punch_item_managers":{"get":{"operationId":"listProjectAvailablePunchItemManagers","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"query","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Punch List Manager options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/bid_packages":{"get":{"description":"Requires bidding:read and staff permission to view the project's Bidding tool. Returns active packages and their bidding metrics in ascending ID order.","operationId":"listProjectBidPackages","parameters":[{"description":"Project ID in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Page number.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Number of records per page.","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Repeat for multiple statuses. The closed filter also includes awarded packages.","explode":true,"in":"query","name":"filters[status]","required":false,"schema":{"items":{"enum":["draft","open","closed","awarded"],"type":"string"},"type":"array"},"style":"form"},{"description":"Case-insensitive text match against title or package number. Overrides other search parameters.","in":"query","name":"filters[query]","required":false,"schema":{"type":"string"}},{"description":"Case-insensitive title or package number search.","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Legacy alias for search. Used when search is omitted.","in":"query","name":"filter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/bidding_BidPackageListItem"},"type":"array"}}},"description":"Active bid packages.","headers":{"Link":{"description":"Navigation links for the current listing.","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size.","schema":{"minimum":1,"type":"integer"}},"Total":{"description":"Total records matching the request.","schema":{"minimum":0,"type":"integer"}}}},"401":{"description":"Authentication required."},"403":{"description":"Staff access and permission for this action in the project's enabled Bidding tool are required."},"404":{"description":"The project could not be found."}},"summary":"List project bid packages","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":true},"post":{"operationId":"createProjectBidPackage","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bid_package":{"properties":{"accept_post_due_submissions":{"type":"boolean"},"accounting_method":{"type":"string"},"anticipated_award_date":{"format":"date","type":"string"},"bid_due_date":{"format":"date-time","type":"string"},"bid_email_message":{"type":"string"},"bid_submission_confirmation":{"type":"string"},"bid_web_message":{"type":"string"},"blind_bidding":{"type":"boolean"},"business_classifications":{"items":{"properties":{"classification_abbreviation":{"type":"string"},"classification_key":{"type":"string"},"classification_name":{"type":"string"}},"type":"object"},"type":"array"},"display_project_name":{"type":"boolean"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"enable_prebid_walkthrough":{"type":"boolean"},"enable_public_discovery":{"type":"boolean"},"manager_id":{"type":"integer"},"number":{"type":"string"},"pre_bid_meeting_date":{"format":"date-time","type":"string"},"pre_bid_meeting_location":{"type":"string"},"pre_bid_meeting_notes":{"type":"string"},"pre_bid_meeting_online_link":{"type":"string"},"pre_bid_walk_through_date":{"format":"date-time","type":"string"},"pre_bid_walk_through_notes":{"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"public_bid_opening_details_date":{"format":"date-time","type":"string"},"public_bid_opening_details_location":{"type":"string"},"public_bid_opening_details_online_link":{"format":"uri","type":"string"},"public_project_funding_source":{"type":"string"},"require_nda":{"type":"boolean"},"show_location_for_nda_projects":{"type":"boolean"},"title":{"type":"string"},"trades_and_services":{"items":{"properties":{"trade_key":{"type":"string"},"trade_level":{"type":"string"},"trade_path":{"type":"string"}},"type":"object"},"type":"array"}},"required":["bid_due_date","bid_email_message","bid_web_message","title"],"title":"Bid Package","type":"object"}},"required":["bid_package"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"accept_post_due_submissions":{"type":"boolean"},"accounting_method":{"type":"string"},"allow_bidder_sum":{"type":"boolean"},"anticipated_award_date":{"format":"date","nullable":true,"type":"string"},"attachments_zip_streaming_url":{"type":"string"},"bid_docs_manifest":{"nullable":true,"properties":{"id":{"type":"integer"},"streaming_url":{"type":"string"}},"type":"object"},"bid_due_date":{"format":"date-time","type":"string"},"bid_email_message":{"type":"string"},"bid_emails_include_link_to_bidding_documents":{"type":"boolean"},"bid_form_sections_enabled":{"type":"boolean"},"bid_submission_confirmation":{"nullable":true,"type":"string"},"bid_web_message":{"type":"string"},"bidding_countdown_email_days":{"nullable":true,"type":"integer"},"blind_bidding":{"type":"boolean"},"business_classifications":{"items":{"properties":{"classification_abbreviation":{"nullable":true,"type":"string"},"classification_key":{"nullable":true,"type":"string"},"classification_name":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"created_by":{"properties":{"email":{"type":"string"},"first":{"type":"string"},"last":{"type":"string"},"numbers":{"type":"string"}},"type":"object"},"display_project_name":{"type":"boolean"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"properties":{"email":{"type":"string"},"first":{"type":"string"},"last":{"type":"string"},"numbers":{"type":"string"}},"type":"object"},"type":"array"},"enable_countdown_emails":{"type":"boolean"},"enable_prebid_rfi_deadline":{"type":"boolean"},"enable_prebid_walkthrough":{"type":"boolean"},"enable_public_discovery":{"nullable":true,"type":"boolean"},"flexible_response_types_enabled":{"type":"boolean"},"has_any_bid_invited":{"type":"boolean"},"has_bids_sent_nda":{"type":"boolean"},"has_no_nda_activity":{"type":"boolean"},"has_pdm_documents":{"type":"boolean"},"hidden":{"type":"boolean"},"id":{"type":"integer"},"links":{"properties":{"add_vendor":{"type":"string"},"analyticsEventsPath":{"type":"string"},"attach_documents":{"type":"string"},"bid_list":{"type":"string"},"bid_packages":{"type":"string"},"bid_packages_by_project":{"type":"string"},"bulk_create_bids":{"type":"string"},"cost_codes":{"type":"string"},"overview":{"type":"string"},"permission_templates":{"type":"string"},"submit":{"type":"string"},"trades":{"type":"string"},"vendors":{"type":"string"}},"type":"object"},"lock_quantity_fields_alternates":{"default":false,"type":"boolean"},"lock_quantity_fields_base_bid":{"default":false,"type":"boolean"},"lock_unit_fields_alternates":{"default":false,"type":"boolean"},"lock_unit_fields_base_bid":{"default":false,"type":"boolean"},"lump_sum_bidding":{"type":"boolean"},"manager":{"properties":{"contact_id":{"type":"integer"},"email":{"type":"string"},"invited":{"type":"boolean"},"job_title":{"type":"string"},"login_information_id":{"type":"integer"},"name":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"nda_attachments":{"items":{"properties":{"id":{"type":"string"},"item_id":{"type":"string"},"item_type":{"type":"string"},"name":{"type":"string"},"prostore_file_id":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"nda_invited_bids_with_activity_count":{"type":"integer"},"number":{"nullable":true,"type":"integer"},"open":{"type":"boolean"},"point_of_contact":{"properties":{"email":{"type":"string"},"first":{"type":"string"},"last":{"type":"string"},"numbers":{"type":"string"}},"type":"object"},"point_of_contact_login_id":{"nullable":true,"type":"integer"},"pre_bid_meeting_date":{"format":"date-time","nullable":true,"type":"string"},"pre_bid_meeting_location":{"nullable":true,"type":"string"},"pre_bid_meeting_notes":{"nullable":true,"type":"string"},"pre_bid_meeting_online_link":{"nullable":true,"type":"string"},"pre_bid_rfi_deadline_date":{"format":"date-time","nullable":true,"type":"string"},"pre_bid_walk_through_date":{"format":"date-time","nullable":true,"type":"string"},"pre_bid_walk_through_notes":{"nullable":true,"type":"string"},"primary_slug_with_ids":{"nullable":true,"type":"string"},"project_currency_display":{"type":"string"},"project_currency_iso_code":{"type":"string"},"project_id":{"type":"integer"},"project_image_url":{"nullable":true,"type":"string"},"project_latitude":{"nullable":true,"type":"string"},"project_location":{"type":"string"},"project_logo_name":{"nullable":true,"type":"string"},"project_logo_url":{"nullable":true,"type":"string"},"project_longitude":{"nullable":true,"type":"string"},"project_name":{"type":"string"},"public_bid_opening_details_date":{"format":"date-time","nullable":true,"type":"string"},"public_bid_opening_details_location":{"nullable":true,"type":"string"},"public_bid_opening_details_online_link":{"format":"uri","nullable":true,"type":"string"},"public_project_funding_source":{"nullable":true,"type":"string"},"release_required":{"type":"boolean"},"require_nda":{"type":"boolean"},"sealed":{"type":"boolean"},"show_bid_info":{"type":"boolean"},"show_location_for_nda_projects":{"type":"boolean"},"submitted_bids_count":{"type":"integer"},"title":{"type":"string"},"trades_and_services":{"items":{"properties":{"trade_key":{"nullable":true,"type":"string"},"trade_level":{"nullable":true,"type":"string"},"trade_path":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"vendor_revision":{"type":"integer"}},"type":"object"}}},"description":"Created as an internal draft; a reviewed vendor-visible release is required before opening or inviting bidders"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Bid Package","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/filter_options/status":{"get":{"description":"Requires bidding:read and staff permission to view the project's Bidding tool. Returns Open and Closed plus statuses present on active packages in the project.","operationId":"listProjectBidPackagesFilterOptionsStatus","parameters":[{"description":"Project ID in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/bidding_BidPackageStatusOption"},"type":"array"}}},"description":"Status filter options."},"401":{"description":"Authentication required."},"403":{"description":"Staff access and permission for this action in the project's enabled Bidding tool are required."},"404":{"description":"The project could not be found."}},"summary":"List project bid package status filter options","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/recycle_bin":{"get":{"description":"Requires bidding:read and staff permission to view the project's Bidding tool. Returns soft-deleted packages in ascending ID order.","operationId":"listProjectBidPackagesRecycleBin","parameters":[{"description":"Project ID in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Page number.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Number of records per page.","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Repeat for multiple statuses. The closed filter also includes awarded packages.","explode":true,"in":"query","name":"filters[status]","required":false,"schema":{"items":{"enum":["draft","open","closed","awarded"],"type":"string"},"type":"array"},"style":"form"},{"description":"Case-insensitive text match against title or package number. Overrides other search parameters.","in":"query","name":"filters[query]","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/bidding_RecycledBidPackageListItem"},"type":"array"}}},"description":"Recycled bid packages.","headers":{"Link":{"description":"Navigation links for the current listing.","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size.","schema":{"minimum":1,"type":"integer"}},"Total":{"description":"Total records matching the request.","schema":{"minimum":0,"type":"integer"}}}},"401":{"description":"Authentication required."},"403":{"description":"Staff access and permission for this action in the project's enabled Bidding tool are required."},"404":{"description":"The project could not be found."}},"summary":"List recycled project bid packages","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/addendum_acknowledgments":{"get":{"operationId":"listProjectBidPackageAddendumAcknowledgments","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":50,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"acknowledgments":{"items":{"$ref":"#/components/schemas/bidding_BidAddendumAcknowledgment"},"type":"array"},"current_version_total":{"minimum":0,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["acknowledgments","total","current_version_total"],"type":"object"}}},"description":"Bidding-view retained acknowledgment history; private no-store"},"403":{"description":"Insufficient Bidding or project access"},"404":{"description":"Package not found in this project"},"422":{"description":"History page exceeds supported range"}},"summary":"List retained bidder acknowledgments of reviewed package addenda; staff only","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/award":{"patch":{"operationId":"awardProjectBidPackage","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bid_id":{"type":"integer"}},"required":["bid_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"bids":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"status":{"type":"string"}},"type":"object"}}},"description":"Awarded bid package"}},"summary":"Award a submitted, reconciled bid","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/award_recommendations":{"get":{"operationId":"listProjectBidPackageAwardRecommendations","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":50,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"current":{"oneOf":[{"$ref":"#/components/schemas/bidding_BidAwardRecommendation"},{"enum":[null],"nullable":true,"type":"string"}]},"recommendations":{"items":{"$ref":"#/components/schemas/bidding_BidAwardRecommendation"},"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["current","recommendations","total"],"type":"object"}}},"description":"Bidding-view staff history; private no-store"},"403":{"description":"Bidding view permission, project, or tool access denied"},"404":{"description":"Package not found in this project"},"422":{"description":"History page exceeds supported range"}},"summary":"List retained staff award recommendations and independently approved current decision","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":true},"post":{"operationId":"createProjectBidPackageAwardRecommendation","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bidding_BidAwardRecommendationProposalInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bidding_BidAwardRecommendation"}}},"description":"Retained recommendation awaiting independent review; private no-store"},"403":{"description":"Bidding edit permission, project, or tool access denied"},"404":{"description":"Bid or package not found in this project"},"409":{"description":"Source changed, duplicate key changed payload, or recommendation conflicts"},"413":{"description":"Recommendation request body exceeds 24 KiB"},"422":{"description":"Invalid reason, review notes, cost codes, or request key"}},"summary":"Propose a reasoned selection against an exact fresh quote comparison","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/award_recommendations/preview":{"post":{"operationId":"createProjectBidPackageAwardRecommendationsPreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"bid_id":{"minimum":1,"type":"integer"}},"required":["bid_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bidding_BidAwardRecommendationPreview"}}},"description":"Current same-release quote comparison; private no-store"},"403":{"description":"Bidding edit permission, project, or tool access denied"},"404":{"description":"Bid or package not found in this project"},"409":{"description":"Release or quote receipts are stale or inconsistent"},"413":{"description":"Award preview request body exceeds 24 KiB"},"422":{"description":"Invalid selected bid"}},"summary":"Preview exact current frozen quotes for a staff award recommendation","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/award_recommendations/{recommendation_id}/approve":{"post":{"operationId":"approveProjectBidPackageAwardRecommendation","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"recommendation_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"reason":{"maxLength":1000,"minLength":10,"type":"string"},"request_key":{"format":"uuid","type":"string"},"source_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["source_sha256","reason","request_key"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bidding_BidAwardRecommendation"}}},"description":"Independent approval of exact current comparison; private no-store"},"403":{"description":"Bidding administrator permission, separate approver, project, or tool access denied"},"404":{"description":"Recommendation or package not found in this project"},"409":{"description":"Source or selected quote is stale, or idempotency key conflicts"},"413":{"description":"Approval request body exceeds 24 KiB"},"422":{"description":"Invalid approval input"}},"summary":"Independently approve the exact current recommendation; Bidding administrator only","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/bid_forms":{"get":{"description":"Requires bidding:read and staff permission to view the project's Bidding tool. Returns forms and their line items in position order.","operationId":"listProjectBidPackageBidForms","parameters":[{"description":"Project ID in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Bid package ID in the project.","in":"path","name":"bid_package_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Page number.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Number of records per page.","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/bidding_BidForm"},"type":"array"}}},"description":"Bid forms for the active package.","headers":{"Link":{"description":"Navigation links for the current listing.","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size.","schema":{"minimum":1,"type":"integer"}},"Total":{"description":"Total records matching the request.","schema":{"minimum":0,"type":"integer"}}}},"401":{"description":"Authentication required."},"403":{"description":"Staff access and permission for this action in the project's enabled Bidding tool are required."},"404":{"description":"The project or active bid package could not be found."}},"summary":"List bid forms on a project bid package","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":true},"post":{"description":"Requires bidding:write and staff permission to create in the project's Bidding tool. Forms in packages requiring a reviewed release can be changed in draft. Creating a form increments the vendor revision for those packages. Forms are locked after award conversion unless the conversion is reversed.","operationId":"createProjectBidPackageBidForm","parameters":[{"description":"Project ID in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Bid package ID in the project.","in":"path","name":"bid_package_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bid_form":{"properties":{"bid_form_items":{"items":{"$ref":"#/components/schemas/bidding_BidFormItemInput"},"type":"array"},"title":{"minLength":1,"pattern":"\\S","type":"string"}},"required":["title"],"type":"object"}},"required":["bid_form"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bidding_BidForm"}}},"description":"Created bid form."},"400":{"description":"Invalid JSON body."},"401":{"description":"Authentication required."},"403":{"description":"Staff access and permission for this action in the project's enabled Bidding tool are required."},"404":{"description":"The project or active bid package could not be found."},"409":{"description":"The package must return to draft or has a converted award that locks form changes."},"422":{"description":"The form input, financial values, or project cost-code references did not pass validation."}},"summary":"Create a bid form on a project bid package","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/bid_forms/{bid_form_id}/bid_leveling":{"get":{"operationId":"listProjectBidPackageBidFormBidLeveling","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_form_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"base_bid_section":{"properties":{"bid_form_items":{"items":{"properties":{"bid_items":{"items":{"properties":{"amount":{"nullable":true,"type":"number"},"bid_id":{"type":"integer"},"bid_item_id":{"nullable":true,"type":"integer"},"id":{"nullable":true,"type":"integer"},"included":{"type":"boolean"},"is_low":{"type":"boolean"},"quantity":{"nullable":true,"type":"string"},"unit_cost":{"nullable":true,"type":"string"},"uom":{"nullable":true,"type":"string"},"vendor_id":{"type":"integer"}},"required":["bid_id","vendor_id"],"type":"object"},"type":"array"},"cost_code_id":{"nullable":true,"type":"integer"},"full_code":{"nullable":true,"type":"string"},"id":{"type":"integer"},"low_amount":{"nullable":true,"type":"number"},"low_bid_ids":{"items":{"type":"integer"},"type":"array"},"name":{"nullable":true,"type":"string"},"position":{"type":"integer"},"quantity":{"nullable":true,"type":"string"},"subject":{"type":"string"},"uom":{"nullable":true,"type":"string"}},"required":["id","bid_items"],"type":"object"},"type":"array"},"id":{"type":"integer"},"position":{"type":"integer"},"section_totals":{"items":{"properties":{"bid_id":{"type":"integer"},"total":{"type":"number"},"vendor_id":{"type":"integer"},"vendor_name":{"type":"string"}},"required":["bid_id","total"],"type":"object"},"type":"array"},"title":{"type":"string"}},"required":["id","section_totals","bid_form_items"],"type":"object"},"bid_package_id":{"type":"integer"},"columns":{"items":{"properties":{"awarded":{"type":"boolean"},"bid_id":{"type":"integer"},"bid_status":{"type":"string"},"is_low":{"type":"boolean"},"submitted":{"type":"boolean"},"total":{"type":"number"},"translated_status":{"type":"string"},"vendor_id":{"type":"integer"},"vendor_name":{"type":"string"}},"required":["bid_id","vendor_id","total"],"type":"object"},"type":"array"},"low_total":{"nullable":true,"type":"number"},"low_total_bid_ids":{"items":{"type":"integer"},"type":"array"}},"required":["bid_package_id","columns","base_bid_section"],"type":"object"}}}},"409":{"description":"Reviewed packages use frozen quote award recommendation preview instead of mutable bid leveling"}},"summary":"Bid leveling across a bid form","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/bids":{"get":{"deprecated":true,"operationId":"listProjectBidPackageBids","parameters":[{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"awarded":{"nullable":true,"type":"boolean"},"bid_form_id":{"nullable":true,"type":"integer"},"bid_form_title":{"type":"string"},"bid_package_id":{"type":"integer"},"bid_package_title":{"type":"string"},"bid_requester":{"properties":{"business_phone":{"nullable":true,"type":"string"},"company":{"type":"string"},"company_address":{"type":"string"},"company_phone":{"nullable":true,"type":"string"},"company_website":{"nullable":true,"type":"string"},"contact":{"type":"string"},"email_address":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"vendor_address":{"type":"string"}},"type":"object"},"bid_status":{"enum":["undecided","will_not_bid","will_bid","not_invited","submitted"],"type":"string"},"bidder_comments":{"nullable":true,"type":"string"},"company_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"due_date":{"format":"date-time","type":"string"},"id":{"type":"integer"},"invitation_last_sent_at":{"format":"date-time","nullable":true,"type":"string"},"is_bidder_committed":{"nullable":true,"type":"boolean"},"lump_sum_amount":{"format":"float","type":"number"},"lump_sum_enabled":{"type":"boolean"},"project":{"properties":{"address":{"type":"string"},"name":{"type":"string"}},"type":"object"},"submitted":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"avatar_url":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"trades":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Bids within a Bid Package","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":true},"post":{"operationId":"createProjectBidPackageBid","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"items":{"properties":{"awarded":{"nullable":true,"type":"boolean"},"bid_form_id":{"nullable":true,"type":"integer"},"bid_form_title":{"type":"string"},"bid_package_id":{"type":"integer"},"bid_package_title":{"type":"string"},"bid_requester":{"properties":{"business_phone":{"nullable":true,"type":"string"},"company":{"type":"string"},"company_address":{"type":"string"},"company_phone":{"nullable":true,"type":"string"},"company_website":{"nullable":true,"type":"string"},"contact":{"type":"string"},"email_address":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"vendor_address":{"type":"string"}},"type":"object"},"bid_status":{"enum":["undecided","will_not_bid","will_bid","not_invited","submitted"],"type":"string"},"bidder_comments":{"nullable":true,"type":"string"},"company_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"due_date":{"format":"date-time","type":"string"},"id":{"type":"integer"},"invitation_last_sent_at":{"format":"date-time","nullable":true,"type":"string"},"is_bidder_committed":{"nullable":true,"type":"boolean"},"lump_sum_amount":{"format":"float","type":"number"},"lump_sum_enabled":{"type":"boolean"},"project":{"properties":{"address":{"type":"string"},"name":{"type":"string"}},"type":"object"},"submitted":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"avatar_url":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"trades":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"}}}}},"summary":"Invite vendors to a bid package","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/bids/{id}":{"get":{"deprecated":true,"operationId":"getProjectBidPackageBid","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"item_type":{"type":"string"},"name":{"type":"string"},"prostore_file_id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"attachments_zip_streaming_url":{"type":"string"},"awarded":{"nullable":true,"type":"boolean"},"bid_amount":{"format":"currency","nullable":true,"type":"string"},"bid_convertible_to_purchase_order":{"nullable":true,"type":"boolean"},"bid_convertible_to_subcontract":{"nullable":true,"type":"boolean"},"bid_form_title":{"type":"string"},"bid_items":{"items":{"properties":{"amount":{"format":"float","type":"number"},"bid_form_item_id":{"type":"integer"},"cost_code_id":{"nullable":true,"type":"integer"},"cost_code_name":{"type":"string"},"cost_code_number":{"type":"string"},"id":{"type":"integer"},"included":{"nullable":true,"type":"boolean"},"quantity":{"format":"float","nullable":true,"type":"string"},"unit_cost":{"format":"float","nullable":true,"type":"string"},"uom":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"bid_package_id":{"type":"integer"},"bid_package_title":{"type":"string"},"bid_requester":{"properties":{"business_phone":{"nullable":true,"type":"string"},"company":{"type":"string"},"company_address":{"type":"string"},"company_phone":{"nullable":true,"type":"string"},"company_website":{"nullable":true,"type":"string"},"contact":{"type":"string"},"email_address":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"vendor_address":{"type":"string"}},"type":"object"},"bid_status":{"enum":["not_invited","undecided","will_not_bid","will_bid","submitted","awarded"],"type":"string"},"bidder_comments":{"nullable":true,"type":"string"},"bidder_exclusion":{"nullable":true,"type":"string"},"bidder_inclusion":{"nullable":true,"type":"string"},"bidder_notes":{"type":"string"},"bidders_can_add_line_items":{"type":"boolean"},"company_id":{"type":"integer"},"contract_button_disabled_reason":{"nullable":true,"type":"string"},"cost_codes":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"due_date":{"format":"date-time","type":"string"},"id":{"type":"integer"},"invitation_last_sent_at":{"format":"date-time","nullable":true,"type":"string"},"is_bidder_committed":{"nullable":true,"type":"boolean"},"links":{"properties":{"bid_pdf":{"type":"string"},"cost_codes":{"type":"string"},"uploads":{"type":"string"}},"type":"object"},"lump_sum_amount":{"format":"float","type":"number"},"lump_sum_enabled":{"type":"boolean"},"mailto":{"type":"string"},"po_button_disabled_reason":{"nullable":true,"type":"string"},"project":{"properties":{"address":{"type":"string"},"name":{"type":"string"}},"type":"object"},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"recipient_list":{"items":{"properties":{"email":{"type":"string"},"first":{"type":"string"},"last":{"type":"string"},"numbers":{"type":"string"}},"type":"object"},"type":"array"},"recipient_list_with_email_and_number":{"items":{"type":"string"},"type":"array"},"show_bid_in_estimating":{"type":"boolean"},"submitted":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"},"values_converted_at":{"deprecated":true,"format":"date-time","nullable":true,"type":"string"},"values_converted_by_name":{"deprecated":true,"nullable":true,"type":"string"},"values_modified_at":{"format":"date-time","nullable":true,"type":"string"},"values_modified_by_name":{"nullable":true,"type":"string"},"vendor":{"properties":{"address":{"nullable":true,"type":"string"},"avatar_url":{"type":"string"},"business_phone":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"trades":{"type":"string"}},"type":"object"}},"title":"Bid","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Bids within a Bid package","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":false},"patch":{"deprecated":true,"operationId":"updateProjectBidPackageBid","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bid":{"properties":{"bidder_comments":{"type":"string"},"bidder_exclusion":{"type":"string"},"bidder_inclusion":{"type":"string"},"is_bidder_committed":{"type":"boolean"},"lump_sum_amount":{"format":"float","type":"number"},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"submitted":{"default":false,"type":"boolean"}},"type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"item_type":{"type":"string"},"name":{"type":"string"},"prostore_file_id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"attachments_zip_streaming_url":{"type":"string"},"awarded":{"nullable":true,"type":"boolean"},"bid_amount":{"format":"currency","nullable":true,"type":"string"},"bid_convertible_to_purchase_order":{"nullable":true,"type":"boolean"},"bid_convertible_to_subcontract":{"nullable":true,"type":"boolean"},"bid_form_title":{"type":"string"},"bid_items":{"items":{"properties":{"amount":{"format":"float","type":"number"},"bid_form_item_id":{"type":"integer"},"cost_code_id":{"nullable":true,"type":"integer"},"cost_code_name":{"type":"string"},"cost_code_number":{"type":"string"},"id":{"type":"integer"},"included":{"nullable":true,"type":"boolean"},"quantity":{"format":"float","nullable":true,"type":"string"},"unit_cost":{"format":"float","nullable":true,"type":"string"},"uom":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"bid_package_id":{"type":"integer"},"bid_package_title":{"type":"string"},"bid_requester":{"properties":{"business_phone":{"nullable":true,"type":"string"},"company":{"type":"string"},"company_address":{"type":"string"},"company_phone":{"nullable":true,"type":"string"},"company_website":{"nullable":true,"type":"string"},"contact":{"type":"string"},"email_address":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"mobile_phone":{"nullable":true,"type":"string"},"vendor_address":{"type":"string"}},"type":"object"},"bid_status":{"enum":["not_invited","undecided","will_not_bid","will_bid","submitted","awarded"],"type":"string"},"bidder_comments":{"nullable":true,"type":"string"},"bidder_exclusion":{"nullable":true,"type":"string"},"bidder_inclusion":{"nullable":true,"type":"string"},"bidder_notes":{"type":"string"},"bidders_can_add_line_items":{"type":"boolean"},"company_id":{"type":"integer"},"contract_button_disabled_reason":{"nullable":true,"type":"string"},"cost_codes":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"due_date":{"format":"date-time","type":"string"},"id":{"type":"integer"},"invitation_last_sent_at":{"format":"date-time","nullable":true,"type":"string"},"is_bidder_committed":{"nullable":true,"type":"boolean"},"links":{"properties":{"bid_pdf":{"type":"string"},"cost_codes":{"type":"string"},"uploads":{"type":"string"}},"type":"object"},"lump_sum_amount":{"format":"float","type":"number"},"lump_sum_enabled":{"type":"boolean"},"mailto":{"type":"string"},"po_button_disabled_reason":{"nullable":true,"type":"string"},"project":{"properties":{"address":{"type":"string"},"name":{"type":"string"}},"type":"object"},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"recipient_list":{"items":{"properties":{"email":{"type":"string"},"first":{"type":"string"},"last":{"type":"string"},"numbers":{"type":"string"}},"type":"object"},"type":"array"},"recipient_list_with_email_and_number":{"items":{"type":"string"},"type":"array"},"show_bid_in_estimating":{"type":"boolean"},"submitted":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"},"values_converted_at":{"deprecated":true,"format":"date-time","nullable":true,"type":"string"},"values_converted_by_name":{"deprecated":true,"nullable":true,"type":"string"},"values_modified_at":{"format":"date-time","nullable":true,"type":"string"},"values_modified_by_name":{"nullable":true,"type":"string"},"vendor":{"properties":{"address":{"nullable":true,"type":"string"},"avatar_url":{"type":"string"},"business_phone":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"trades":{"type":"string"}},"type":"object"}},"title":"Bid","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update a Bid from a Bid Package","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/bids/{id}/buyout_plan":{"get":{"operationId":"listProjectBidPackageBidBuyoutPlan","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Approved buyout plan; requires private Bidding, Budget, and Commitments access"},"403":{"description":"Insufficient access"},"404":{"description":"No approved plan"}},"summary":"Read the immutable approved vendor buyout plan","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":false},"post":{"operationId":"buyoutPlanProjectBidPackageBid","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"allocations":{"items":{"properties":{"amount":{"description":"Positive decimal vendor cost allocation","type":"string"},"cost_code_id":{"type":"integer"}},"required":["cost_code_id","amount"],"type":"object"},"minItems":1,"type":"array"},"request_key":{"description":"Idempotency key","format":"uuid","type":"string"},"review_token":{"type":"string"},"snapshot_id":{"type":"integer"}},"required":["snapshot_id","allocations","review_token"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Approved buyout plan or idempotent replay; requires Budget admin and private Bidding/Commitments access"},"400":{"description":"Invalid allocation"},"403":{"description":"Insufficient access"},"409":{"description":"Stale preview, budget over-allocation, or conflicting plan"}},"summary":"Approve an immutable vendor buyout plan after preview review","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/bids/{id}/buyout_plan/preview":{"post":{"operationId":"createProjectBidPackageBidBuyoutPlanPreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"allocations":{"items":{"properties":{"amount":{"description":"Positive decimal vendor cost allocation","type":"string"},"cost_code_id":{"type":"integer"}},"required":["cost_code_id","amount"],"type":"object"},"minItems":1,"type":"array"},"snapshot_id":{"type":"integer"}},"required":["snapshot_id","allocations"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Comparison, cost evidence, review token, and expiration; requires Budget admin and private Bidding/Commitments access"},"400":{"description":"Invalid allocation or snapshot"},"403":{"description":"Insufficient access"},"409":{"description":"Source or baseline conflict"}},"summary":"Preview private vendor buyout allocations against a captured Budget snapshot","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/bids/{id}/commitment_receipt":{"get":{"operationId":"listProjectBidPackageBidCommitmentReceipt","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"awarded_amount":{"type":"string"},"bid_id":{"type":"integer"},"bid_package_id":{"type":"integer"},"commitment_id":{"type":"integer"},"commitment_type":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"project_id":{"type":"integer"},"source_sha256":{"type":"string"},"source_snapshot":{"type":"object"},"vendor_id":{"type":"integer"}},"required":["id","project_id","bid_package_id","bid_id","vendor_id","commitment_type","commitment_id","awarded_amount","source_sha256","source_snapshot","created_by_id","created_at"],"type":"object"}}},"description":"Receipt; requires Bidding and private commitment schedule access"}},"summary":"Read the private immutable award to commitment source receipt","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/bids/{id}/submission_receipts":{"get":{"operationId":"listProjectBidPackageBidSubmissionReceipts","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":50,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"receipts":{"items":{"$ref":"#/components/schemas/bidding_BidSubmissionReceiptStaff"},"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["receipts","total"],"type":"object"}}},"description":"Bidding-view staff history; private no-store"},"403":{"description":"Insufficient Bidding access"},"404":{"description":"Bid or package not found in this project"},"422":{"description":"Receipt history page exceeds supported range"}},"summary":"List immutable quote revisions for one bidder; staff only","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/create_commitment":{"post":{"operationId":"createCommitmentProjectBidPackage","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bid_id":{"type":"integer"},"commitment_type":{"enum":["WorkOrderContract","PurchaseOrderContract"],"type":"string"},"fallback_cost_code_id":{"type":"integer"}},"required":["bid_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"commitment_id":{"type":"integer"},"commitment_type":{"type":"string"},"created":{"type":"boolean"}},"required":["commitment_id","commitment_type","created"],"type":"object"}}},"description":"Private draft commitment link"}},"summary":"Create or recover a private draft commitment from the award","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/invitations":{"get":{"description":"Requires bidding:read and staff permission to edit in the project's Bidding tool. Returns a page of invitation records for active bids in descending invitation ID order.","operationId":"listProjectBidPackageInvitations","parameters":[{"description":"Project ID in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Bid package ID in the project.","in":"path","name":"bid_package_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Page number.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Number of records per page.","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/bidding_StaffBidInvitation"},"type":"array"}}},"description":"Bid invitation records.","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}},"Link":{"description":"Navigation links for the current listing.","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size.","schema":{"minimum":1,"type":"integer"}},"Total":{"description":"Total records matching the request.","schema":{"minimum":0,"type":"integer"}}}},"401":{"description":"Authentication required."},"403":{"description":"Staff access and permission to edit in the project's enabled Bidding tool are required."},"404":{"description":"The project or active bid package could not be found."}},"summary":"List bid invitation records","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":true},"post":{"description":"Requires bidding:write and staff permission to edit in the project's Bidding tool. Choose a named, active project contact employed by the active bidder and an expiry within 30 days. The package must be open and any required release must be current. Creates an invitation, records the local outbox and may change the bid status to undecided. The outbox records a local handoff. Staff can copy the recipient link in the Bidding interface. Email delivery is unavailable. The same bid, request key, recipient, expiry and release return the existing invitation.","operationId":"createProjectBidPackageInvitation","parameters":[{"description":"Project ID in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Bid package ID in the project.","in":"path","name":"bid_package_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"invitation":{"additionalProperties":false,"properties":{"bid_id":{"description":"Active bid in this package.","maximum":9007199254740991,"minimum":1,"type":"integer"},"expires_at":{"description":"Expiry timestamp with a timezone offset or UTC. Must be within 30 days of creation.","format":"date-time","type":"string"},"recipient_user_id":{"description":"Active project contact employed by the bidder.","maximum":9007199254740991,"minimum":1,"type":"integer"},"request_key":{"description":"Stable request key for retries on this bid.","maxLength":128,"minLength":8,"type":"string"}},"required":["bid_id","recipient_user_id","expires_at","request_key"],"type":"object"}},"required":["invitation"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"invitation":{"$ref":"#/components/schemas/bidding_StaffBidInvitation"}},"required":["invitation"],"type":"object"}}},"description":"Saved bid invitation record.","headers":{"Cache-Control":{"schema":{"enum":["no-store"],"type":"string"}}}},"400":{"description":"Invalid JSON body."},"401":{"description":"Authentication required."},"403":{"description":"Staff access and permission to edit in the project's enabled Bidding tool are required."},"404":{"description":"The project, active bid package, or selected active bid could not be found."},"409":{"description":"The package is closed to invitations, its required release is stale, a saved outbox is unavailable, or the request key was used for a different invitation."},"422":{"description":"The invitation fields, expiry, or bidder contact did not pass validation."}},"summary":"Record a bid invitation locally","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/invitations/{invitation_id}":{"delete":{"description":"Requires bidding:write and staff permission to edit in the project's Bidding tool. Revokes the invitation so that its link can no longer be used. The invitation record remains available and revoking it again has the same outcome.","operationId":"deleteProjectBidPackageInvitation","parameters":[{"description":"Project ID in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Bid package ID in the project.","in":"path","name":"bid_package_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Invitation ID on a bid in the package.","in":"path","name":"invitation_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Invitation revoked."},"401":{"description":"Authentication required."},"403":{"description":"Staff access and permission to edit in the project's enabled Bidding tool are required."},"404":{"description":"The project, active bid package, or invitation could not be found."}},"summary":"Revoke a bid invitation","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/recycle":{"delete":{"description":"Requires bidding:write and administrative staff permission to delete in the project's Bidding tool. Soft-deletes the active package.","operationId":"deleteRecycleProjectBidPackage","parameters":[{"description":"Project ID in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Bid package ID in the project.","in":"path","name":"bid_package_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"enum":[true],"type":"boolean"}},"required":["ok"],"type":"object"}}},"description":"Bid package moved to the recycle bin."},"401":{"description":"Authentication required."},"403":{"description":"Staff access and permission for this action in the project's enabled Bidding tool are required."},"404":{"description":"The project or active bid package could not be found."}},"summary":"Move a bid package to the recycle bin","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false},"patch":{"description":"Requires bidding:write and administrative staff permission to delete in the project's Bidding tool. Soft-deletes the active package.","operationId":"recycleProjectBidPackage","parameters":[{"description":"Project ID in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Bid package ID in the project.","in":"path","name":"bid_package_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"enum":[true],"type":"boolean"}},"required":["ok"],"type":"object"}}},"description":"Bid package moved to the recycle bin."},"401":{"description":"Authentication required."},"403":{"description":"Staff access and permission for this action in the project's enabled Bidding tool are required."},"404":{"description":"The project or active bid package could not be found."}},"summary":"Move a bid package to the recycle bin","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/release":{"get":{"operationId":"listProjectBidPackageRelease","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"current":{"additionalProperties":false,"nullable":true,"properties":{"addendum_ack_required":{"type":"boolean"},"approved_at":{"format":"date-time","type":"string"},"bid_package_id":{"type":"integer"},"company_id":{"type":"integer"},"id":{"type":"integer"},"package_revision":{"minimum":1,"type":"integer"},"project_id":{"type":"integer"},"reason":{"type":"string"},"reviewed_by_id":{"type":"integer"},"snapshot":{"$ref":"#/components/schemas/bidding_BidPackageVendorSnapshot"},"snapshot_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["id","company_id","project_id","bid_package_id","package_revision","version","addendum_ack_required","reviewed_by_id","reason","snapshot_sha256","snapshot","approved_at"],"type":"object"},"total":{"minimum":0,"type":"integer"},"versions":{"items":{"additionalProperties":false,"properties":{"addendum_ack_required":{"type":"boolean"},"approved_at":{"format":"date-time","type":"string"},"bid_package_id":{"type":"integer"},"company_id":{"type":"integer"},"id":{"type":"integer"},"package_revision":{"minimum":1,"type":"integer"},"project_id":{"type":"integer"},"reason":{"type":"string"},"reviewed_by_id":{"type":"integer"},"snapshot":{"$ref":"#/components/schemas/bidding_BidPackageVendorSnapshot"},"snapshot_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["id","company_id","project_id","bid_package_id","package_revision","version","addendum_ack_required","reviewed_by_id","reason","snapshot_sha256","snapshot","approved_at"],"type":"object"},"type":"array"}},"required":["current","versions","total"],"type":"object"}}},"description":"Current digest-matching approval (or null) and historical versions; requires Bidding view","headers":{"Cache-Control":{"schema":{"enum":["private, no-store"],"type":"string"}},"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"description":"Insufficient Bidding access"},"404":{"description":"Bid package does not exist in this project"},"422":{"description":"Release history page exceeds the supported range"}},"summary":"Read the current vendor package release and paginated immutable release history","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":true},"post":{"operationId":"releaseProjectBidPackage","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"reason":{"maxLength":500,"minLength":10,"type":"string"},"request_key":{"maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9:_-]+$","type":"string"},"review_token":{"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"}},"required":["review_token","request_key","reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"addendum_ack_required":{"type":"boolean"},"approved_at":{"format":"date-time","type":"string"},"bid_package_id":{"type":"integer"},"company_id":{"type":"integer"},"id":{"type":"integer"},"package_revision":{"minimum":1,"type":"integer"},"project_id":{"type":"integer"},"reason":{"type":"string"},"reviewed_by_id":{"type":"integer"},"snapshot":{"$ref":"#/components/schemas/bidding_BidPackageVendorSnapshot"},"snapshot_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["id","company_id","project_id","bid_package_id","package_revision","version","addendum_ack_required","reviewed_by_id","reason","snapshot_sha256","snapshot","approved_at"],"type":"object"}}},"description":"Immutable private release receipt or an exact idempotent replay; requires Bidding edit"},"403":{"description":"Insufficient Bidding access"},"404":{"description":"Bid package does not exist in this project"},"409":{"description":"Stale review, changed package, or conflicting idempotency key"},"422":{"description":"Invalid approval input"}},"summary":"Approve a vendor-visible bid package release from an exact short-lived review","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/release/attachments":{"get":{"operationId":"listProjectBidPackageReleaseAttachments","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"attachments":{"items":{"$ref":"#/components/schemas/bidding_BidPackageReleaseAttachment"},"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["attachments","total"],"type":"object"}}},"description":"Staff-only classified and withdrawn attachment history; requires Bidding view"},"403":{"description":"Insufficient Bidding access"},"404":{"description":"Bid package does not exist in this project"},"422":{"description":"Attachment history page exceeds supported range"}},"summary":"List classified attachment evidence for one vendor package, including retained withdrawals","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":true},"post":{"operationId":"createProjectBidPackageReleaseAttachment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"oneOf":[{"required":["upload_uuid"]},{"required":["upload_id"]}],"properties":{"classification":{"enum":["vendor_visible"],"type":"string"},"reason":{"maxLength":500,"minLength":10,"type":"string"},"request_key":{"maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9:_-]+$","type":"string"},"upload_id":{"description":"Private verified Upload record in the same project","minimum":1,"type":"integer"},"upload_uuid":{"description":"Completed direct-upload session; local storage only","format":"uuid","type":"string"}},"required":["classification","reason","request_key"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bidding_BidPackageReleaseAttachment"}}},"description":"Classified attachment or exact request replay; requires Bidding edit and digest-bound clean scan"},"403":{"description":"Insufficient Bidding access"},"404":{"description":"Package or upload does not exist in this project"},"409":{"description":"Changed package, reused source, stale upload, or conflicting request key"},"422":{"description":"Invalid classification, source, type, size, or reason"},"503":{"description":"Trusted scanner or storage verification is unavailable"}},"summary":"Classify a verified private upload for a draft vendor package","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/release/attachments/{attachment_id}":{"delete":{"operationId":"deleteProjectBidPackageReleaseAttachment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"attachment_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"reason":{"maxLength":500,"minLength":10,"type":"string"}},"required":["reason"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bidding_BidPackageReleaseAttachment"}}},"description":"Retained withdrawal; requires Bidding edit"},"403":{"description":"Insufficient Bidding access"},"404":{"description":"Package or attachment does not exist in this project"},"409":{"description":"Package is not an eligible draft"},"422":{"description":"Invalid reason"}},"summary":"Withdraw a classified attachment from future vendor releases while retaining evidence","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/release/attachments/{attachment_id}/download":{"get":{"operationId":"listProjectBidPackageReleaseAttachmentDownload","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"attachment_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Verified staff-only classified attachment bytes, forced download; requires Bidding view","headers":{"Cache-Control":{"schema":{"enum":["private, no-store"],"type":"string"}},"Content-Disposition":{"schema":{"type":"string"}},"X-Content-Type-Options":{"schema":{"enum":["nosniff"],"type":"string"}}}},"403":{"description":"Insufficient Bidding access"},"404":{"description":"Classified attachment does not exist in this package"},"409":{"description":"Stored bytes or digest no longer match the classified evidence"}},"summary":"Inspect exact classified attachment bytes before approving a vendor release","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{bid_package_id}/release/preview":{"post":{"operationId":"createProjectBidPackageReleasePreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bid_package_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expires_at":{"format":"date-time","type":"string"},"package_revision":{"minimum":1,"type":"integer"},"review_token":{"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"},"snapshot":{"$ref":"#/components/schemas/bidding_BidPackageVendorSnapshot"},"snapshot_sha256":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["review_token","expires_at","snapshot_sha256","package_revision","snapshot"],"type":"object"}}},"description":"Short-lived private review token and vendor-visible snapshot; requires Bidding edit"},"400":{"description":"Preview request body is not accepted"},"403":{"description":"Insufficient Bidding access"},"404":{"description":"Bid package does not exist in this project"},"409":{"description":"Package is not an eligible draft"}},"summary":"Preview the exact vendor-visible bid package before a reviewed release","tags":["bidding"],"x-os-idempotent":true,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bid_packages/{id}":{"get":{"operationId":"getProjectBidPackage","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accept_post_due_submissions":{"type":"boolean"},"accounting_method":{"type":"string"},"allow_bidder_sum":{"type":"boolean"},"anticipated_award_date":{"format":"date","nullable":true,"type":"string"},"attachments_zip_streaming_url":{"type":"string"},"bid_docs_manifest":{"nullable":true,"properties":{"id":{"type":"integer"},"streaming_url":{"type":"string"}},"type":"object"},"bid_due_date":{"format":"date-time","type":"string"},"bid_email_message":{"type":"string"},"bid_emails_include_link_to_bidding_documents":{"type":"boolean"},"bid_form_sections_enabled":{"type":"boolean"},"bid_submission_confirmation":{"nullable":true,"type":"string"},"bid_web_message":{"type":"string"},"bidding_countdown_email_days":{"nullable":true,"type":"integer"},"blind_bidding":{"type":"boolean"},"business_classifications":{"items":{"properties":{"classification_abbreviation":{"nullable":true,"type":"string"},"classification_key":{"nullable":true,"type":"string"},"classification_name":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"created_by":{"properties":{"email":{"type":"string"},"first":{"type":"string"},"last":{"type":"string"},"numbers":{"type":"string"}},"type":"object"},"display_project_name":{"type":"boolean"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"properties":{"email":{"type":"string"},"first":{"type":"string"},"last":{"type":"string"},"numbers":{"type":"string"}},"type":"object"},"type":"array"},"enable_countdown_emails":{"type":"boolean"},"enable_prebid_rfi_deadline":{"type":"boolean"},"enable_prebid_walkthrough":{"type":"boolean"},"enable_public_discovery":{"nullable":true,"type":"boolean"},"flexible_response_types_enabled":{"type":"boolean"},"has_any_bid_invited":{"type":"boolean"},"has_bids_sent_nda":{"type":"boolean"},"has_no_nda_activity":{"type":"boolean"},"has_pdm_documents":{"type":"boolean"},"hidden":{"type":"boolean"},"id":{"type":"integer"},"links":{"properties":{"add_vendor":{"type":"string"},"analyticsEventsPath":{"type":"string"},"attach_documents":{"type":"string"},"bid_list":{"type":"string"},"bid_packages":{"type":"string"},"bid_packages_by_project":{"type":"string"},"bulk_create_bids":{"type":"string"},"cost_codes":{"type":"string"},"overview":{"type":"string"},"permission_templates":{"type":"string"},"submit":{"type":"string"},"trades":{"type":"string"},"vendors":{"type":"string"}},"type":"object"},"lock_quantity_fields_alternates":{"default":false,"type":"boolean"},"lock_quantity_fields_base_bid":{"default":false,"type":"boolean"},"lock_unit_fields_alternates":{"default":false,"type":"boolean"},"lock_unit_fields_base_bid":{"default":false,"type":"boolean"},"lump_sum_bidding":{"type":"boolean"},"manager":{"properties":{"contact_id":{"type":"integer"},"email":{"type":"string"},"invited":{"type":"boolean"},"job_title":{"type":"string"},"login_information_id":{"type":"integer"},"name":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"nda_attachments":{"items":{"properties":{"id":{"type":"string"},"item_id":{"type":"string"},"item_type":{"type":"string"},"name":{"type":"string"},"prostore_file_id":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"nda_invited_bids_with_activity_count":{"type":"integer"},"number":{"nullable":true,"type":"integer"},"open":{"type":"boolean"},"point_of_contact":{"properties":{"email":{"type":"string"},"first":{"type":"string"},"last":{"type":"string"},"numbers":{"type":"string"}},"type":"object"},"point_of_contact_login_id":{"nullable":true,"type":"integer"},"pre_bid_meeting_date":{"format":"date-time","nullable":true,"type":"string"},"pre_bid_meeting_location":{"nullable":true,"type":"string"},"pre_bid_meeting_notes":{"nullable":true,"type":"string"},"pre_bid_meeting_online_link":{"nullable":true,"type":"string"},"pre_bid_rfi_deadline_date":{"format":"date-time","nullable":true,"type":"string"},"pre_bid_walk_through_date":{"format":"date-time","nullable":true,"type":"string"},"pre_bid_walk_through_notes":{"nullable":true,"type":"string"},"primary_slug_with_ids":{"nullable":true,"type":"string"},"project_currency_display":{"type":"string"},"project_currency_iso_code":{"type":"string"},"project_id":{"type":"integer"},"project_image_url":{"nullable":true,"type":"string"},"project_latitude":{"nullable":true,"type":"string"},"project_location":{"type":"string"},"project_logo_name":{"nullable":true,"type":"string"},"project_logo_url":{"nullable":true,"type":"string"},"project_longitude":{"nullable":true,"type":"string"},"project_name":{"type":"string"},"public_bid_opening_details_date":{"format":"date-time","nullable":true,"type":"string"},"public_bid_opening_details_location":{"nullable":true,"type":"string"},"public_bid_opening_details_online_link":{"format":"uri","nullable":true,"type":"string"},"public_project_funding_source":{"nullable":true,"type":"string"},"release_required":{"type":"boolean"},"require_nda":{"type":"boolean"},"sealed":{"type":"boolean"},"show_bid_info":{"type":"boolean"},"show_location_for_nda_projects":{"type":"boolean"},"submitted_bids_count":{"type":"integer"},"title":{"type":"string"},"trades_and_services":{"items":{"properties":{"trade_key":{"nullable":true,"type":"string"},"trade_level":{"nullable":true,"type":"string"},"trade_path":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"vendor_revision":{"type":"integer"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Bid Package","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":false},"patch":{"operationId":"updateProjectBidPackage","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bid_package":{"properties":{"accept_post_due_submissions":{"type":"boolean"},"accounting_method":{"type":"string"},"anticipated_award_date":{"format":"date","type":"string"},"bid_due_date":{"format":"date-time","type":"string"},"bid_email_message":{"type":"string"},"bid_submission_confirmation":{"type":"string"},"bid_web_message":{"type":"string"},"blind_bidding":{"type":"boolean"},"business_classifications":{"items":{"properties":{"classification_abbreviation":{"type":"string"},"classification_key":{"type":"string"},"classification_name":{"type":"string"}},"type":"object"},"type":"array"},"display_project_name":{"type":"boolean"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"enable_prebid_walkthrough":{"type":"boolean"},"enable_public_discovery":{"type":"boolean"},"manager_id":{"type":"integer"},"number":{"type":"string"},"pre_bid_meeting_date":{"format":"date-time","type":"string"},"pre_bid_meeting_location":{"type":"string"},"pre_bid_meeting_notes":{"type":"string"},"pre_bid_meeting_online_link":{"type":"string"},"pre_bid_walk_through_date":{"format":"date-time","type":"string"},"pre_bid_walk_through_notes":{"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"public_bid_opening_details_date":{"format":"date-time","type":"string"},"public_bid_opening_details_location":{"type":"string"},"public_bid_opening_details_online_link":{"format":"uri","type":"string"},"public_project_funding_source":{"type":"string"},"require_nda":{"type":"boolean"},"show_location_for_nda_projects":{"type":"boolean"},"title":{"type":"string"},"trades_and_services":{"items":{"properties":{"trade_key":{"type":"string"},"trade_level":{"type":"string"},"trade_path":{"type":"string"}},"type":"object"},"type":"array"}},"required":["bid_due_date","bid_email_message","bid_web_message","title"],"title":"Bid Package","type":"object"}},"required":["bid_package"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accept_post_due_submissions":{"type":"boolean"},"accounting_method":{"type":"string"},"allow_bidder_sum":{"type":"boolean"},"anticipated_award_date":{"format":"date","nullable":true,"type":"string"},"attachments_zip_streaming_url":{"type":"string"},"bid_docs_manifest":{"nullable":true,"properties":{"id":{"type":"integer"},"streaming_url":{"type":"string"}},"type":"object"},"bid_due_date":{"format":"date-time","type":"string"},"bid_email_message":{"type":"string"},"bid_emails_include_link_to_bidding_documents":{"type":"boolean"},"bid_form_sections_enabled":{"type":"boolean"},"bid_submission_confirmation":{"nullable":true,"type":"string"},"bid_web_message":{"type":"string"},"bidding_countdown_email_days":{"nullable":true,"type":"integer"},"blind_bidding":{"type":"boolean"},"business_classifications":{"items":{"properties":{"classification_abbreviation":{"nullable":true,"type":"string"},"classification_key":{"nullable":true,"type":"string"},"classification_name":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"created_by":{"properties":{"email":{"type":"string"},"first":{"type":"string"},"last":{"type":"string"},"numbers":{"type":"string"}},"type":"object"},"display_project_name":{"type":"boolean"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"properties":{"email":{"type":"string"},"first":{"type":"string"},"last":{"type":"string"},"numbers":{"type":"string"}},"type":"object"},"type":"array"},"enable_countdown_emails":{"type":"boolean"},"enable_prebid_rfi_deadline":{"type":"boolean"},"enable_prebid_walkthrough":{"type":"boolean"},"enable_public_discovery":{"nullable":true,"type":"boolean"},"flexible_response_types_enabled":{"type":"boolean"},"has_any_bid_invited":{"type":"boolean"},"has_bids_sent_nda":{"type":"boolean"},"has_no_nda_activity":{"type":"boolean"},"has_pdm_documents":{"type":"boolean"},"hidden":{"type":"boolean"},"id":{"type":"integer"},"links":{"properties":{"add_vendor":{"type":"string"},"analyticsEventsPath":{"type":"string"},"attach_documents":{"type":"string"},"bid_list":{"type":"string"},"bid_packages":{"type":"string"},"bid_packages_by_project":{"type":"string"},"bulk_create_bids":{"type":"string"},"cost_codes":{"type":"string"},"overview":{"type":"string"},"permission_templates":{"type":"string"},"submit":{"type":"string"},"trades":{"type":"string"},"vendors":{"type":"string"}},"type":"object"},"lock_quantity_fields_alternates":{"default":false,"type":"boolean"},"lock_quantity_fields_base_bid":{"default":false,"type":"boolean"},"lock_unit_fields_alternates":{"default":false,"type":"boolean"},"lock_unit_fields_base_bid":{"default":false,"type":"boolean"},"lump_sum_bidding":{"type":"boolean"},"manager":{"properties":{"contact_id":{"type":"integer"},"email":{"type":"string"},"invited":{"type":"boolean"},"job_title":{"type":"string"},"login_information_id":{"type":"integer"},"name":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"nda_attachments":{"items":{"properties":{"id":{"type":"string"},"item_id":{"type":"string"},"item_type":{"type":"string"},"name":{"type":"string"},"prostore_file_id":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"nda_invited_bids_with_activity_count":{"type":"integer"},"number":{"nullable":true,"type":"integer"},"open":{"type":"boolean"},"point_of_contact":{"properties":{"email":{"type":"string"},"first":{"type":"string"},"last":{"type":"string"},"numbers":{"type":"string"}},"type":"object"},"point_of_contact_login_id":{"nullable":true,"type":"integer"},"pre_bid_meeting_date":{"format":"date-time","nullable":true,"type":"string"},"pre_bid_meeting_location":{"nullable":true,"type":"string"},"pre_bid_meeting_notes":{"nullable":true,"type":"string"},"pre_bid_meeting_online_link":{"nullable":true,"type":"string"},"pre_bid_rfi_deadline_date":{"format":"date-time","nullable":true,"type":"string"},"pre_bid_walk_through_date":{"format":"date-time","nullable":true,"type":"string"},"pre_bid_walk_through_notes":{"nullable":true,"type":"string"},"primary_slug_with_ids":{"nullable":true,"type":"string"},"project_currency_display":{"type":"string"},"project_currency_iso_code":{"type":"string"},"project_id":{"type":"integer"},"project_image_url":{"nullable":true,"type":"string"},"project_latitude":{"nullable":true,"type":"string"},"project_location":{"type":"string"},"project_logo_name":{"nullable":true,"type":"string"},"project_logo_url":{"nullable":true,"type":"string"},"project_longitude":{"nullable":true,"type":"string"},"project_name":{"type":"string"},"public_bid_opening_details_date":{"format":"date-time","nullable":true,"type":"string"},"public_bid_opening_details_location":{"nullable":true,"type":"string"},"public_bid_opening_details_online_link":{"format":"uri","nullable":true,"type":"string"},"public_project_funding_source":{"nullable":true,"type":"string"},"release_required":{"type":"boolean"},"require_nda":{"type":"boolean"},"sealed":{"type":"boolean"},"show_bid_info":{"type":"boolean"},"show_location_for_nda_projects":{"type":"boolean"},"submitted_bids_count":{"type":"integer"},"title":{"type":"string"},"trades_and_services":{"items":{"properties":{"trade_key":{"nullable":true,"type":"string"},"trade_level":{"nullable":true,"type":"string"},"trade_path":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"vendor_revision":{"type":"integer"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Bid Package","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bim_models":{"get":{"operationId":"listProjectBimModels","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"auto_publish":{"type":"boolean"},"coordination_issues_count":{"type":"integer"},"current_revision_id":{"type":["integer","null"]},"discipline":{"type":["string","null"]},"id":{"type":"integer"},"name":{"type":"string"},"open_coordination_issues_count":{"type":"integer"},"project_id":{"type":"integer"},"published":{"type":"boolean"},"revisions_count":{"type":"integer"},"title":{"type":"string"},"viewpoints_count":{"type":"integer"},"web_url":{"type":"string"}},"required":["id","title","name","project_id","auto_publish","web_url","revisions_count","open_coordination_issues_count"],"type":"object"},"type":"array"}}}}},"summary":"List BIM models","tags":["models"],"x-os-idempotent":false,"x-os-module":"models","x-os-paginated":false},"post":{"operationId":"createProjectBimModel","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"auto_publish":{"type":"boolean"},"current_revision_id":{"type":["integer","null"]},"discipline":{"type":["string","null"]},"id":{"type":"integer"},"name":{"type":"string"},"project_id":{"type":"integer"},"published":{"type":"boolean"},"revisions":{"items":{"type":"object"},"type":"array"},"revisions_count":{"type":"integer"},"title":{"type":"string"},"web_url":{"type":"string"}},"required":["id","name","project_id","auto_publish","web_url","revisions_count","revisions"],"type":"object"}}}}},"summary":"Create BIM model","tags":["models"],"x-os-idempotent":true,"x-os-module":"models","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bim_models/federated_models":{"get":{"operationId":"listProjectBimModelsFederatedModels","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"models_count":{"type":"integer"},"options":{"items":{"properties":{"bim_model_id":{"type":"integer"},"current":{"type":"boolean"},"discipline":{"type":["string","null"]},"name":{"type":"string"},"revision_id":{"type":"integer"},"revision_number":{"type":"integer"},"upload_id":{"type":"integer"},"url":{"type":"string"}},"required":["revision_id","upload_id","bim_model_id","name","current"],"type":"object"},"type":"array"},"selected":{"items":{"properties":{"bim_model_id":{"type":"integer"},"current":{"type":"boolean"},"name":{"type":"string"},"revision_id":{"type":"integer"},"upload_id":{"type":"integer"}},"required":["revision_id","upload_id","bim_model_id","name","current"],"type":"object"},"type":"array"}},"required":["models_count","options","selected"],"type":"object"}}}}},"summary":"Federated model composition (file-bound revisions)","tags":["models"],"x-os-idempotent":false,"x-os-module":"models","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bim_models/{bim_model_id}":{"get":{"operationId":"getProjectBimModel","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bim_model_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"auto_publish":{"type":"boolean"},"coordination_issues_count":{"type":"integer"},"current_revision_id":{"type":["integer","null"]},"discipline":{"type":["string","null"]},"id":{"type":"integer"},"name":{"type":"string"},"open_coordination_issues_count":{"type":"integer"},"project_id":{"type":"integer"},"published":{"type":"boolean"},"revisions":{"items":{"type":"object"},"type":"array"},"revisions_count":{"type":"integer"},"title":{"type":"string"},"viewpoints_count":{"type":"integer"},"web_url":{"type":"string"}},"required":["id","name","project_id","auto_publish","web_url","revisions_count","open_coordination_issues_count","revisions"],"type":"object"}}}}},"summary":"Show BIM model","tags":["models"],"x-os-idempotent":false,"x-os-module":"models","x-os-paginated":false},"patch":{"operationId":"updateProjectBimModel","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bim_model_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Update BIM model","tags":["models"],"x-os-idempotent":false,"x-os-module":"models","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bim_models/{bim_model_id}/coordination_issues":{"get":{"operationId":"listProjectBimModelCoordinationIssues","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bim_model_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"assignee_id":{"type":["integer","null"]},"bim_model_id":{"type":"integer"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"position":{"properties":{"x":{"type":"number"},"y":{"type":"number"},"z":{"type":"number"}},"required":["x","y","z"],"type":"object"},"project_id":{"type":"integer"},"status":{"enum":["open","closed"],"type":"string"},"title":{"type":"string"},"translated_status":{"type":"string"}},"required":["id","bim_model_id","title","status","position"],"type":"object"},"type":"array"}}}}},"summary":"List coordination issues","tags":["models"],"x-os-idempotent":false,"x-os-module":"models","x-os-paginated":false},"post":{"operationId":"createProjectBimModelCoordinationIssue","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bim_model_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"assignee_id":{"type":["integer","null"]},"bim_model_id":{"type":"integer"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"position":{"properties":{"x":{"type":"number"},"y":{"type":"number"},"z":{"type":"number"}},"required":["x","y","z"],"type":"object"},"project_id":{"type":"integer"},"status":{"enum":["open","closed"],"type":"string"},"title":{"type":"string"},"translated_status":{"type":"string"}},"required":["id","bim_model_id","title","status","position"],"type":"object"}}}}},"summary":"Create coordination issue","tags":["models"],"x-os-idempotent":true,"x-os-module":"models","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bim_models/{bim_model_id}/coordination_issues/{id}":{"get":{"operationId":"getProjectBimModelCoordinationIssue","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bim_model_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"bim_model_id":{"type":"integer"},"id":{"type":"integer"},"position":{"properties":{"x":{"type":"number"},"y":{"type":"number"},"z":{"type":"number"}},"required":["x","y","z"],"type":"object"},"status":{"enum":["open","closed"],"type":"string"},"title":{"type":"string"}},"required":["id","bim_model_id","title","status","position"],"type":"object"}}}}},"summary":"Show coordination issue","tags":["models"],"x-os-idempotent":false,"x-os-module":"models","x-os-paginated":false},"patch":{"operationId":"updateProjectBimModelCoordinationIssue","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bim_model_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"bim_model_id":{"type":"integer"},"id":{"type":"integer"},"position":{"properties":{"x":{"type":"number"},"y":{"type":"number"},"z":{"type":"number"}},"required":["x","y","z"],"type":"object"},"status":{"enum":["open","closed"],"type":"string"},"title":{"type":"string"}},"required":["id","bim_model_id","title","status","position"],"type":"object"}}}}},"summary":"Update coordination issue","tags":["models"],"x-os-idempotent":true,"x-os-module":"models","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bim_models/{bim_model_id}/linked_coordination_issues":{"get":{"description":"Requires the `view` permission on the project's models tool. A scoped API token needs `models:read`.","operationId":"listProjectBimModelLinkedCoordinationIssues","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bim_model_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"List BIM model linked coordination issues","tags":["models"],"x-os-idempotent":false,"x-os-module":"models","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bim_models/{bim_model_id}/revisions":{"get":{"operationId":"listProjectBimModelRevisions","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bim_model_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"bim_file":{"type":["object","null"]},"bim_model_id":{"type":"integer"},"created_by_id":{"type":["integer","null"]},"id":{"type":"integer"},"publish_status":{"type":"string"},"published":{"type":"boolean"},"revision":{"type":"integer"},"revision_number":{"type":"integer"},"source":{"type":["string","null"]},"suitability":{"type":["string","null"]},"uploaded_by_id":{"type":["integer","null"]}},"required":["id","bim_model_id","revision_number","revision","publish_status","published"],"type":"object"},"type":"array"}}}}},"summary":"List revisions","tags":["models"],"x-os-idempotent":false,"x-os-module":"models","x-os-paginated":false},"post":{"operationId":"createProjectBimModelRevision","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bim_model_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"bim_model_id":{"type":"integer"},"id":{"type":"integer"},"revision_number":{"type":"integer"},"source":{"type":["string","null"]},"uploaded_by_id":{"type":["integer","null"]}},"required":["id","bim_model_id","revision_number"],"type":"object"}}}}},"summary":"Create revision","tags":["models"],"x-os-idempotent":true,"x-os-module":"models","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/bim_models/{bim_model_id}/viewpoints":{"get":{"operationId":"listProjectBimModelViewpoints","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bim_model_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"bim_model_id":{"type":"integer"},"camera":{"properties":{"position":{"items":{"type":"number"},"type":"array"},"target":{"items":{"type":"number"},"type":"array"},"zoom":{"type":"number"}},"required":["position","target"],"type":"object"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","bim_model_id","name","camera"],"type":"object"},"type":"array"}}}}},"summary":"List viewpoints","tags":["models"],"x-os-idempotent":false,"x-os-module":"models","x-os-paginated":false},"post":{"operationId":"createProjectBimModelViewpoint","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bim_model_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"bim_model_id":{"type":"integer"},"camera":{"properties":{"position":{"items":{"type":"number"},"type":"array"},"target":{"items":{"type":"number"},"type":"array"},"zoom":{"type":"number"}},"required":["position","target"],"type":"object"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","bim_model_id","name","camera"],"type":"object"}}}}},"summary":"Create viewpoint","tags":["models"],"x-os-idempotent":true,"x-os-module":"models","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/budget/lock":{"delete":{"description":"Requires budget:write and current project admin permission. Company is derived from authentication; path, query or body project must be authorized. Returns the lock JSON with locked false; this is not a 204 response. No request body.","operationId":"deleteProjectBudgetLock","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/budget_Lock"}}},"description":"Successful response"},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Current actor or token permission denied"},"404":{"description":"Resource not found in authorized project"},"409":{"description":"Reserved or inconsistent change-event projection"},"422":{"description":"Validation or locked-budget constraint"}},"summary":"Unlock original budget","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false},"get":{"description":"Requires budget:read and current project view permission. Company is derived from authentication; path, query or body project must be authorized. An absent lock is returned as unlocked with null owner and timestamp.","operationId":"listProjectBudgetLock","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/budget_Lock"}}},"description":"Successful response"},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Current actor or token permission denied"},"404":{"description":"Resource not found in authorized project"},"409":{"description":"Reserved or inconsistent change-event projection"},"422":{"description":"Validation or locked-budget constraint"}},"summary":"Read original budget lock","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":false},"post":{"description":"Requires budget:write and current project admin permission. Company is derived from authentication; path, query or body project must be authorized. Locks original-budget editing. Approved manual budget changes remain supported. No request body.","operationId":"createProjectBudgetLock","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/budget_Lock"}}},"description":"Successful response"},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Current actor or token permission denied"},"404":{"description":"Resource not found in authorized project"},"409":{"description":"Reserved or inconsistent change-event projection"},"422":{"description":"Validation or locked-budget constraint"}},"summary":"Lock original budget","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/budget_change_history":{"get":{"description":"Requires budget:read and current project view permission. Company is derived from authentication; path, query or body project must be authorized. Unpaginated current non-deleted changes, including drafts. This is not the immutable posting journal; edits and deletion change this listing.","operationId":"listProjectBudgetChangeHistory","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/budget_History"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Successful response"},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Current actor or token permission denied"},"404":{"description":"Resource not found in authorized project"},"409":{"description":"Reserved or inconsistent change-event projection"},"422":{"description":"Validation or locked-budget constraint"}},"summary":"Read current budget change history","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/budget_changes":{"get":{"description":"Requires budget:read and current project view permission. Company is derived from authentication; path, query or body project must be authorized. Total, Per-Page and Link headers. Only the status filter is honored; no search filter.","operationId":"listProjectBudgetChanges","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"explode":false,"in":"query","name":"filters[status]","required":false,"schema":{"items":{"enum":["draft","under_review","approved","void"],"type":"string"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/budget_Change"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Successful response","headers":{"Link":{"description":"Pagination navigation links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"string"}},"Total":{"description":"Total matching rows","schema":{"type":"string"}}}},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Current actor or token permission denied"},"404":{"description":"Resource not found in authorized project"},"409":{"description":"Reserved or inconsistent change-event projection"},"422":{"description":"Validation or locked-budget constraint"}},"summary":"List budget changes","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":true},"post":{"description":"Requires budget:write and current project create permission. Company is derived from authentication; path, query or body project must be authorized. Permitted while the original budget is locked. Defaults to draft; approved creation immediately affects approved changes. CE- numbers are reserved and return 409. Adjustments must reference cost codes and optional matching budget lines in this project.","operationId":"createProjectBudgetChange","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/budget_Create"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/budget_Change"}}},"description":"Successful response"},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Current actor or token permission denied"},"404":{"description":"Resource not found in authorized project"},"409":{"description":"Reserved or inconsistent change-event projection"},"422":{"description":"Validation or locked-budget constraint"}},"summary":"Create manual budget change","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/budget_changes/{id}":{"delete":{"description":"Requires budget:write and current project delete permission. Company is derived from authentication; path, query or body project must be authorized. Soft-deletes a manual change; removes its contribution to live totals. CE-owned projections return 409 and must be changed through their source.","operationId":"deleteProjectBudgetChange","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted; empty response"},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Current actor or token permission denied"},"404":{"description":"Resource not found in authorized project"},"409":{"description":"Reserved or inconsistent change-event projection"},"422":{"description":"Validation or locked-budget constraint"}},"summary":"Delete manual budget change","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false},"get":{"description":"Requires budget:read and current project view permission. Company is derived from authentication; path, query or body project must be authorized. ","operationId":"getProjectBudgetChange","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/budget_Change"}}},"description":"Successful response"},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Current actor or token permission denied"},"404":{"description":"Resource not found in authorized project"},"409":{"description":"Reserved or inconsistent change-event projection"},"422":{"description":"Validation or locked-budget constraint"}},"summary":"Read budget change","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":false},"patch":{"description":"Requires budget:write and current project edit permission. Company is derived from authentication; path, query or body project must be authorized. Edit permission may approve or reopen a manual change, including while the original budget is locked. Supplying adjustments replaces the full adjustment list; omitted adjustments remain. CE-owned projections must be changed through the source change event and return 409 here.","operationId":"updateProjectBudgetChange","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/budget_Update"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/budget_Change"}}},"description":"Successful response"},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Current actor or token permission denied"},"404":{"description":"Resource not found in authorized project"},"409":{"description":"Reserved or inconsistent change-event projection"},"422":{"description":"Validation or locked-budget constraint"}},"summary":"Edit manual budget change","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/budget_modifications":{"get":{"operationId":"listProjectBudgetModifications","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"from_budget_line_item_id":{"type":"integer"},"id":{"type":"integer"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"to_budget_line_item_id":{"type":"integer"},"transfer_amount":{"format":"float","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Budget Modifications","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":true},"post":{"deprecated":true,"operationId":"createProjectBudgetModification","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"budget_modification":{"properties":{"from_budget_line_item_id":{"type":"integer"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"to_budget_line_item_id":{"type":"integer"},"transfer_amount":{"format":"float","type":"string"}},"required":["to_budget_line_item_id","transfer_amount"],"title":"Budget Modification","type":"object"}},"required":["budget_modification"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"from_budget_line_item_id":{"type":"integer"},"id":{"type":"integer"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"to_budget_line_item_id":{"type":"integer"},"transfer_amount":{"format":"float","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Budget Modification","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/budget_modifications/{id}":{"delete":{"deprecated":true,"operationId":"deleteProjectBudgetModification","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Budget Modification","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false},"get":{"operationId":"getProjectBudgetModification","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"from_budget_line_item_id":{"type":"integer"},"id":{"type":"integer"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"to_budget_line_item_id":{"type":"integer"},"transfer_amount":{"format":"float","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Budget Modification","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":false},"patch":{"deprecated":true,"operationId":"updateProjectBudgetModification","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"budget_modification":{"properties":{"from_budget_line_item_id":{"type":"integer"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"to_budget_line_item_id":{"type":"integer"},"transfer_amount":{"format":"float","type":"string"}},"required":["to_budget_line_item_id","transfer_amount"],"title":"Budget Modification","type":"object"}},"required":["budget_modification"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"from_budget_line_item_id":{"type":"integer"},"id":{"type":"integer"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"to_budget_line_item_id":{"type":"integer"},"transfer_amount":{"format":"float","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Budget Modification","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/call_logs":{"get":{"operationId":"listProjectCallLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"type":"integer"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"end_hour":{"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"maximum":59,"minimum":0,"type":"integer"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"start_hour":{"maximum":23,"minimum":0,"type":"integer"},"start_minute":{"maximum":59,"minimum":0,"type":"integer"},"status":{"type":"string"},"subject_from":{"type":"string"},"subject_to":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Call Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectCallLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"call_log":{"allOf":[{"properties":{"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"end_hour":{"default":0,"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"default":0,"maximum":59,"minimum":0,"type":"integer"},"location_id":{"type":"integer"},"start_hour":{"default":0,"maximum":23,"minimum":0,"type":"integer"},"start_minute":{"default":0,"maximum":59,"minimum":0,"type":"integer"},"subject_from":{"type":"string"},"subject_to":{"type":"string"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["call_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"call_log":{"properties":{"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"end_hour":{"default":0,"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"default":0,"maximum":59,"minimum":0,"type":"integer"},"location_id":{"type":"integer"},"start_hour":{"default":0,"maximum":23,"minimum":0,"type":"integer"},"start_minute":{"default":0,"maximum":59,"minimum":0,"type":"integer"},"subject_from":{"type":"string"},"subject_to":{"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["call_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"end_hour":{"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"maximum":59,"minimum":0,"type":"integer"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"start_hour":{"maximum":23,"minimum":0,"type":"integer"},"start_minute":{"maximum":59,"minimum":0,"type":"integer"},"status":{"type":"string"},"subject_from":{"type":"string"},"subject_to":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Call Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/call_logs/{id}":{"delete":{"operationId":"deleteProjectCallLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Call Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectCallLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"end_hour":{"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"maximum":59,"minimum":0,"type":"integer"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"start_hour":{"maximum":23,"minimum":0,"type":"integer"},"start_minute":{"maximum":59,"minimum":0,"type":"integer"},"status":{"type":"string"},"subject_from":{"type":"string"},"subject_to":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Call Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectCallLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"call_log":{"allOf":[{"properties":{"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"end_hour":{"default":0,"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"default":0,"maximum":59,"minimum":0,"type":"integer"},"location_id":{"type":"integer"},"start_hour":{"default":0,"maximum":23,"minimum":0,"type":"integer"},"start_minute":{"default":0,"maximum":59,"minimum":0,"type":"integer"},"subject_from":{"type":"string"},"subject_to":{"type":"string"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["call_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"call_log":{"properties":{"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"end_hour":{"default":0,"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"default":0,"maximum":59,"minimum":0,"type":"integer"},"location_id":{"type":"integer"},"start_hour":{"default":0,"maximum":23,"minimum":0,"type":"integer"},"start_minute":{"default":0,"maximum":59,"minimum":0,"type":"integer"},"subject_from":{"type":"string"},"subject_to":{"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["call_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"end_hour":{"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"maximum":59,"minimum":0,"type":"integer"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"start_hour":{"maximum":23,"minimum":0,"type":"integer"},"start_minute":{"maximum":59,"minimum":0,"type":"integer"},"status":{"type":"string"},"subject_from":{"type":"string"},"subject_to":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Call Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/change_order_configuration":{"get":{"description":"Requires change_orders:read and permission to view the project's Change Orders tool. The tier count defaults to 2 when there is no saved configuration. The updated_at field is present when a configuration is saved.","operationId":"listProjectChangeOrderConfiguration","parameters":[{"description":"Project ID in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/change_orders_ChangeOrderProjectConfiguration"}}},"description":"Project change-order configuration."},"401":{"description":"Authentication required."},"403":{"description":"The project cannot be viewed with the caller's access or its Change Orders tool is disabled."},"404":{"description":"The project could not be found."}},"summary":"Show project change-order configuration","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":false},"patch":{"description":"Requires change_orders:write and administrative permission for the project's Change Orders tool. Sets the count reported by the project's potential change orders.","operationId":"changeOrderConfigurationProject","parameters":[{"description":"Project ID in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"change_order_configuration":{"properties":{"change_order_tiers":{"enum":[1,2,3],"type":"integer"}},"required":["change_order_tiers"],"type":"object"}},"required":["change_order_configuration"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/change_orders_ChangeOrderProjectConfiguration"}}},"description":"Project change-order configuration."},"400":{"description":"Invalid JSON body."},"401":{"description":"Authentication required."},"403":{"description":"Administrative Change Orders access is required and the project tool must be enabled."},"404":{"description":"The project could not be found."},"409":{"description":"A retained configuration belongs to a different company and cannot be updated."},"422":{"description":"Invalid configuration update. The tier count must be 1, 2, or 3."}},"summary":"Set the project's change-order tier count","tags":["change_orders"],"x-os-idempotent":true,"x-os-module":"change_orders","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/checklist/items/{item_id}/item_response":{"delete":{"operationId":"deleteItemResponseProjectChecklistItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Checklist Item Response","tags":["inspections"],"x-os-idempotent":true,"x-os-module":"inspections","x-os-paginated":false},"get":{"operationId":"listProjectChecklistItemItemResponse","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"item_id":{"type":"integer"},"item_type":{"properties":{"category":{"enum":["multiple_choice","open_ended"],"type":"string"},"id":{"type":"integer"},"name":{"enum":["default","custom","text","number","date","signature"],"type":"string"}},"title":"ChecklistItemType","type":"object"},"payload":{"properties":{"date_value":{"format":"date","type":"string"},"number_value":{"type":"integer"},"response_option":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"text_value":{"type":"string"}},"type":"object"},"responded_at":{"format":"date-time","type":"string"},"responder":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"status":{"type":"string"}},"title":"ChecklistItemResponse","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Checklist Item Response","tags":["inspections"],"x-os-idempotent":false,"x-os-module":"inspections","x-os-paginated":false},"post":{"operationId":"itemResponseProjectChecklistItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"item_response":{"properties":{"date_value":{"format":"date","type":"string"},"number_value":{"type":"integer"},"response_option_id":{"type":"integer"},"status":{"type":"string"},"text_value":{"type":"string"}},"title":"Item Response","type":"object"}},"required":["item_response"],"title":"Checklist Item Response Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"item_id":{"type":"integer"},"item_type":{"properties":{"category":{"enum":["multiple_choice","open_ended"],"type":"string"},"id":{"type":"integer"},"name":{"enum":["default","custom","text","number","date","signature"],"type":"string"}},"title":"ChecklistItemType","type":"object"},"payload":{"properties":{"date_value":{"format":"date","type":"string"},"number_value":{"type":"integer"},"response_option":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"text_value":{"type":"string"}},"type":"object"},"responded_at":{"format":"date-time","type":"string"},"responder":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"status":{"type":"string"}},"title":"ChecklistItemResponse","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Checklist Item Response","tags":["inspections"],"x-os-idempotent":true,"x-os-module":"inspections","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/checklist/items/{item_id}/observation":{"post":{"operationId":"observationProjectChecklistItem","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"item_id":{"type":"integer"},"message":{"type":"string"},"observation_id":{"type":"integer"}},"required":["item_id","observation_id"],"type":"object"}}}}},"summary":"Create Observation From Item","tags":["inspections"],"x-os-idempotent":true,"x-os-module":"inspections","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/checklist/list_item_observations":{"get":{"description":"Observations created from inspection (checklist) items. filters[item_id] are inspection item ids; filters[created_at] / filters[updated_at] take a YYYY-MM-DD day; sort=created_at or -created_at. Needs observations and inspections view permission; private observations and inspections the caller cannot see are left out.","operationId":"listProjectChecklistListItemObservations","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[item_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"sort","schema":{"enum":["created_at","-created_at"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"checklist_item_id":{"type":"integer"},"checklist_list_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Checklist (Inspection) Item Observation","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Checklist Item Observations","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/checklist/list_items":{"get":{"operationId":"listProjectChecklistListItems","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[section_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[list_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[item_response_status]","schema":{"enum":["conforming","non_conforming","neutral","not_applicable","amber","null"],"type":"string"},"style":"form"},{"in":"query","name":"sort","schema":{"enum":["position_by_section"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"details":{"type":"string"},"id":{"type":"integer"},"item_response":{"nullable":true,"properties":{"item_id":{"type":"integer"},"item_type":{"properties":{"category":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"ChecklistItemType","type":"object"},"payload":{"properties":{"date_value":{"format":"date","type":"string"},"number_value":{"type":"integer"},"response_option":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"text_value":{"type":"string"}},"type":"object"},"responded_at":{"format":"date-time","type":"string"},"responder":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"status":{"type":"string"}},"title":"ChecklistItemResponse","type":"object"},"list_id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"responded_with":{"type":"string"},"response":{"nullable":true,"properties":{"corresponding_status":{"enum":["yes","no","n/a","none","amber"],"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"ChecklistResponse","type":"object"},"response_set":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"responses":{"items":{"properties":{"corresponding_status":{"enum":["yes","no","n/a","none","amber"],"type":"string"},"id":{"type":"integer"},"item_status_id":{"type":"integer"},"name":{"type":"string"}},"title":"ChecklistResponse","type":"object"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"response_type_id":{"nullable":true,"type":"integer"},"section_id":{"type":"integer"},"status":{"enum":["yes","no","n/a","none","amber"],"type":"string"},"template_item_id":{"nullable":true,"type":"integer"},"type":{"properties":{"category":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"ChecklistItemType","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Checklist List Item","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Checklist (Inspections) Items","tags":["inspections"],"x-os-idempotent":false,"x-os-module":"inspections","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/checklist/list_templates":{"get":{"operationId":"listProjectChecklistListTemplates","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[inspection_type_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[response_set_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[trade_ids]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"sort","schema":{"enum":["inspection_type","name","trade"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"company_description":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"display_conditions":{"items":{"properties":{"child_item_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"response_option_ids":{"items":{"type":"integer"},"type":"array"},"status_ids":{"items":{"type":"integer"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"title":"InspectionItemDisplayCondition","type":"object"},"type":"array"},"id":{"type":"integer"},"inspection_type":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Inspection Type","type":"object"},"name":{"type":"string"},"number":{"type":"string"},"parent_inspection_item_id":{"type":"integer"},"relative_position":{"type":"integer"},"synced_to":{"nullable":true,"properties":{"company_id":{"type":"integer"},"list_template_id":{"type":"integer"}},"type":"object"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Project Checklist Template","type":"object"},"title":"Array of Checklist Templates","type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Project Checklist Templates","tags":["inspections"],"x-os-idempotent":false,"x-os-module":"inspections","x-os-paginated":true},"post":{"operationId":"createProjectChecklistListTemplate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"format":"binary","type":"string"},"type":"array"},"list_template":{"properties":{"alternative_response_set_id":{"type":"integer"},"inspection_type_id":{"type":"integer"},"name":{"type":"string"},"trade_id":{"type":"integer"}},"title":"Checklist Template","type":"object"}},"required":["list_template"],"title":"ChecklistTemplateBody","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"company_description":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"display_conditions":{"items":{"properties":{"child_item_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"response_option_ids":{"items":{"type":"integer"},"type":"array"},"status_ids":{"items":{"type":"integer"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"title":"InspectionItemDisplayCondition","type":"object"},"type":"array"},"id":{"type":"integer"},"inspection_type":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Inspection Type","type":"object"},"name":{"type":"string"},"number":{"type":"string"},"parent_inspection_item_id":{"type":"integer"},"relative_position":{"type":"integer"},"synced_to":{"nullable":true,"properties":{"company_id":{"type":"integer"},"list_template_id":{"type":"integer"}},"type":"object"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Project Checklist Template","type":"object"},{"properties":{"alternative_response_set_id":{"nullable":true,"type":"integer"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"company_attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"response_set":{"properties":{"conforming_response":{"type":"string"},"deficient_response":{"type":"string"},"global":{"type":"boolean"}},"title":"ChecklistDefaultResponseSet","type":"object"},"sections":{"items":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"}},"title":"Checklist Template Section","type":"object"},{"properties":{"items":{"items":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"response_set":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"responses":{"items":{"properties":{"corresponding_status":{"enum":["yes","no","n/a","none"],"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"ChecklistResponse","type":"object"},"type":"array"}},"type":"object"},"section_id":{"type":"integer"}},"title":"Checklist Template Item","type":"object"},{"properties":{"details":{"type":"string"},"synced_to":{"properties":{"company_id":{"type":"integer"},"item_id":{"type":"integer"}},"type":"object"}},"type":"object"}]},"type":"array"},"synced_to":{"properties":{"company_id":{"type":"integer"},"section_id":{"type":"integer"}},"type":"object"}},"type":"object"}]},"type":"array"}},"type":"object"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Project Checklist Template","tags":["inspections"],"x-os-idempotent":true,"x-os-module":"inspections","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/checklist/list_templates/{id}":{"delete":{"operationId":"deleteProjectChecklistListTemplate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Project Checklist Template","tags":["inspections"],"x-os-idempotent":true,"x-os-module":"inspections","x-os-paginated":false},"get":{"operationId":"getProjectChecklistListTemplate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"company_description":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"display_conditions":{"items":{"properties":{"child_item_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"response_option_ids":{"items":{"type":"integer"},"type":"array"},"status_ids":{"items":{"type":"integer"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"title":"InspectionItemDisplayCondition","type":"object"},"type":"array"},"id":{"type":"integer"},"inspection_type":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Inspection Type","type":"object"},"name":{"type":"string"},"number":{"type":"string"},"parent_inspection_item_id":{"type":"integer"},"relative_position":{"type":"integer"},"synced_to":{"nullable":true,"properties":{"company_id":{"type":"integer"},"list_template_id":{"type":"integer"}},"type":"object"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Project Checklist Template","type":"object"},{"properties":{"alternative_response_set_id":{"nullable":true,"type":"integer"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"company_attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"response_set":{"properties":{"conforming_response":{"type":"string"},"deficient_response":{"type":"string"},"global":{"type":"boolean"}},"title":"ChecklistDefaultResponseSet","type":"object"},"sections":{"items":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"}},"title":"Checklist Template Section","type":"object"},{"properties":{"items":{"items":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"response_set":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"responses":{"items":{"properties":{"corresponding_status":{"enum":["yes","no","n/a","none"],"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"ChecklistResponse","type":"object"},"type":"array"}},"type":"object"},"section_id":{"type":"integer"}},"title":"Checklist Template Item","type":"object"},{"properties":{"details":{"type":"string"},"synced_to":{"properties":{"company_id":{"type":"integer"},"item_id":{"type":"integer"}},"type":"object"}},"type":"object"}]},"type":"array"},"synced_to":{"properties":{"company_id":{"type":"integer"},"section_id":{"type":"integer"}},"type":"object"}},"type":"object"}]},"type":"array"}},"type":"object"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Project Checklist Template","tags":["inspections"],"x-os-idempotent":false,"x-os-module":"inspections","x-os-paginated":false},"patch":{"operationId":"updateProjectChecklistListTemplate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"format":"binary","type":"string"},"type":"array"},"list_template":{"properties":{"alternative_response_set_id":{"type":"integer"},"inspection_type_id":{"type":"integer"},"name":{"type":"string"},"trade_id":{"type":"integer"}},"title":"Checklist Template","type":"object"}},"required":["list_template"],"title":"ChecklistTemplateBody","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"company_description":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"display_conditions":{"items":{"properties":{"child_item_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"response_option_ids":{"items":{"type":"integer"},"type":"array"},"status_ids":{"items":{"type":"integer"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"title":"InspectionItemDisplayCondition","type":"object"},"type":"array"},"id":{"type":"integer"},"inspection_type":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Inspection Type","type":"object"},"name":{"type":"string"},"number":{"type":"string"},"parent_inspection_item_id":{"type":"integer"},"relative_position":{"type":"integer"},"synced_to":{"nullable":true,"properties":{"company_id":{"type":"integer"},"list_template_id":{"type":"integer"}},"type":"object"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Project Checklist Template","type":"object"},{"properties":{"alternative_response_set_id":{"nullable":true,"type":"integer"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"company_attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"response_set":{"properties":{"conforming_response":{"type":"string"},"deficient_response":{"type":"string"},"global":{"type":"boolean"}},"title":"ChecklistDefaultResponseSet","type":"object"},"sections":{"items":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"}},"title":"Checklist Template Section","type":"object"},{"properties":{"items":{"items":{"allOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"response_set":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"responses":{"items":{"properties":{"corresponding_status":{"enum":["yes","no","n/a","none"],"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"ChecklistResponse","type":"object"},"type":"array"}},"type":"object"},"section_id":{"type":"integer"}},"title":"Checklist Template Item","type":"object"},{"properties":{"details":{"type":"string"},"synced_to":{"properties":{"company_id":{"type":"integer"},"item_id":{"type":"integer"}},"type":"object"}},"type":"object"}]},"type":"array"},"synced_to":{"properties":{"company_id":{"type":"integer"},"section_id":{"type":"integer"}},"type":"object"}},"type":"object"}]},"type":"array"}},"type":"object"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Project Checklist Template","tags":["inspections"],"x-os-idempotent":true,"x-os-module":"inspections","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/checklist/lists":{"get":{"operationId":"listProjectChecklistLists","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[inspection_date]","required":false,"schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[inspection_type_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[inspector_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[template_id]","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[location_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[managed_equipment_id]","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[point_of_contact_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[spec_section_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[responsible_contractor_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[closed_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[status]","schema":{"type":"integer"}},{"in":"query","name":"filters[trade_id]","schema":{"type":"integer"}},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"filters[due_at]","required":false,"schema":{"format":"date-time","type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[closed_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"sort","schema":{"enum":["created_at","inspection_date","location","name","number","updated_at"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"amber_item_count":{"type":"integer"},"asset_ids":{"items":{"type":"string"},"type":"array"},"attachments":{"items":{"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"}},"title":"Checklist (Inspection) Attachment","type":"object"},"type":"array"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"closed_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"closed_observations_count":{"type":"integer"},"conforming_item_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"default_response_phrasing":{"properties":{"conforming_response":{"type":"string"},"deficient_response":{"type":"string"},"global":{"type":"boolean"}},"type":"object"},"deficient_item_count":{"type":"integer"},"deleted":{"type":"boolean"},"distribution_members":{"items":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_at":{"format":"date-time","type":"string"},"equipment":{"nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"title":"Equipment","type":"object"},"equipment_id":{"nullable":true,"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"inspected_item_count":{"type":"integer"},"inspection_date":{"format":"date","type":"string"},"inspection_type":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Inspection Type","type":"object"},"inspectors":{"items":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"item_count":{"type":"integer"},"list_template_id":{"type":"integer"},"list_template_name":{"type":"string"},"location":{"nullable":true,"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"managed_equipment_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"neutral_item_count":{"type":"integer"},"not_applicable_item_count":{"type":"integer"},"number":{"type":"integer"},"observations_count":{"type":"integer"},"overdue":{"type":"boolean"},"point_of_contact":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"reinspected_by_id":{"nullable":true,"type":"integer"},"reinspected_from_id":{"nullable":true,"type":"integer"},"respondable_item_count":{"type":"integer"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"schedule":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Schedule","type":"object"},"signature_requests":{"items":{"properties":{"id":{"type":"integer"},"signatory":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"}},"type":"object"}]},"signature":{"nullable":true,"properties":{"attachment":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"captured_at":{"format":"date-time","type":"string"},"captured_by":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"}},"type":"object"}]},"id":{"type":"integer"}},"title":"Checklist Signature","type":"object"}},"title":"Checklist Signature Request","type":"object"},"type":"array"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"section":{"type":"string"}},"type":"object"},"status":{"enum":["Open","In Review","Closed"],"type":"string"},"template_id":{"type":"integer"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Checklist","type":"object"},"title":"Array of Checklists","type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Checklists (Inspections)","tags":["inspections"],"x-os-idempotent":false,"x-os-module":"inspections","x-os-paginated":true},"post":{"operationId":"createProjectChecklistList","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"list":{"properties":{"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"due_at":{"format":"date-time","type":"string"},"inspection_date":{"format":"date","type":"string"},"inspection_type_id":{"type":"integer"},"inspector_ids":{"items":{"type":"integer"},"type":"array"},"location_id":{"type":"integer"},"managed_equipment_id":{"type":"integer"},"number":{"type":"integer"},"point_of_contact_id":{"type":"integer"},"private":{"default":true,"type":"boolean"},"responsible_contractor_id":{"type":"integer"},"spec_section_id":{"type":"integer"},"status":{"enum":["open","in_review","closed"],"type":"string"},"trade_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"},"list_template_id":{"format":"int64","type":"integer"}},"required":["list_template_id","list"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"amber_item_count":{"type":"integer"},"asset_ids":{"items":{"type":"string"},"type":"array"},"attachments":{"items":{"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"}},"title":"Checklist (Inspection) Attachment","type":"object"},"type":"array"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"closed_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"closed_observations_count":{"type":"integer"},"conforming_item_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"default_response_phrasing":{"properties":{"conforming_response":{"type":"string"},"deficient_response":{"type":"string"},"global":{"type":"boolean"}},"type":"object"},"deficient_item_count":{"type":"integer"},"deleted":{"type":"boolean"},"distribution_members":{"items":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_at":{"format":"date-time","type":"string"},"equipment":{"nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"title":"Equipment","type":"object"},"equipment_id":{"nullable":true,"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"inspected_item_count":{"type":"integer"},"inspection_date":{"format":"date","type":"string"},"inspection_type":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Inspection Type","type":"object"},"inspectors":{"items":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"item_count":{"type":"integer"},"list_template_id":{"type":"integer"},"list_template_name":{"type":"string"},"location":{"nullable":true,"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"managed_equipment_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"neutral_item_count":{"type":"integer"},"not_applicable_item_count":{"type":"integer"},"number":{"type":"integer"},"observations_count":{"type":"integer"},"overdue":{"type":"boolean"},"point_of_contact":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"reinspected_by_id":{"nullable":true,"type":"integer"},"reinspected_from_id":{"nullable":true,"type":"integer"},"respondable_item_count":{"type":"integer"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"schedule":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Schedule","type":"object"},"signature_requests":{"items":{"properties":{"id":{"type":"integer"},"signatory":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"}},"type":"object"}]},"signature":{"nullable":true,"properties":{"attachment":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"captured_at":{"format":"date-time","type":"string"},"captured_by":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"}},"type":"object"}]},"id":{"type":"integer"}},"title":"Checklist Signature","type":"object"}},"title":"Checklist Signature Request","type":"object"},"type":"array"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"section":{"type":"string"}},"type":"object"},"status":{"enum":["Open","In Review","Closed"],"type":"string"},"template_id":{"type":"integer"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Checklist","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Checklist (Inspection)","tags":["inspections"],"x-os-idempotent":true,"x-os-module":"inspections","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/checklist/lists/{id}":{"delete":{"operationId":"deleteProjectChecklistList","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Checklist (Inspection)","tags":["inspections"],"x-os-idempotent":true,"x-os-module":"inspections","x-os-paginated":false},"get":{"operationId":"getProjectChecklistList","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amber_item_count":{"type":"integer"},"asset_ids":{"items":{"type":"string"},"type":"array"},"attachments":{"items":{"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"}},"title":"Checklist (Inspection) Attachment","type":"object"},"type":"array"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"closed_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"closed_observations_count":{"type":"integer"},"conforming_item_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"default_response_phrasing":{"properties":{"conforming_response":{"type":"string"},"deficient_response":{"type":"string"},"global":{"type":"boolean"}},"type":"object"},"deficient_item_count":{"type":"integer"},"deleted":{"type":"boolean"},"distribution_members":{"items":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_at":{"format":"date-time","type":"string"},"equipment":{"nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"title":"Equipment","type":"object"},"equipment_id":{"nullable":true,"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"inspected_item_count":{"type":"integer"},"inspection_date":{"format":"date","type":"string"},"inspection_type":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Inspection Type","type":"object"},"inspectors":{"items":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"item_count":{"type":"integer"},"list_template_id":{"type":"integer"},"list_template_name":{"type":"string"},"location":{"nullable":true,"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"managed_equipment_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"neutral_item_count":{"type":"integer"},"not_applicable_item_count":{"type":"integer"},"number":{"type":"integer"},"observations_count":{"type":"integer"},"overdue":{"type":"boolean"},"point_of_contact":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"reinspected_by_id":{"nullable":true,"type":"integer"},"reinspected_from_id":{"nullable":true,"type":"integer"},"respondable_item_count":{"type":"integer"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"schedule":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Schedule","type":"object"},"signature_requests":{"items":{"properties":{"id":{"type":"integer"},"signatory":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"}},"type":"object"}]},"signature":{"nullable":true,"properties":{"attachment":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"captured_at":{"format":"date-time","type":"string"},"captured_by":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"}},"type":"object"}]},"id":{"type":"integer"}},"title":"Checklist Signature","type":"object"}},"title":"Checklist Signature Request","type":"object"},"type":"array"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"section":{"type":"string"}},"type":"object"},"status":{"enum":["Open","In Review","Closed"],"type":"string"},"template_id":{"type":"integer"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Checklist","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Checklist (Inspection)","tags":["inspections"],"x-os-idempotent":false,"x-os-module":"inspections","x-os-paginated":false},"patch":{"operationId":"updateProjectChecklistList","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"list":{"properties":{"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"due_at":{"format":"date-time","type":"string"},"inspection_date":{"format":"date","type":"string"},"inspection_type_id":{"type":"integer"},"inspector_ids":{"items":{"type":"integer"},"type":"array"},"location_id":{"type":"integer"},"name":{"type":"string"},"number":{"type":"integer"},"point_of_contact_id":{"type":"integer"},"private":{"default":true,"type":"boolean"},"responsible_contractor_id":{"type":"integer"},"spec_section_id":{"type":"integer"},"status":{"enum":["open","in_review","closed"],"type":"string"},"trade_id":{"type":"integer"}},"type":"object"}},"required":["list"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amber_item_count":{"type":"integer"},"asset_ids":{"items":{"type":"string"},"type":"array"},"attachments":{"items":{"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"}},"title":"Checklist (Inspection) Attachment","type":"object"},"type":"array"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"closed_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"closed_observations_count":{"type":"integer"},"conforming_item_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"default_response_phrasing":{"properties":{"conforming_response":{"type":"string"},"deficient_response":{"type":"string"},"global":{"type":"boolean"}},"type":"object"},"deficient_item_count":{"type":"integer"},"deleted":{"type":"boolean"},"distribution_members":{"items":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_at":{"format":"date-time","type":"string"},"equipment":{"nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"title":"Equipment","type":"object"},"equipment_id":{"nullable":true,"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"inspected_item_count":{"type":"integer"},"inspection_date":{"format":"date","type":"string"},"inspection_type":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Inspection Type","type":"object"},"inspectors":{"items":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"item_count":{"type":"integer"},"list_template_id":{"type":"integer"},"list_template_name":{"type":"string"},"location":{"nullable":true,"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"managed_equipment_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"neutral_item_count":{"type":"integer"},"not_applicable_item_count":{"type":"integer"},"number":{"type":"integer"},"observations_count":{"type":"integer"},"overdue":{"type":"boolean"},"point_of_contact":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"reinspected_by_id":{"nullable":true,"type":"integer"},"reinspected_from_id":{"nullable":true,"type":"integer"},"respondable_item_count":{"type":"integer"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"schedule":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Schedule","type":"object"},"signature_requests":{"items":{"properties":{"id":{"type":"integer"},"signatory":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"}},"type":"object"}]},"signature":{"nullable":true,"properties":{"attachment":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"captured_at":{"format":"date-time","type":"string"},"captured_by":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"}},"type":"object"}]},"id":{"type":"integer"}},"title":"Checklist Signature","type":"object"}},"title":"Checklist Signature Request","type":"object"},"type":"array"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"section":{"type":"string"}},"type":"object"},"status":{"enum":["Open","In Review","Closed"],"type":"string"},"template_id":{"type":"integer"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Checklist","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Checklist (Inspection)","tags":["inspections"],"x-os-idempotent":true,"x-os-module":"inspections","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/checklist/lists/{id}/complete":{"post":{"operationId":"completeProjectChecklistList","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amber_item_count":{"type":"integer"},"asset_ids":{"items":{"type":"string"},"type":"array"},"attachments":{"items":{"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"}},"title":"Checklist (Inspection) Attachment","type":"object"},"type":"array"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"closed_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"closed_observations_count":{"type":"integer"},"conforming_item_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"default_response_phrasing":{"properties":{"conforming_response":{"type":"string"},"deficient_response":{"type":"string"},"global":{"type":"boolean"}},"type":"object"},"deficient_item_count":{"type":"integer"},"deleted":{"type":"boolean"},"distribution_members":{"items":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_at":{"format":"date-time","type":"string"},"equipment":{"nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"title":"Equipment","type":"object"},"equipment_id":{"nullable":true,"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"inspected_item_count":{"type":"integer"},"inspection_date":{"format":"date","type":"string"},"inspection_type":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Inspection Type","type":"object"},"inspectors":{"items":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"item_count":{"type":"integer"},"list_template_id":{"type":"integer"},"list_template_name":{"type":"string"},"location":{"nullable":true,"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"managed_equipment_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"neutral_item_count":{"type":"integer"},"not_applicable_item_count":{"type":"integer"},"number":{"type":"integer"},"observations_count":{"type":"integer"},"overdue":{"type":"boolean"},"point_of_contact":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"reinspected_by_id":{"nullable":true,"type":"integer"},"reinspected_from_id":{"nullable":true,"type":"integer"},"respondable_item_count":{"type":"integer"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"schedule":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Schedule","type":"object"},"signature_requests":{"items":{"properties":{"id":{"type":"integer"},"signatory":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"}},"type":"object"}]},"signature":{"nullable":true,"properties":{"attachment":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"captured_at":{"format":"date-time","type":"string"},"captured_by":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"}},"type":"object"}]},"id":{"type":"integer"}},"title":"Checklist Signature","type":"object"}},"title":"Checklist Signature Request","type":"object"},"type":"array"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"section":{"type":"string"}},"type":"object"},"status":{"enum":["Open","In Review","Closed"],"type":"string"},"template_id":{"type":"integer"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Checklist","type":"object"}}}}},"summary":"Complete Inspection","tags":["inspections"],"x-os-idempotent":true,"x-os-module":"inspections","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/checklist/lists/{id}/generate_next":{"post":{"operationId":"generateNextProjectChecklistList","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"generated":{"type":"boolean"},"reason":{"type":"string"}},"type":"object"}}}},"201":{"content":{"application/json":{"schema":{"properties":{"amber_item_count":{"type":"integer"},"asset_ids":{"items":{"type":"string"},"type":"array"},"attachments":{"items":{"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"}},"title":"Checklist (Inspection) Attachment","type":"object"},"type":"array"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"closed_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"closed_observations_count":{"type":"integer"},"conforming_item_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"default_response_phrasing":{"properties":{"conforming_response":{"type":"string"},"deficient_response":{"type":"string"},"global":{"type":"boolean"}},"type":"object"},"deficient_item_count":{"type":"integer"},"deleted":{"type":"boolean"},"distribution_members":{"items":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_at":{"format":"date-time","type":"string"},"equipment":{"nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"title":"Equipment","type":"object"},"equipment_id":{"nullable":true,"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"inspected_item_count":{"type":"integer"},"inspection_date":{"format":"date","type":"string"},"inspection_type":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Inspection Type","type":"object"},"inspectors":{"items":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"item_count":{"type":"integer"},"list_template_id":{"type":"integer"},"list_template_name":{"type":"string"},"location":{"nullable":true,"properties":{"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"managed_equipment_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"neutral_item_count":{"type":"integer"},"not_applicable_item_count":{"type":"integer"},"number":{"type":"integer"},"observations_count":{"type":"integer"},"overdue":{"type":"boolean"},"point_of_contact":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"private":{"type":"boolean"},"reinspected_by_id":{"nullable":true,"type":"integer"},"reinspected_from_id":{"nullable":true,"type":"integer"},"respondable_item_count":{"type":"integer"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"schedule":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Schedule","type":"object"},"signature_requests":{"items":{"properties":{"id":{"type":"integer"},"signatory":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"}},"type":"object"}]},"signature":{"nullable":true,"properties":{"attachment":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"captured_at":{"format":"date-time","type":"string"},"captured_by":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"}},"type":"object"}]},"id":{"type":"integer"}},"title":"Checklist Signature","type":"object"}},"title":"Checklist Signature Request","type":"object"},"type":"array"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"section":{"type":"string"}},"type":"object"},"status":{"enum":["Open","In Review","Closed"],"type":"string"},"template_id":{"type":"integer"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Checklist","type":"object"}}}}},"summary":"Generate Next Occurrence","tags":["inspections"],"x-os-idempotent":true,"x-os-module":"inspections","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/checklist/lists/{id}/send_email":{"post":{"operationId":"sendEmailProjectChecklistList","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Email checklist list","tags":["inspections"],"x-os-idempotent":false,"x-os-module":"inspections","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/checklist/lists/{id}/signatures":{"get":{"operationId":"listProjectChecklistListSignatures","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"list_id":{"type":"integer"},"role":{"type":"string"},"signatory":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"signature_data":{"type":"string"},"signed_at":{"format":"date-time","type":"string"},"signer":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"statement":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","list_id","signed_at"],"title":"ChecklistSignature","type":"object"},"type":"array"}}}}},"summary":"List Checklist Signatures","tags":["inspections"],"x-os-idempotent":false,"x-os-module":"inspections","x-os-paginated":false},"post":{"operationId":"createProjectChecklistListSignature","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"list_id":{"type":"integer"},"role":{"type":"string"},"signatory":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"signature_data":{"type":"string"},"signed_at":{"format":"date-time","type":"string"},"signer":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"statement":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","list_id","signed_at"],"title":"ChecklistSignature","type":"object"}}}}},"summary":"Create Checklist Signature","tags":["inspections"],"x-os-idempotent":true,"x-os-module":"inspections","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/checklist/lists/{id}/signatures/{signature_id}":{"delete":{"operationId":"deleteProjectChecklistListSignature","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"signature_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete checklist list signature","tags":["inspections"],"x-os-idempotent":false,"x-os-module":"inspections","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/contract_payments":{"get":{"description":"Requires the `view` permission on the project's payment applications tool. A scoped API token needs `payment_applications:read`.","operationId":"listProjectContractPayments","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Page number, starting at 1.","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Records per page.","in":"query","name":"per_page","schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"contract_payment":{"additionalProperties":false,"properties":{"amount":{"pattern":"^(?:0|[1-9]\\d{0,13})(?:\\.\\d{1,2})?$","type":"string"},"contract_id":{"exclusiveMinimum":0,"type":"integer"},"contract_type":{"enum":["PrimeContract","WorkOrderContract","PurchaseOrderContract"],"type":"string"},"paid_at":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"payment_app_id":{"exclusiveMinimum":0,"type":"integer"},"reference":{"maxLength":255,"minLength":1,"type":"string"},"request_key":{"maxLength":128,"minLength":8,"type":"string"}},"required":["contract_type","contract_id","amount","paid_at"],"type":"object"}},"required":["contract_payment"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"description":"Created."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"List contract payments","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":true},"post":{"operationId":"createProjectContractPayment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create contract payment","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/contract_payments/reconciliation":{"get":{"description":"Requires the `view` permission on the project's payment applications tool. A scoped API token needs `payment_applications:read`.","operationId":"listProjectContractPaymentsReconciliation","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"invoice_type","schema":{"type":"string"}},{"description":"Page number, starting at 1.","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Records per page.","in":"query","name":"per_page","schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Get reconciliation","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/contract_payments/{id}":{"get":{"description":"Requires the `view` permission on the project's payment applications tool. A scoped API token needs `payment_applications:read`.","operationId":"getProjectContractPayment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Get contract payment","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/contract_payments/{id}/allocations":{"get":{"description":"Requires the `view` permission on the project's payment applications tool. A scoped API token needs `payment_applications:read`.","operationId":"listProjectContractPaymentAllocations","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"allocation":{"additionalProperties":false,"properties":{"allocated_at":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"amount":{"pattern":"^(?:0|[1-9]\\d{0,13})(?:\\.\\d{1,2})?$","type":"string"},"invoice_id":{"exclusiveMinimum":0,"type":"integer"},"invoice_type":{"enum":["PaymentApplication","PrimeContractPaymentApplication","Requisition"],"type":"string"},"request_key":{"maxLength":128,"minLength":8,"type":"string"}},"required":["invoice_type","invoice_id","amount","allocated_at","request_key"],"type":"object"}},"required":["allocation"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Created."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"List contract payment allocations","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false},"post":{"operationId":"createProjectContractPaymentAllocation","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create contract payment allocation","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/contract_payments/{id}/allocations/{allocation_id}/release":{"post":{"operationId":"releaseProjectContractPaymentAllocation","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"allocation_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Release allocation","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/contract_payments/{id}/refund":{"post":{"operationId":"refundProjectContractPayment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Refund contract payment","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/contract_payments/{id}/reverse":{"post":{"operationId":"reverseProjectContractPayment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Reverse contract payment","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/conversations":{"get":{"operationId":"listProjectConversations","parameters":[{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/conversations_ConversationListItem"},"type":"array"}}}}},"summary":"List conversations the caller participates in","tags":["conversations"],"x-os-idempotent":false,"x-os-module":"conversations","x-os-paginated":true},"post":{"operationId":"createProjectConversation","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_ConversationShow"}}}}},"summary":"Create a conversation","tags":["conversations"],"x-os-idempotent":true,"x-os-module":"conversations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/conversations/{id}":{"delete":{"description":"Soft-delete the whole thread. Manager-only (creator/admin); requires tool `delete`. Read-scoped: non-participants (non-admin) get 404, never a leaked thread.","operationId":"deleteProjectConversation","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete conversation","tags":["conversations"],"x-os-idempotent":false,"x-os-module":"conversations","x-os-paginated":false},"get":{"operationId":"getProjectConversation","parameters":[{"in":"query","name":"before","schema":{"type":"string"}},{"in":"query","name":"per_page","schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_ConversationShow"}}}}},"summary":"Show a conversation with a bounded message window","tags":["conversations"],"x-os-idempotent":false,"x-os-module":"conversations","x-os-paginated":false},"patch":{"description":"Rename (subject). Manager-only (creator/admin); requires tool `edit`.","operationId":"updateProjectConversation","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Update conversation","tags":["conversations"],"x-os-idempotent":false,"x-os-module":"conversations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/conversations/{id}/leave":{"post":{"description":"The caller leaves a conversation they participate in. Any participant may leave (no manager rights needed); requires tool `create` (participant-level, same gate as posting). If the caller was the last participant the thread is soft-deleted. Returns 204.","operationId":"leaveProjectConversation","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Leave conversation","tags":["conversations"],"x-os-idempotent":false,"x-os-module":"conversations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/conversations/{id}/messages":{"post":{"operationId":"createProjectConversationMessage","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_ConversationShow"}}}}},"summary":"Post a message to a conversation","tags":["conversations"],"x-os-idempotent":true,"x-os-module":"conversations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/conversations/{id}/participants":{"post":{"operationId":"createProjectConversationParticipant","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Add a participant","tags":["conversations"],"x-os-idempotent":false,"x-os-module":"conversations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/conversations/{id}/participants/{user_id}":{"delete":{"operationId":"deleteProjectConversationParticipant","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete conversation participant","tags":["conversations"],"x-os-idempotent":false,"x-os-module":"conversations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/conversations/{id}/read":{"patch":{"operationId":"readProjectConversation","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"last_read_at":{"format":"date-time","nullable":true,"type":"string"},"through":{"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversations_ConversationShow"}}}}},"summary":"Mark a conversation read for the caller","tags":["conversations"],"x-os-idempotent":true,"x-os-module":"conversations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/correspondence_type_items":{"get":{"operationId":"listProjectCorrespondenceTypeItems","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"assignee":{"nullable":true,"properties":{"company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assignees":{"items":{"nullable":true,"properties":{"company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"closed_at":{"nullable":true,"type":"string"},"cost_code":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"type":"object"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"nullable":true,"type":"string"},"generic_tool":{"properties":{"abbreviation":{"nullable":true,"type":"string"},"fields":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"private_by_default":{"type":"boolean"},"title":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"issued_at":{"nullable":true,"type":"string"},"location":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"}},"type":"object"},"number":{"type":"string"},"position":{"type":"string"},"private":{"type":"boolean"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"schedule_impact":{"nullable":true,"type":"string"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"},"status":{"type":"string"},"status_type":{"type":"string"},"title":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","number","title","status","generic_tool"],"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}}},"summary":"List Correspondence Type Items","tags":["correspondence"],"x-os-idempotent":false,"x-os-module":"correspondence","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/cost_codes":{"get":{"description":"Requires admin:read and current project Admin tool view permission. Project must belong to the authenticated company; company administrator status is not required when the project permission suffices. Flat array ordered by sortable code then ID. No search or sub-job filter. Catalog presence does not grant authorization.","operationId":"listProjectCostCodes","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion, not a company selector. Company derives from authentication.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Values above 1000 are clamped.","in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Repeated or comma-separated parent IDs. Only positive integers are used; invalid values are ignored. No root-only filter.","explode":false,"in":"query","name":"filters[parent_id]","schema":{"items":{"maximum":2147483647,"minimum":1,"type":"integer"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/admin_CostCode"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination Link","schema":{"type":"string"}},"Per-Page":{"description":"Pagination Per-Page","schema":{"type":"string"}},"Total":{"description":"Pagination Total","schema":{"type":"string"}}}},"400":{"description":"Invalid tree topology or reference ID"},"401":{"description":"Authentication required"},"403":{"description":"Current project Admin permission or token scope denied"},"404":{"description":"Project or resource not found within the authenticated company"},"422":{"description":"Request body validation failed"}},"summary":"List project cost codes","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":true},"post":{"description":"Requires admin:write and current project Admin tool create permission. Project must belong to the authenticated company; company administrator status is not required when the project permission suffices. Parent must belong to this project; full_code and sortable_code derive from the current tree. Body project_id and sub_job_id are ignored. Catalog presence does not grant authorization.","operationId":"createProjectCostCode","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion, not a company selector. Company derives from authentication.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/admin_CostCodeCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/admin_CostCode"}}},"description":"Success"},"400":{"description":"Invalid tree topology or reference ID"},"401":{"description":"Authentication required"},"403":{"description":"Current project Admin permission or token scope denied"},"404":{"description":"Project or resource not found within the authenticated company"},"422":{"description":"Request body validation failed"}},"summary":"Create project cost code","tags":["admin"],"x-os-idempotent":true,"x-os-module":"admin","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/cost_codes/{id}":{"delete":{"operationId":"deleteProjectCostCode","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional tenant assertion, not a company selector. Company derives from authentication.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete cost code","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false},"get":{"description":"Requires admin:read and current project Admin tool view permission. Project must belong to the authenticated company; company administrator status is not required when the project permission suffices. budgeted is always false in this metadata serializer and is not a computed usage indicator. Catalog presence does not grant authorization.","operationId":"getProjectCostCode","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion, not a company selector. Company derives from authentication.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/admin_CostCode"}}},"description":"Success"},"400":{"description":"Invalid tree topology or reference ID"},"401":{"description":"Authentication required"},"403":{"description":"Current project Admin permission or token scope denied"},"404":{"description":"Project or resource not found within the authenticated company"},"422":{"description":"Request body validation failed"}},"summary":"Read project cost code","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false},"patch":{"description":"Requires admin:write and current project Admin tool edit permission. Project must belong to the authenticated company; company administrator status is not required when the project permission suffices. Parent/code edits recompose full_code and sortable_code for all affected descendants in the same transaction. Missing or cross-project parents and cycles fail400. Omitted fields retain values; explicit null clears parent/position. Catalog presence does not grant authorization.","operationId":"updateProjectCostCode","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion, not a company selector. Company derives from authentication.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/admin_CostCodeUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/admin_CostCode"}}},"description":"Success"},"400":{"description":"Invalid tree topology or reference ID"},"401":{"description":"Authentication required"},"403":{"description":"Current project Admin permission or token scope denied"},"404":{"description":"Project or resource not found within the authenticated company"},"422":{"description":"Request body validation failed"}},"summary":"Edit project cost code","tags":["admin"],"x-os-idempotent":true,"x-os-module":"admin","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/action_center":{"get":{"description":"Requires project CRM view and crm:read. Source-linked work is derived at one server time. Offer and warranty expiry rows are review cues, not a customer response, completed task, notification, or contractual SLA. Operational deadlines through 30 days and warranty end dates from the past 30 through next 90 UTC calendar days are included.","operationId":"listProjectCrmActionCenter","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"kind","schema":{"enum":["follow_up","service_response","offer_expiration","warranty_expiration"],"type":"string"}},{"description":"Pages may begin at offsets up to 1,000. Link targets stop at the last reachable page while Total reports the full matching count.","in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"as_of":{"format":"date-time","type":"string"},"kind":{"anyOf":[{"enum":["follow_up","service_response","offer_expiration","warranty_expiration"],"type":"string"},{"type":"null"}]},"rows":{"items":{"properties":{"deadline_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}]},"due_at":{"format":"date-time","type":"string"},"href":{"type":"string"},"kind":{"enum":["follow_up","service_response","offer_expiration","warranty_expiration"],"type":"string"},"owner_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"source_id":{"minimum":1,"type":"integer"},"state":{"enum":["overdue","due_soon","upcoming"],"type":"string"},"title":{"type":"string"}},"required":["kind","source_id","title","owner_id","due_at","deadline_on","state","href"],"type":"object"},"type":"array"},"summary":{"properties":{"follow_up":{"minimum":0,"type":"integer"},"offer_expiration":{"minimum":0,"type":"integer"},"service_response":{"minimum":0,"type":"integer"},"warranty_expiration":{"minimum":0,"type":"integer"}},"required":["follow_up","service_response","offer_expiration","warranty_expiration"],"type":"object"},"total":{"minimum":0,"type":"integer"},"window_end":{"format":"date-time","type":"string"}},"required":["as_of","window_end","kind","total","summary","rows"],"type":"object"}}},"description":"Private, bounded source-linked queue. Total reports all matching rows; Per-Page and Link headers navigate only reachable pages."},"401":{"description":"Authentication required"},"403":{"description":"CRM access denied"},"404":{"description":"Project not found"}},"summary":"Read the project CRM Action Center","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/crm/activities":{"get":{"operationId":"listProjectCrmActivities","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Comma-separated values: open, completed, overdue.","in":"query","name":"filters[status]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[contact_id]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[opportunity_id]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[owner_id]","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"completed_at":{"format":"date-time","type":["string","null"]},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"due_at":{"format":"date-time","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"outcome":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"project_id":{"minimum":1,"type":"integer"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","kind","contact_id","opportunity_id","owner_id","due_at","completed_at","notes","outcome","archived_at"],"type":"object"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List activities","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"operationId":"createProjectCrmActivity","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"activity":{"additionalProperties":false,"properties":{"completed_at":{"description":"Log an interaction that already happened. Must not be in the future (60 seconds of clock skew is allowed). A logged interaction is created completed and sends no assignment notification or webhook.","format":"date-time","type":"string"},"contact_id":{"minimum":1,"type":["integer","null"]},"due_at":{"format":"date-time","type":["string","null"]},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"outcome":{"description":"Result of the completed interaction. Requires completed_at.","maxLength":2000,"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"title":{"type":"string"}},"required":["title"],"type":"object"}},"required":["activity"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"completed_at":{"format":"date-time","type":["string","null"]},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"due_at":{"format":"date-time","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"outcome":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"project_id":{"minimum":1,"type":"integer"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","kind","contact_id","opportunity_id","owner_id","due_at","completed_at","notes","outcome","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Create activity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/activities/calendar":{"get":{"description":"Requires Project CRM view and crm:read. Returns open, unarchived follow-ups with a due date as RFC 5545 VEVENTs (CRLF lines folded at 75 octets, UID crm-activity-<id>@os.construction). Date-only due dates are all-day events; other due instants are UTC. Events carry the title, related contact and opportunity names and a link back to the record, never notes. Takes the list's search and filters; at most 1000 events, earliest due first.","operationId":"listProjectCrmActivitiesCalendar","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"}},{"description":"Comma-separated values: open, overdue. Completed follow-ups are never exported.","in":"query","name":"filters[status]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[contact_id]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[opportunity_id]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[owner_id]","schema":{"type":"string"}}],"responses":{"200":{"content":{"text/calendar":{"schema":{"type":"string"}}},"description":"iCalendar file"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM view or crm:read denied"}},"summary":"Download open project CRM follow-ups as an iCalendar file","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/activities/{id}":{"delete":{"description":"Soft archive. Project CRM edit permission, as for PATCH. The follow-up stays readable by id (archived_at set) and in history, but leaves lists, summaries, forecasts, cohorts and exports, and can no longer be edited or newly linked. Repeating the request is a no-op. Records an archived history entry.","operationId":"deleteProjectCrmActivity","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Archived"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Archive CRM follow-up","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false},"get":{"description":"Same access as the activity list. Archived follow-ups remain readable by id with archived_at set.","operationId":"getProjectCrmActivity","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"completed_at":{"format":"date-time","type":["string","null"]},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"due_at":{"format":"date-time","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"outcome":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"project_id":{"minimum":1,"type":"integer"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","kind","contact_id","opportunity_id","owner_id","due_at","completed_at","notes","outcome","archived_at"],"type":"object"}}},"description":"Follow-up"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Get CRM follow-up","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"patch":{"description":"Only open follow-ups can be edited. The resulting contact, opportunity and owner must remain in the current CRM scope. A stale updated_at or completed activity returns 409. An unchanged patch returns the existing record without a history event.","operationId":"updateProjectCrmActivity","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"activity":{"additionalProperties":false,"minProperties":2,"properties":{"contact_id":{"minimum":1,"type":["integer","null"]},"due_at":{"format":"date-time","type":["string","null"]},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"maxLength":10000,"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"title":{"maxLength":200,"minLength":1,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["updated_at"],"type":"object"}},"required":["activity"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"completed_at":{"format":"date-time","type":["string","null"]},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"due_at":{"format":"date-time","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"outcome":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"project_id":{"minimum":1,"type":"integer"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","kind","contact_id","opportunity_id","owner_id","due_at","completed_at","notes","outcome","archived_at"],"type":"object"}}},"description":"Updated follow-up"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"409":{"description":"Follow-up completed or update based on stale state"},"422":{"description":"Validation failed"}},"summary":"Edit an open CRM follow-up using its current updated_at value","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/activities/{id}/complete":{"post":{"operationId":"completeProjectCrmActivity","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"completed_at":{"format":"date-time","type":["string","null"]},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"due_at":{"format":"date-time","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["call","email","site_visit","meeting","task"]},"notes":{"type":["string","null"]},"opportunity_id":{"minimum":1,"type":["integer","null"]},"outcome":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"project_id":{"minimum":1,"type":"integer"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","kind","contact_id","opportunity_id","owner_id","due_at","completed_at","notes","outcome","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Complete follow-up idempotently","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/activities/{id}/history":{"get":{"operationId":"listProjectCrmActivityHistory","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor_id":{"minimum":1,"type":"integer"},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"item_id":{"minimum":1,"type":"integer"},"item_type":{"enum":["CrmContact","CrmOpportunity","CrmActivity"]},"project_id":{"type":["integer","null"]},"summary":{"type":"string"}},"required":["id","company_id","project_id","actor_id","item_type","item_id","action","summary","created_at"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator, token scope, or destination CRM permission denied"},"404":{"description":"Scoped intake or project record not found"},"409":{"description":"Linked aggregate cannot be associated independently"}},"summary":"Read retained company intake history for scoped CRM record","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/activities/{id}/restore":{"post":{"description":"Clears archived_at so the follow-up returns to lists, summaries and the action center. Project CRM edit permission and crm:write, as for DELETE. Repeating the request, or restoring an active record, is a no-op. Records a restored history entry.","operationId":"restoreProjectCrmActivity","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Restored"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Restore archived CRM follow-up","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/contacts":{"get":{"operationId":"listProjectCrmContacts","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Comma-separated values: lead, client, partner, subcontractor.","in":"query","name":"filters[relationship]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[owner_id]","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"project_id":{"minimum":1,"type":"integer"},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","first_name","last_name","organization","email","phone","role","relationship","source","notes","owner_id","archived_at"],"type":"object"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List contacts","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"operationId":"createProjectCrmContact","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"contact":{"additionalProperties":false,"properties":{"email":{"type":["string","null"]},"first_name":{"type":"string"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]}},"required":["first_name","last_name"],"type":"object"}},"required":["contact"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"project_id":{"minimum":1,"type":"integer"},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","first_name","last_name","organization","email","phone","role","relationship","source","notes","owner_id","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Create contact","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/contacts/duplicates":{"get":{"description":"Advisory check before creating a project CRM contact. Returns up to 10 active contacts in the same scope with the same email (case-insensitive), or the same first and last name and organization (case-insensitive; a blank organization matches contacts without one). Contact create never blocks on duplicates. Requires CRM view permission and crm:read.","operationId":"listProjectCrmContactsDuplicates","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"email","schema":{"type":"string"}},{"in":"query","name":"first_name","schema":{"type":"string"}},{"in":"query","name":"last_name","schema":{"type":"string"}},{"in":"query","name":"organization","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"project_id":{"minimum":1,"type":"integer"},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","first_name","last_name","organization","email","phone","role","relationship","source","notes","owner_id","archived_at"],"type":"object"},"maxItems":10,"type":"array"}}},"description":"Likely duplicates, oldest first; empty when none"},"400":{"description":"Neither email nor both first_name and last_name supplied"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"}},"summary":"Find likely duplicate contacts","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/contacts/{id}":{"delete":{"description":"Soft archive. Project CRM edit permission, as for PATCH. The contact stays readable by id (archived_at set) and in history, but leaves lists, summaries, forecasts, cohorts and exports, and can no longer be edited or newly linked. Repeating the request is a no-op. Records an archived history entry.","operationId":"deleteProjectCrmContact","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Archived"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Archive CRM contact","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false},"get":{"operationId":"getProjectCrmContact","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"project_id":{"minimum":1,"type":"integer"},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","first_name","last_name","organization","email","phone","role","relationship","source","notes","owner_id","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Get contact","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"patch":{"operationId":"updateProjectCrmContact","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"contact":{"additionalProperties":false,"minProperties":1,"properties":{"email":{"type":["string","null"]},"first_name":{"type":"string"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"description":"Optional current updated_at. When sent, a stale value returns 409 instead of overwriting a newer edit.","format":"date-time","type":"string"}},"type":"object"}},"required":["contact"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"project_id":{"minimum":1,"type":"integer"},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","first_name","last_name","organization","email","phone","role","relationship","source","notes","owner_id","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"409":{"description":"Archived contact, or update based on a stale updated_at"},"422":{"description":"Validation failed"}},"summary":"Update contact","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/contacts/{id}/history":{"get":{"operationId":"listProjectCrmContactHistory","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor_id":{"minimum":1,"type":"integer"},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"item_id":{"minimum":1,"type":"integer"},"item_type":{"enum":["CrmContact","CrmOpportunity","CrmActivity"]},"project_id":{"type":["integer","null"]},"summary":{"type":"string"}},"required":["id","company_id","project_id","actor_id","item_type","item_id","action","summary","created_at"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator, token scope, or destination CRM permission denied"},"404":{"description":"Scoped intake or project record not found"},"409":{"description":"Linked aggregate cannot be associated independently"}},"summary":"Read retained company intake history for scoped CRM record","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/contacts/{id}/merge":{"post":{"description":"Moves the source contact's opportunities, activities, service cases, import references and converted inquiry links to target_id (an active contact in the same scope), fills the target's empty organization, email, phone, role, source, notes and owner from the source, then archives the source. One locked transaction; history records a merged entry on the source and an updated entry on the target. Same permission as archive (CRM edit) and crm:write. A source with customer responses, offers, authority evidence, portal grants, invitations or service requests is refused with 409; merge in the other direction instead. The master person link is not copied.","operationId":"mergeProjectCrmContact","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"merge":{"additionalProperties":false,"properties":{"target_id":{"minimum":1,"type":"integer"},"updated_at":{"description":"Optional current updated_at of the source contact. When sent, a stale value returns 409.","format":"date-time","type":"string"}},"required":["target_id"],"type":"object"}},"required":["merge"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"email":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"minimum":1,"type":"integer"},"last_name":{"type":"string"},"notes":{"type":["string","null"]},"organization":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"phone":{"type":["string","null"]},"project_id":{"minimum":1,"type":"integer"},"relationship":{"enum":["lead","client","partner","subcontractor"]},"role":{"type":["string","null"]},"source":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","first_name","last_name","organization","email","phone","role","relationship","source","notes","owner_id","archived_at"],"type":"object"}}},"description":"The surviving target contact"},"400":{"description":"Target is the source contact or is archived"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Source or target not found in this scope"},"409":{"description":"Source archived or stale, or bound to customer-facing records"},"422":{"description":"Invalid body"}},"summary":"Merge a duplicate contact into another","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/contacts/{id}/person":{"delete":{"operationId":"deletePersonProjectCrmContact","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"null"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Unlink contact from master person","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false},"get":{"operationId":"listProjectCrmContactPerson","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"properties":{"person_id":{"minimum":1,"type":"integer"},"person_name":{"type":"string"}},"required":["person_id","person_name"],"type":"object"},{"type":"null"}]}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Get explicit master person link","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"put":{"operationId":"personProjectCrmContact","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"person_link":{"properties":{"person_id":{"minimum":1,"type":"integer"}},"required":["person_id"],"type":"object"}},"required":["person_link"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"person_id":{"minimum":1,"type":"integer"},"person_name":{"type":"string"}},"required":["person_id","person_name"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Link contact to master person","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/contacts/{id}/restore":{"post":{"description":"Clears archived_at so the contact returns to lists, summaries and exports. Project CRM edit permission and crm:write, as for DELETE. Repeating the request, or restoring an active record, is a no-op. Records a restored history entry.","operationId":"restoreProjectCrmContact","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Restored"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Restore archived CRM contact","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/decision_requests":{"get":{"description":"Project CRM view and crm:read. Private paginated draft and response history.","operationId":"listProjectCrmCustomerPortalDecisionRequests","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"rows":{"items":{"additionalProperties":false,"properties":{"body":{"type":"string"},"corrected_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"due_on":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"published_at":{"format":"date-time","type":["string","null"]},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"recipient_email":{"type":["string","null"]},"recipient_grant_id":{"type":["integer","null"]},"recipient_name":{"type":["string","null"]},"response":{"anyOf":[{"type":"null"},{"additionalProperties":false,"properties":{"comment":{"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"responded_at":{"format":"date-time","type":"string"},"selected_option_key":{"type":"string"},"selected_option_label":{"type":"string"}},"required":["id","selected_option_key","selected_option_label","comment","responded_at"],"type":"object"}]},"revisions":{"items":{"additionalProperties":false,"properties":{"actor_user_id":{"minimum":1,"type":"integer"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"due_on":{"format":"date","type":["string","null"]},"event":{"enum":["created","published","corrected","withdrawn"],"type":"string"},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"reason":{"type":["string","null"]},"title":{"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["version","event","purpose","title","body","due_on","options","reason","actor_user_id","created_at"],"type":"object"},"type":"array"},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","purpose","title","body","due_on","options","state","version","recipient_grant_id","recipient_name","recipient_email","published_at","corrected_at","withdrawn_at","created_at","updated_at","response"],"type":"object"},"type":"array"},"skip":{"minimum":0,"type":"integer"},"take":{"maximum":100,"minimum":1,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["rows","total","skip","take"],"type":"object"}}},"description":"Decision request worklist"},"401":{"description":"Authentication required"},"403":{"description":"CRM view denied"}},"summary":"List customer decision requests for staff","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"post":{"description":"Project CRM admin and crm:write. Operational preference only, not legal or financial authorization.","operationId":"createProjectCrmCustomerPortalDecisionRequest","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"decision_request":{"additionalProperties":false,"properties":{"body":{"maxLength":4000,"minLength":1,"type":"string"},"due_on":{"format":"date","type":["string","null"]},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"title":{"maxLength":160,"minLength":1,"type":"string"}},"required":["purpose","title","body","options"],"type":"object"}},"required":["decision_request"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"body":{"type":"string"},"corrected_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"due_on":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"published_at":{"format":"date-time","type":["string","null"]},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"recipient_email":{"type":["string","null"]},"recipient_grant_id":{"type":["integer","null"]},"recipient_name":{"type":["string","null"]},"response":{"anyOf":[{"type":"null"},{"additionalProperties":false,"properties":{"comment":{"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"responded_at":{"format":"date-time","type":"string"},"selected_option_key":{"type":"string"},"selected_option_label":{"type":"string"}},"required":["id","selected_option_key","selected_option_label","comment","responded_at"],"type":"object"}]},"revisions":{"items":{"additionalProperties":false,"properties":{"actor_user_id":{"minimum":1,"type":"integer"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"due_on":{"format":"date","type":["string","null"]},"event":{"enum":["created","published","corrected","withdrawn"],"type":"string"},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"reason":{"type":["string","null"]},"title":{"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["version","event","purpose","title","body","due_on","options","reason","actor_user_id","created_at"],"type":"object"},"type":"array"},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","purpose","title","body","due_on","options","state","version","recipient_grant_id","recipient_name","recipient_email","published_at","corrected_at","withdrawn_at","created_at","updated_at","response"],"type":"object"}}},"description":"Private draft"},"401":{"description":"Authentication required"},"403":{"description":"CRM admin denied"},"409":{"description":"Version or idempotency conflict"},"413":{"description":"Body too large"},"422":{"description":"Invalid input"}},"summary":"Create private customer decision draft","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/decision_requests/{id}":{"get":{"description":"Project CRM view and crm:read. Includes retained staff revisions and selected customer response.","operationId":"getProjectCrmCustomerPortalDecisionRequest","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"body":{"type":"string"},"corrected_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"due_on":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"published_at":{"format":"date-time","type":["string","null"]},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"recipient_email":{"type":["string","null"]},"recipient_grant_id":{"type":["integer","null"]},"recipient_name":{"type":["string","null"]},"response":{"anyOf":[{"type":"null"},{"additionalProperties":false,"properties":{"comment":{"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"responded_at":{"format":"date-time","type":"string"},"selected_option_key":{"type":"string"},"selected_option_label":{"type":"string"}},"required":["id","selected_option_key","selected_option_label","comment","responded_at"],"type":"object"}]},"revisions":{"items":{"additionalProperties":false,"properties":{"actor_user_id":{"minimum":1,"type":"integer"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"due_on":{"format":"date","type":["string","null"]},"event":{"enum":["created","published","corrected","withdrawn"],"type":"string"},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"reason":{"type":["string","null"]},"title":{"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["version","event","purpose","title","body","due_on","options","reason","actor_user_id","created_at"],"type":"object"},"type":"array"},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","purpose","title","body","due_on","options","state","version","recipient_grant_id","recipient_name","recipient_email","published_at","corrected_at","withdrawn_at","created_at","updated_at","response"],"type":"object"}}},"description":"Decision request and history"},"401":{"description":"Authentication required"},"403":{"description":"CRM view denied"},"404":{"description":"Not found"}},"summary":"Show customer decision request to staff","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/decision_requests/{id}/correct":{"post":{"description":"Project CRM admin and crm:write. Retains previous staff wording and selected audience; requires reason and current version.","operationId":"correctProjectCrmCustomerPortalDecisionRequest","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"correction":{"additionalProperties":false,"properties":{"body":{"maxLength":4000,"minLength":1,"type":"string"},"due_on":{"format":"date","type":["string","null"]},"expected_version":{"minimum":1,"type":"integer"},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"reason":{"maxLength":1000,"minLength":1,"type":"string"},"title":{"maxLength":160,"minLength":1,"type":"string"}},"required":["purpose","title","body","options","expected_version","reason"],"type":"object"}},"required":["correction"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"body":{"type":"string"},"corrected_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"due_on":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"published_at":{"format":"date-time","type":["string","null"]},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"recipient_email":{"type":["string","null"]},"recipient_grant_id":{"type":["integer","null"]},"recipient_name":{"type":["string","null"]},"response":{"anyOf":[{"type":"null"},{"additionalProperties":false,"properties":{"comment":{"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"responded_at":{"format":"date-time","type":"string"},"selected_option_key":{"type":"string"},"selected_option_label":{"type":"string"}},"required":["id","selected_option_key","selected_option_label","comment","responded_at"],"type":"object"}]},"revisions":{"items":{"additionalProperties":false,"properties":{"actor_user_id":{"minimum":1,"type":"integer"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"due_on":{"format":"date","type":["string","null"]},"event":{"enum":["created","published","corrected","withdrawn"],"type":"string"},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"reason":{"type":["string","null"]},"title":{"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["version","event","purpose","title","body","due_on","options","reason","actor_user_id","created_at"],"type":"object"},"type":"array"},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","purpose","title","body","due_on","options","state","version","recipient_grant_id","recipient_name","recipient_email","published_at","corrected_at","withdrawn_at","created_at","updated_at","response"],"type":"object"}}},"description":"Corrected request"},"401":{"description":"Authentication required"},"403":{"description":"CRM admin denied"},"409":{"description":"Version or idempotency conflict"},"413":{"description":"Body too large"},"422":{"description":"Invalid input"}},"summary":"Correct decision request before customer response","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/decision_requests/{id}/publish":{"post":{"description":"Project CRM admin and crm:write. Requires a live reviewed grant, version and UUID request key. No message is dispatched automatically.","operationId":"publishProjectCrmCustomerPortalDecisionRequest","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"publication":{"additionalProperties":false,"properties":{"expected_version":{"minimum":1,"type":"integer"},"grant_id":{"minimum":1,"type":"integer"},"request_key":{"format":"uuid","type":"string"}},"required":["expected_version","grant_id","request_key"],"type":"object"}},"required":["publication"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"body":{"type":"string"},"corrected_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"due_on":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"published_at":{"format":"date-time","type":["string","null"]},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"recipient_email":{"type":["string","null"]},"recipient_grant_id":{"type":["integer","null"]},"recipient_name":{"type":["string","null"]},"response":{"anyOf":[{"type":"null"},{"additionalProperties":false,"properties":{"comment":{"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"responded_at":{"format":"date-time","type":"string"},"selected_option_key":{"type":"string"},"selected_option_label":{"type":"string"}},"required":["id","selected_option_key","selected_option_label","comment","responded_at"],"type":"object"}]},"revisions":{"items":{"additionalProperties":false,"properties":{"actor_user_id":{"minimum":1,"type":"integer"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"due_on":{"format":"date","type":["string","null"]},"event":{"enum":["created","published","corrected","withdrawn"],"type":"string"},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"reason":{"type":["string","null"]},"title":{"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["version","event","purpose","title","body","due_on","options","reason","actor_user_id","created_at"],"type":"object"},"type":"array"},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","purpose","title","body","due_on","options","state","version","recipient_grant_id","recipient_name","recipient_email","published_at","corrected_at","withdrawn_at","created_at","updated_at","response"],"type":"object"}}},"description":"Publication receipt"},"401":{"description":"Authentication required"},"403":{"description":"CRM admin denied"},"409":{"description":"Version or idempotency conflict"},"413":{"description":"Body too large"},"422":{"description":"Invalid input"}},"summary":"Publish decision request to one exact customer grant","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/decision_requests/{id}/withdraw":{"post":{"description":"Project CRM admin and crm:write. Removes customer visibility and retains staff history.","operationId":"withdrawProjectCrmCustomerPortalDecisionRequest","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"withdrawal":{"additionalProperties":false,"properties":{"expected_version":{"minimum":1,"type":"integer"},"reason":{"maxLength":1000,"minLength":1,"type":"string"}},"required":["expected_version","reason"],"type":"object"}},"required":["withdrawal"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"body":{"type":"string"},"corrected_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"due_on":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"published_at":{"format":"date-time","type":["string","null"]},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"recipient_email":{"type":["string","null"]},"recipient_grant_id":{"type":["integer","null"]},"recipient_name":{"type":["string","null"]},"response":{"anyOf":[{"type":"null"},{"additionalProperties":false,"properties":{"comment":{"type":["string","null"]},"id":{"minimum":1,"type":"integer"},"responded_at":{"format":"date-time","type":"string"},"selected_option_key":{"type":"string"},"selected_option_label":{"type":"string"}},"required":["id","selected_option_key","selected_option_label","comment","responded_at"],"type":"object"}]},"revisions":{"items":{"additionalProperties":false,"properties":{"actor_user_id":{"minimum":1,"type":"integer"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"due_on":{"format":"date","type":["string","null"]},"event":{"enum":["created","published","corrected","withdrawn"],"type":"string"},"options":{"items":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,39}$","type":"string"},"label":{"maxLength":160,"minLength":1,"type":"string"}},"required":["key","label"],"type":"object"},"maxItems":5,"minItems":2,"type":"array"},"purpose":{"enum":["schedule_preference","material_selection","general_feedback"],"type":"string"},"reason":{"type":["string","null"]},"title":{"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["version","event","purpose","title","body","due_on","options","reason","actor_user_id","created_at"],"type":"object"},"type":"array"},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","purpose","title","body","due_on","options","state","version","recipient_grant_id","recipient_name","recipient_email","published_at","corrected_at","withdrawn_at","created_at","updated_at","response"],"type":"object"}}},"description":"Withdrawn request"},"401":{"description":"Authentication required"},"403":{"description":"CRM admin denied"},"409":{"description":"Version or idempotency conflict"},"413":{"description":"Body too large"},"422":{"description":"Invalid input"}},"summary":"Withdraw unanswered decision request","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/document_shares":{"get":{"description":"Requires project CRM view. Drafts, recipients and source file metadata stay staff-only. Private, paginated response.","operationId":"listProjectCrmCustomerPortalDocumentShares","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"rows":{"items":{"$ref":"#/components/schemas/crm_CrmCustomerDocumentShare"},"type":"array"},"skip":{"minimum":0,"type":"integer"},"take":{"minimum":1,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["rows","total","skip","take"],"type":"object"}}},"description":"Staff document shares"}},"summary":"List staff customer document shares","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"post":{"description":"Requires project CRM admin and Documents view. A current eligible source file is selected; public title and filename are reviewed explicitly. The draft is not available to customers.","operationId":"createProjectCrmCustomerPortalDocumentShare","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerDocumentShareDraftRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerDocumentShare"}}},"description":"Private document-share draft"}},"summary":"Create a private customer document-share draft","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/document_shares/{id}":{"get":{"description":"Requires project CRM view. Includes retained staff-only source and recipient details.","operationId":"getProjectCrmCustomerPortalDocumentShare","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerDocumentShareDetail"}}},"description":"Document-share detail"}},"summary":"Show staff customer document-share history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/document_shares/{id}/publish":{"post":{"description":"Requires project CRM admin. Rechecks current source bytes, scanner verdict, version and every selected live grant. Identical request-key replay returns the original receipt.","operationId":"publishProjectCrmCustomerPortalDocumentShare","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerDocumentSharePublishRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerDocumentShare"}}},"description":"Published document share"}},"summary":"Publish reviewed document to exact customer grants","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/document_shares/{id}/withdraw":{"post":{"description":"Requires project CRM admin. Revokes every customer download and retains the staff history and reason.","operationId":"withdrawProjectCrmCustomerPortalDocumentShare","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerDocumentShareWithdrawRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerDocumentShare"}}},"description":"Withdrawn document share"}},"summary":"Withdraw a customer document share","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/grants":{"get":{"operationId":"listProjectCrmCustomerPortalGrants","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"description":"Scoped paginated list"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission denied"},"404":{"description":"Project or record not found"}},"summary":"List current and revoked project contact grants","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/grants/{id}/revoke":{"post":{"operationId":"revokeProjectCrmCustomerPortalGrant","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"revoke":{"additionalProperties":false,"properties":{"note":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["note"],"type":"object"}},"required":["revoke"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Updated scoped record"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission denied"},"404":{"description":"Project or record not found"},"409":{"description":"Version or state conflict"}},"summary":"Revoke a project contact grant and invalidate its access","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/invitations":{"get":{"operationId":"listProjectCrmCustomerPortalInvitations","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"description":"Scoped paginated list"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission denied"},"404":{"description":"Project or record not found"}},"summary":"List reviewed customer access invitations","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"post":{"operationId":"createProjectCrmCustomerPortalInvitation","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"invitation":{"additionalProperties":false,"properties":{"contact_id":{"minimum":1,"type":"integer"},"review_note":{"maxLength":2000,"type":"string"},"review_reference":{"maxLength":500,"minLength":1,"type":"string"},"review_source":{"enum":["in_person","document_review","verified_callback","other"],"type":"string"},"role":{"enum":["requester","viewer"],"type":"string"}},"required":["contact_id","role","review_source","review_reference"],"type":"object"}},"required":["invitation"],"type":"object"}}},"required":true},"responses":{"201":{"description":"Invitation metadata and one-time secret; never returned again"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission denied"},"404":{"description":"Project or record not found"}},"summary":"Issue a one-time project contact invitation after staff review","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/invitations/{id}/revoke":{"post":{"operationId":"revokeProjectCrmCustomerPortalInvitation","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"revoke":{"additionalProperties":false,"properties":{"note":{"maxLength":2000,"minLength":1,"type":"string"}},"required":["note"],"type":"object"}},"required":["revoke"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Updated scoped record"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission denied"},"404":{"description":"Project or record not found"},"409":{"description":"Version or state conflict"}},"summary":"Revoke a customer invitation","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/project_updates":{"get":{"description":"Requires project CRM view and crm:read. Drafts and withdrawn updates remain staff-only. Results are paginated and private.","operationId":"listProjectCrmCustomerPortalProjectUpdates","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"rows":{"items":{"properties":{"body":{"type":"string"},"corrected_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"milestone_on":{"format":"date","type":["string","null"]},"published_at":{"format":"date-time","type":["string","null"]},"recipient_grant_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"source_review_needed":{"description":"True when a linked source needs staff review before customer publication or continued visibility.","type":"boolean"},"source_schedule_task_id":{"description":"Internal schedule milestone source reviewed by staff; never returned to customers.","minimum":1,"type":["integer","null"]},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"status_label":{"enum":["informational","on_track","at_risk","delayed","completed"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","title","body","status_label","milestone_on","state","version","published_at","corrected_at","withdrawn_at","recipient_grant_ids","created_at","updated_at","source_schedule_task_id","source_review_needed"],"type":"object"},"type":"array"},"skip":{"minimum":0,"type":"integer"},"take":{"maximum":100,"minimum":1,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["rows","total","skip","take"],"type":"object"}}},"description":"Project update worklist"},"401":{"description":"Authentication required"},"403":{"description":"CRM view denied"}},"summary":"List staff-reviewed customer project updates","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"post":{"description":"Creates a private staff draft. An optional source_schedule_task_id must identify a current, non-private milestone in this project. Staff wording and date are reviewed explicitly; no schedule fields are copied to the customer response.","operationId":"createProjectCrmCustomerPortalProjectUpdate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerProjectUpdateDraftRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"body":{"type":"string"},"corrected_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"milestone_on":{"format":"date","type":["string","null"]},"published_at":{"format":"date-time","type":["string","null"]},"recipient_grant_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"source_review_needed":{"description":"True when a linked source needs staff review before customer publication or continued visibility.","type":"boolean"},"source_schedule_task_id":{"description":"Internal schedule milestone source reviewed by staff; never returned to customers.","minimum":1,"type":["integer","null"]},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"status_label":{"enum":["informational","on_track","at_risk","delayed","completed"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","title","body","status_label","milestone_on","state","version","published_at","corrected_at","withdrawn_at","recipient_grant_ids","created_at","updated_at","source_schedule_task_id","source_review_needed"],"type":"object"}}},"description":"Private draft"},"401":{"description":"Authentication required"},"403":{"description":"CRM admin denied"},"422":{"description":"Invalid draft"}},"summary":"Create a private customer project update draft","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/project_updates/{id}":{"get":{"description":"Requires project CRM view and crm:read. Includes frozen recipient snapshot and revisions.","operationId":"getProjectCrmCustomerPortalProjectUpdate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"body":{"type":"string"},"corrected_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"milestone_on":{"format":"date","type":["string","null"]},"published_at":{"format":"date-time","type":["string","null"]},"recipient_grant_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"source_review_needed":{"description":"True when a linked source needs staff review before customer publication or continued visibility.","type":"boolean"},"source_schedule_task_id":{"description":"Internal schedule milestone source reviewed by staff; never returned to customers.","minimum":1,"type":["integer","null"]},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"status_label":{"enum":["informational","on_track","at_risk","delayed","completed"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","title","body","status_label","milestone_on","state","version","published_at","corrected_at","withdrawn_at","recipient_grant_ids","created_at","updated_at","source_schedule_task_id","source_review_needed"],"type":"object"},{"properties":{"recipients":{"items":{"properties":{"grant_id":{"minimum":1,"type":"integer"},"recipient_email":{"format":"email","type":"string"},"recipient_name":{"type":"string"}},"required":["grant_id","recipient_name","recipient_email"],"type":"object"},"type":"array"},"revisions":{"items":{"properties":{"actor_user_id":{"minimum":1,"type":"integer"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"event":{"enum":["created","published","corrected","withdrawn"],"type":"string"},"milestone_on":{"format":"date","type":["string","null"]},"reason":{"type":["string","null"]},"source_schedule_task_id":{"description":"Internal schedule milestone source reviewed by staff; never returned to customers.","minimum":1,"type":["integer","null"]},"status_label":{"type":"string"},"title":{"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["version","event","title","body","status_label","milestone_on","reason","actor_user_id","created_at","source_schedule_task_id"],"type":"object"},"type":"array"}},"required":["recipients","revisions"],"type":"object"}]}}},"description":"Staff detail"},"401":{"description":"Authentication required"},"403":{"description":"CRM view denied"},"404":{"description":"Update not found"}},"summary":"Show staff-only project update and retained history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/project_updates/{id}/correct":{"post":{"description":"Requires project CRM admin and crm:write. Recipient snapshot cannot change; earlier content remains in staff-only history. A customer sees current corrected wording and corrected_at only.","operationId":"correctProjectCrmCustomerPortalProjectUpdate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerProjectUpdateCorrectRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"body":{"type":"string"},"corrected_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"milestone_on":{"format":"date","type":["string","null"]},"published_at":{"format":"date-time","type":["string","null"]},"recipient_grant_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"source_review_needed":{"description":"True when a linked source needs staff review before customer publication or continued visibility.","type":"boolean"},"source_schedule_task_id":{"description":"Internal schedule milestone source reviewed by staff; never returned to customers.","minimum":1,"type":["integer","null"]},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"status_label":{"enum":["informational","on_track","at_risk","delayed","completed"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","title","body","status_label","milestone_on","state","version","published_at","corrected_at","withdrawn_at","recipient_grant_ids","created_at","updated_at","source_schedule_task_id","source_review_needed"],"type":"object"}}},"description":"Corrected staff update"},"401":{"description":"Authentication required"},"403":{"description":"CRM admin denied"},"409":{"description":"Version or state conflict"},"422":{"description":"Invalid correction"}},"summary":"Append a reasoned correction to a draft or publication","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/project_updates/{id}/publish":{"post":{"description":"Requires project CRM admin and crm:write. Locks and verifies each selected live same-project grant, captures a fixed recipient snapshot, and returns an exact receipt on identical request-key replay.","operationId":"publishProjectCrmCustomerPortalProjectUpdate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerProjectUpdatePublishRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"body":{"type":"string"},"corrected_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"milestone_on":{"format":"date","type":["string","null"]},"published_at":{"format":"date-time","type":["string","null"]},"recipient_grant_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"source_review_needed":{"description":"True when a linked source needs staff review before customer publication or continued visibility.","type":"boolean"},"source_schedule_task_id":{"description":"Internal schedule milestone source reviewed by staff; never returned to customers.","minimum":1,"type":["integer","null"]},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"status_label":{"enum":["informational","on_track","at_risk","delayed","completed"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","title","body","status_label","milestone_on","state","version","published_at","corrected_at","withdrawn_at","recipient_grant_ids","created_at","updated_at","source_schedule_task_id","source_review_needed"],"type":"object"}}},"description":"Publication receipt"},"401":{"description":"Authentication required"},"403":{"description":"CRM admin denied"},"409":{"description":"State, version or idempotency conflict"},"422":{"description":"Invalid publication"}},"summary":"Publish an exact grant-scoped customer project update","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/project_updates/{id}/withdraw":{"post":{"description":"Requires project CRM admin and crm:write. Customer visibility ends immediately; staff revision and exact audience history remain.","operationId":"withdrawProjectCrmCustomerPortalProjectUpdate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerProjectUpdateWithdrawRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"body":{"type":"string"},"corrected_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"milestone_on":{"format":"date","type":["string","null"]},"published_at":{"format":"date-time","type":["string","null"]},"recipient_grant_ids":{"items":{"minimum":1,"type":"integer"},"type":"array"},"source_review_needed":{"description":"True when a linked source needs staff review before customer publication or continued visibility.","type":"boolean"},"source_schedule_task_id":{"description":"Internal schedule milestone source reviewed by staff; never returned to customers.","minimum":1,"type":["integer","null"]},"state":{"enum":["draft","published","withdrawn"],"type":"string"},"status_label":{"enum":["informational","on_track","at_risk","delayed","completed"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"version":{"minimum":1,"type":"integer"},"withdrawn_at":{"format":"date-time","type":["string","null"]}},"required":["id","title","body","status_label","milestone_on","state","version","published_at","corrected_at","withdrawn_at","recipient_grant_ids","created_at","updated_at","source_schedule_task_id","source_review_needed"],"type":"object"}}},"description":"Withdrawn staff update"},"401":{"description":"Authentication required"},"403":{"description":"CRM admin denied"},"409":{"description":"Version or state conflict"},"422":{"description":"Invalid withdrawal"}},"summary":"Withdraw a published customer project update","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/service_requests":{"get":{"description":"Project CRM staff can list customer submissions. sort=latest_message selects only requests with customer follow-up messages, newest message first. The message timestamp is staff-only and does not imply unread state.","operationId":"listProjectCrmCustomerPortalServiceRequests","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Show requests with a customer reply, newest reply first.","in":"query","name":"sort","schema":{"enum":["latest_message"],"type":"string"}}],"responses":{"200":{"description":"Scoped paginated list"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission denied"},"404":{"description":"Project or record not found"}},"summary":"List customer-submitted service requests for staff review","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/service_requests/{id}":{"get":{"operationId":"getProjectCrmCustomerPortalServiceRequest","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"description":"Staff request with customer-visible updates"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission denied"},"404":{"description":"Project or record not found"}},"summary":"Read a customer submission with staff intake metadata","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/service_requests/{id}/evidence":{"get":{"description":"Requires current project CRM view access and crm:read token scope. Each item is a customer-supplied JPEG, PNG or PDF. Storage keys and binary data are never returned in list responses. Files are not malware-scanned by this endpoint.","operationId":"listProjectCrmCustomerPortalServiceRequestEvidence","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/crm_CrmCustomerServiceEvidence"},"type":"array"},"total":{"minimum":0,"type":"integer"}},"required":["rows","total"],"type":"object"}}},"description":"Paginated evidence metadata with no private storage key"},"401":{"description":"Authentication required"},"403":{"description":"CRM view denied"},"404":{"description":"Project request not found"}},"summary":"List customer-supplied service request evidence for project staff","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/service_requests/{id}/evidence/{evidence_id}/download":{"get":{"description":"Requires current project CRM view access and crm:read token scope. The binary is forced to attachment with no-store, no-referrer, nosniff and sandbox headers. The storage key is never exposed.","operationId":"listProjectCrmCustomerPortalServiceRequestEvidenceDownload","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"evidence_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Private attachment bytes"},"401":{"description":"Authentication required"},"403":{"description":"CRM view denied"},"404":{"description":"Evidence not found in this project request"}},"summary":"Download one customer-supplied service request evidence file","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/service_requests/{id}/intake":{"post":{"operationId":"intakeProjectCrmCustomerPortalServiceRequest","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"description":"Updated scoped record"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission denied"},"404":{"description":"Project or record not found"},"409":{"description":"Version or state conflict"}},"summary":"Take a customer submission into a staff service case","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/service_requests/{id}/messages":{"get":{"description":"Requires current project CRM view access and crm:read token scope. Messages are customer-authored evidence. Staff-published updates and internal case events are separate records.","operationId":"listProjectCrmCustomerPortalServiceRequestMessages","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"description":"Paginated project-scoped customer messages with truthful principal and grant provenance"},"401":{"description":"Authentication required"},"403":{"description":"CRM view denied"},"404":{"description":"Project request not found"}},"summary":"List customer-authored follow-up messages on a project service request for staff","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/crm/customer_portal/service_requests/{id}/publish":{"post":{"operationId":"publishProjectCrmCustomerPortalServiceRequest","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"update":{"additionalProperties":false,"properties":{"message":{"maxLength":10000,"minLength":1,"type":"string"},"status":{"enum":["received","reviewing","waiting_on_customer","resolved","closed","not_accepted"],"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["version","status","message"],"type":"object"}},"required":["update"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Updated scoped record"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission denied"},"404":{"description":"Project or record not found"},"409":{"description":"Version or state conflict"}},"summary":"Publish a selected customer-visible service status and message","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/forecast":{"get":{"description":"Amounts are CRM estimates, not financial commitments. as_of is server UTC report time. Stage age is observed only from new creates or recorded transitions; migration baseline has unknown age.","operationId":"listProjectCrmForecast","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"as_of":{"format":"date-time","type":"string"},"currency":{"const":"USD"},"observed_stage_age":{"additionalProperties":false,"properties":{"days_0_to_30":{"minimum":0,"type":"integer"},"days_31_to_60":{"minimum":0,"type":"integer"},"days_61_plus":{"minimum":0,"type":"integer"}},"required":["days_0_to_30","days_31_to_60","days_61_plus"],"type":"object"},"open_amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"open_count":{"minimum":0,"type":"integer"},"overdue_close_count":{"minimum":0,"type":"integer"},"stages":{"items":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"count":{"minimum":0,"type":"integer"},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"weighted_amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"}},"required":["stage","count","amount","weighted_amount"],"type":"object"},"type":"array"},"transitions":{"items":{"additionalProperties":false,"properties":{"count":{"minimum":1,"type":"integer"},"from_stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"to_stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]}},"required":["from_stage","to_stage","count"],"type":"object"},"type":"array"},"unobserved_stage_aging_count":{"minimum":0,"type":"integer"},"weighted_amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"}},"required":["as_of","currency","open_count","open_amount","weighted_amount","overdue_close_count","unobserved_stage_aging_count","observed_stage_age","stages","transitions"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM read permission denied"},"404":{"description":"Scoped record not found"}},"summary":"Current advisory opportunity forecast and observable stage aging","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/growth_cohorts":{"get":{"description":"Rows are grouped by opportunity creation month and current source/stage at as_of, not historical month-end snapshots. Open pursuits are excluded from the decided win-rate denominator. Source is staff-attributed, not a verified acquisition channel. CRM estimates are not revenue.","operationId":"listProjectCrmGrowthCohorts","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"months","required":false,"schema":{"default":12,"maximum":24,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"as_of":{"format":"date-time","type":"string"},"from_month":{"pattern":"^\\d{4}-\\d{2}$","type":"string"},"months":{"maximum":24,"minimum":1,"type":"integer"},"rows":{"items":{"additionalProperties":false,"properties":{"decided":{"minimum":0,"type":"integer"},"lost":{"minimum":0,"type":"integer"},"month":{"pattern":"^\\d{4}-\\d{2}$","type":"string"},"open":{"minimum":0,"type":"integer"},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"total":{"minimum":0,"type":"integer"},"win_rate_percent":{"maximum":100,"minimum":0,"type":["number","null"]},"won":{"minimum":0,"type":"integer"}},"required":["month","source_category","total","open","won","lost","decided","win_rate_percent"],"type":"object"},"maxItems":216,"type":"array"}},"required":["as_of","months","from_month","rows"],"type":"object"}}},"description":"Scoped outcome cohorts"},"400":{"description":"Invalid month range"},"401":{"description":"Authentication required"},"403":{"description":"Current CRM access denied"},"404":{"description":"Scope not found"}},"summary":"Current-state opportunity outcome cohorts by UTC creation month and staff-attributed source","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/installed_assets":{"get":{"description":"Staff-only, permission-scoped installed asset register. Provenance and warranty references are recorded evidence, not automatic eligibility.","operationId":"listProjectCrmInstalledAssets","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"status","schema":{"enum":["active","retired"],"type":"string"}},{"in":"query","name":"location_id","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmInstalledAsset"},"type":"array"}}},"description":"Page of installed assets; Total and Per-Page headers"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Project, case, or asset not found"}},"summary":"List project installed assets","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"description":"Requires CRM create and crm:write. An explicit handoff reference and evidence note are required; a warranty coverage reference is reviewed staff evidence.","operationId":"createProjectCrmInstalledAsset","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"installed_asset":{"additionalProperties":false,"properties":{"asset_tag":{"maxLength":80,"minLength":1,"type":"string"},"commissioned_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}]},"evidence_note":{"maxLength":10000,"minLength":1,"type":"string"},"handoff_reference":{"maxLength":500,"minLength":1,"type":"string"},"installed_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}]},"location_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"manufacturer":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}]},"name":{"maxLength":200,"minLength":1,"type":"string"},"request_key":{"format":"uuid","type":"string"},"serial_number":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}]},"warranty_coverage_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]}},"required":["asset_tag","name","handoff_reference","evidence_note"],"type":"object"}},"required":["installed_asset"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmInstalledAsset"}}},"description":"Recorded asset"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Project, case, or asset not found"},"409":{"description":"Tag or request-key conflict"}},"summary":"Record an installed asset with handoff provenance","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/installed_assets/{id}":{"get":{"operationId":"getProjectCrmInstalledAsset","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmInstalledAsset"}}},"description":"Asset and retained change events"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Project, case, or asset not found"}},"summary":"Read an installed asset and its change history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"patch":{"description":"Requires CRM edit and crm:write. Asset tag is immutable; changes retain before/after evidence.","operationId":"updateProjectCrmInstalledAsset","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"installed_asset":{"additionalProperties":false,"properties":{"commissioned_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}]},"evidence_note":{"maxLength":10000,"minLength":1,"type":"string"},"handoff_reference":{"maxLength":500,"minLength":1,"type":"string"},"installed_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}]},"location_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"manufacturer":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}]},"name":{"maxLength":200,"minLength":1,"type":"string"},"note":{"maxLength":10000,"minLength":1,"type":"string"},"serial_number":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}]},"version":{"minimum":1,"type":"integer"},"warranty_coverage_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]}},"required":["version","note"],"type":"object"}},"required":["installed_asset"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmInstalledAsset"}}},"description":"Updated asset"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Project, case, or asset not found"},"409":{"description":"Stale version or conflicting asset state"}},"summary":"Version-check an installed asset correction","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/installed_assets/{id}/events":{"get":{"description":"The asset detail includes only the newest 100 events. This endpoint supports full retained history with bounded pages.","operationId":"listProjectCrmInstalledAssetEvents","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmInstalledAssetEvents"}}},"description":"Paginated immutable change events; Total and Per-Page headers"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Project, case, or asset not found"}},"summary":"Page through installed asset change history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/crm/installed_assets/{id}/evidence":{"get":{"description":"CRM view and crm:read required. Missing Documents access redacts source IDs, titles, purpose and note. Returns at most 50 evidence rows, newest first. Cursor is an evidence record ID.","operationId":"listProjectCrmInstalledAssetEvidence","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/crm_Evidence"},"maxItems":50,"type":"array"},"next_before":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}]}},"required":["items","next_before"],"type":"object"}}},"description":"Successful response"},"403":{"description":"CRM or independently required source authority denied"},"404":{"description":"Scoped asset or source unavailable"},"409":{"description":"Stale revision, retired asset, changed retry payload or already superseded evidence"},"422":{"description":"Invalid input"}},"summary":"Read protected pinned handoff history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"post":{"description":"CRM edit/crm:write plus current Documents/upload read/documents:read required. Exact retry replays the original ID/revision. Does not change warranty, commissioning, closeout or payment status.","operationId":"evidenceProjectCrmInstalledAsset","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_Create"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"asset_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","asset_version"],"type":"object"}}},"description":"Successful response"},"403":{"description":"CRM or independently required source authority denied"},"404":{"description":"Scoped asset or source unavailable"},"409":{"description":"Stale revision, retired asset, changed retry payload or already superseded evidence"},"422":{"description":"Invalid input"}},"summary":"Append or supersede pinned evidence","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/installed_assets/{id}/evidence/options":{"get":{"operationId":"listProjectCrmInstalledAssetEvidenceOptions","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"maxLength":200,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"has_more":{"type":"boolean"},"items":{"items":{"additionalProperties":false,"properties":{"document_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"file_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"href":{"type":"string"},"name":{"type":"string"},"state":{"const":"available"},"version_number":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["state","document_version_id","file_id","name","version_number","href"],"type":"object"},"maxItems":50,"type":"array"}},"required":["items","has_more"],"type":"object"}}},"description":"Successful response"},"403":{"description":"CRM or independently required source authority denied"},"404":{"description":"Scoped asset or source unavailable"},"409":{"description":"Stale revision, retired asset, changed retry payload or already superseded evidence"},"422":{"description":"Invalid input"}},"summary":"Search accessible uploaded source versions for an active asset","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/installed_assets/{id}/retire":{"post":{"description":"Retirement preserves asset and service history; it does not resolve cases or decide warranty coverage.","operationId":"retireProjectCrmInstalledAsset","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"retirement":{"additionalProperties":false,"properties":{"note":{"maxLength":10000,"minLength":1,"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["version","note"],"type":"object"}},"required":["retirement"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmInstalledAsset"}}},"description":"Retired asset"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Project, case, or asset not found"},"409":{"description":"Stale version or asset already retired"}},"summary":"Retire an installed asset with a version-checked note","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/installed_assets/{id}/service_cases":{"get":{"description":"Includes current and removed associations. Requires current project CRM view and crm:read.","operationId":"listProjectCrmInstalledAssetServiceCases","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmAssetCaseHistory"}}},"description":"Paginated service history; Total and Per-Page headers"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Project, case, or asset not found"}},"summary":"Read retained service-case history for an asset","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/crm/opportunities":{"get":{"operationId":"listProjectCrmOpportunities","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Comma-separated values: qualification, site_visit, estimating, proposal, negotiation, won, lost.","in":"query","name":"filters[stage]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[contact_id]","schema":{"type":"string"}},{"description":"Comma-separated IDs.","in":"query","name":"filters[owner_id]","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"currency":{"const":"USD"},"expected_close_date":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"loss_reason":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"scope":{"type":["string","null"]},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"source_detail":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","contact_id","owner_id","stage","amount","currency","probability","expected_close_date","scope","loss_reason","source_category","source_detail","archived_at"],"type":"object"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination links","schema":{"type":"string"}},"Per-Page":{"description":"Page size","schema":{"type":"integer"}},"Total":{"description":"Total matching records","schema":{"type":"integer"}}}},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"List opportunities","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"operationId":"createProjectCrmOpportunity","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"opportunity":{"additionalProperties":false,"properties":{"amount":{"pattern":"^(?:0|[1-9]\\d{0,15})(?:\\.\\d{1,2})?$","type":"string"},"contact_id":{"minimum":1,"type":["integer","null"]},"currency":{"const":"USD"},"expected_close_date":{"format":"date","type":["string","null"]},"loss_reason":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"scope":{"type":["string","null"]},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"source_detail":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"}},"required":["title"],"type":"object"}},"required":["opportunity"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"currency":{"const":"USD"},"expected_close_date":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"loss_reason":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"scope":{"type":["string","null"]},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"source_detail":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","contact_id","owner_id","stage","amount","currency","probability","expected_close_date","scope","loss_reason","source_category","source_detail","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Create opportunity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}":{"delete":{"description":"Soft archive. Project CRM edit permission, as for PATCH. The opportunity stays readable by id (archived_at set) and in history, but leaves lists, summaries, forecasts, cohorts and exports, and can no longer be edited or newly linked. Repeating the request is a no-op. Records an archived history entry.","operationId":"deleteProjectCrmOpportunity","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Archived"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Archive CRM opportunity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false},"get":{"operationId":"getProjectCrmOpportunity","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"currency":{"const":"USD"},"expected_close_date":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"loss_reason":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"scope":{"type":["string","null"]},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"source_detail":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","contact_id","owner_id","stage","amount","currency","probability","expected_close_date","scope","loss_reason","source_category","source_detail","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Get opportunity","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"patch":{"operationId":"updateProjectCrmOpportunity","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"opportunity":{"additionalProperties":false,"minProperties":1,"properties":{"amount":{"pattern":"^(?:0|[1-9]\\d{0,15})(?:\\.\\d{1,2})?$","type":"string"},"change_note":{"description":"Optional reason retained with a stage, amount, probability, or close-date change.","maxLength":1000,"minLength":1,"type":"string"},"contact_id":{"minimum":1,"type":["integer","null"]},"currency":{"const":"USD"},"expected_close_date":{"format":"date","type":["string","null"]},"loss_reason":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"scope":{"type":["string","null"]},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"source_change_note":{"description":"Required when the persisted source category or detail changes.","maxLength":1000,"minLength":1,"type":"string"},"source_detail":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"}},"type":"object"}},"required":["opportunity"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"archived_at":{"format":"date-time","type":["string","null"]},"company_id":{"minimum":1,"type":"integer"},"contact_id":{"minimum":1,"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"minimum":1,"type":"integer"},"currency":{"const":"USD"},"expected_close_date":{"format":"date","type":["string","null"]},"id":{"minimum":1,"type":"integer"},"loss_reason":{"type":["string","null"]},"owner_id":{"minimum":1,"type":["integer","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"project_id":{"minimum":1,"type":"integer"},"scope":{"type":["string","null"]},"source_category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"source_detail":{"maxLength":200,"type":["string","null"]},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","company_id","project_id","created_by_id","created_at","updated_at","title","contact_id","owner_id","stage","amount","currency","probability","expected_close_date","scope","loss_reason","source_category","source_detail","archived_at"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"Update opportunity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/bidding_handoffs":{"get":{"description":"Requires current project CRM and bidding view permissions, enabled tools, crm:read and bidding:read token scopes. Receipts are internal and can include source proposal text; vendor-facing bidding package responses never include this snapshot.","operationId":"listProjectCrmOpportunityBiddingHandoffs","parameters":[{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmBiddingHandoff"},"type":"array"}}},"description":"Newest revision first, with Total, Per-Page and Link headers"},"401":{"description":"Authentication required"},"403":{"description":"CRM or bidding view denied"},"404":{"description":"Scoped opportunity not found"}},"summary":"List reviewed proposal-to-bidding handoff receipts for an opportunity","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/forecast_history":{"get":{"description":"Migration baseline records deployment-time state, not historical transitions. Only scoped CRM readers can view events. page and per_page paginate newest first, maximum 100 rows.","operationId":"listProjectCrmOpportunityForecastHistory","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"events":{"items":{"additionalProperties":false,"properties":{"action":{"enum":["baseline","created","updated"]},"actor_id":{"type":["integer","null"]},"changed_fields":{"items":{"enum":["stage","amount","probability","expected_close_date"]},"type":"array"},"from":{"anyOf":[{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"expected_close_date":{"format":"date","type":["string","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]}},"required":["stage","amount","probability","expected_close_date"],"type":"object"},{"type":"null"}]},"id":{"minimum":1,"type":"integer"},"reason":{"maxLength":1000,"type":["string","null"]},"recorded_at":{"format":"date-time","type":"string"},"to":{"additionalProperties":false,"properties":{"amount":{"pattern":"^\\d+\\.\\d{2}$","type":"string"},"expected_close_date":{"format":"date","type":["string","null"]},"probability":{"maximum":100,"minimum":0,"type":"integer"},"stage":{"enum":["qualification","site_visit","estimating","proposal","negotiation","won","lost"]}},"required":["stage","amount","probability","expected_close_date"],"type":"object"}},"required":["id","action","actor_id","recorded_at","changed_fields","reason","from","to"],"type":"object"},"type":"array"},"page":{"minimum":1,"type":"integer"},"per_page":{"minimum":1,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["events","total","page","per_page"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM read permission denied"},"404":{"description":"Scoped record not found"}},"summary":"Paginated immutable opportunity forecast input history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/history":{"get":{"operationId":"listProjectCrmOpportunityHistory","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor_id":{"minimum":1,"type":"integer"},"company_id":{"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"item_id":{"minimum":1,"type":"integer"},"item_type":{"enum":["CrmContact","CrmOpportunity","CrmActivity"]},"project_id":{"type":["integer","null"]},"summary":{"type":"string"}},"required":["id","company_id","project_id","actor_id","item_type","item_id","action","summary","created_at"],"type":"object"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Company administrator, token scope, or destination CRM permission denied"},"404":{"description":"Scoped intake or project record not found"},"409":{"description":"Linked aggregate cannot be associated independently"}},"summary":"Read retained company intake history for scoped CRM record","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals":{"get":{"operationId":"listProjectCrmOpportunityProposals","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmProposal"},"type":"array"}}},"description":"Newest revision first; Total and Per-Page headers"},"401":{"description":"Authentication required"},"403":{"description":"CRM read denied"},"404":{"description":"Opportunity not found"}},"summary":"List proposal revisions for a project opportunity","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"post":{"operationId":"createProjectCrmOpportunityProposal","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmProposal"}}},"description":"Same author's current draft returned without another revision"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmProposal"}}},"description":"Draft created"},"401":{"description":"Authentication required"},"403":{"description":"CRM edit denied"},"404":{"description":"Opportunity not found"},"409":{"description":"Another draft or submitted proposal is current"}},"summary":"Capture the current opportunity as a new draft proposal revision","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}":{"get":{"operationId":"getProjectCrmOpportunityProposal","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmProposal"}}},"description":"Proposal"},"401":{"description":"Authentication required"},"403":{"description":"CRM read denied"},"404":{"description":"Scoped proposal not found"}},"summary":"Show a proposal revision","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"patch":{"operationId":"updateProjectCrmOpportunityProposal","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmProposalUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmProposal"}}},"description":"Updated draft"},"401":{"description":"Authentication required"},"403":{"description":"CRM edit or author denied"},"404":{"description":"Scoped proposal not found"},"409":{"description":"Revision is no longer an editable draft"},"422":{"description":"Validation failed"}},"summary":"Edit the current draft as its author","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/bidding_handoff":{"get":{"description":"Requires current CRM and bidding view permissions and crm:read plus bidding:read token scopes. Returns null when the scoped proposal has not been handed off. Older revision receipts remain readable after supersession.","operationId":"listProjectCrmOpportunityProposalBiddingHandoff","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmBiddingHandoffRead"}}},"description":"Receipt or null"},"401":{"description":"Authentication required"},"403":{"description":"CRM or bidding view denied"},"404":{"description":"Scoped opportunity or proposal not found"}},"summary":"Read an internal proposal-to-bidding handoff receipt","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"post":{"description":"A new draft requires CRM view and bidding create permission with crm:read and bidding:write scopes. An identical request_key retry can recover its receipt with current CRM and bidding view plus the same token scopes, even after supersession. Rechecks current approved source and one-use review token under locks for a new draft. Creates zero bidders, invitations, forms, vendor-facing description or messages; proposal content stays only in the internal receipt. No award, contract, budget or invitation is created.","operationId":"biddingHandoffProjectCrmOpportunityProposal","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmBiddingHandoffCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmBiddingHandoffCreated"}}},"description":"Idempotent replay"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmBiddingHandoffCreated"}}},"description":"Draft and immutable handoff receipt created"},"401":{"description":"Authentication required"},"403":{"description":"CRM or bidding access denied"},"404":{"description":"Scoped opportunity or proposal not found"},"409":{"description":"Stale/expired review, superseded proposal, duplicate revision or changed request payload"},"422":{"description":"Validation failed"}},"summary":"Create an internal draft bidding package from a reviewed CRM proposal","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/bidding_handoff/review_preview":{"post":{"description":"Requires CRM view and bidding create permission, enabled tools, crm:read and bidding:write token scopes. Package title must be independently entered; proposal title, scope, estimate and contact data are not copied into vendor-facing fields. Review token expires in ten minutes and is returned once.","operationId":"createProjectCrmOpportunityProposalBiddingHandoffReviewPreview","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmBiddingHandoffPreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmBiddingHandoffPreview"}}},"description":"Internal proposal snapshot and short-lived review token"},"401":{"description":"Authentication required"},"403":{"description":"CRM or bidding access denied"},"404":{"description":"Scoped opportunity or proposal not found"},"409":{"description":"Proposal not current/approved, expired, or already handed off"},"422":{"description":"Validation failed"}},"summary":"Review an approved proposal before creating an internal draft bidding package","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/customer_responses":{"get":{"description":"Requires current project CRM view and crm:read token scope. These are staff records, not verified customer authentication, delivery or signature.","operationId":"listProjectCrmOpportunityProposalCustomerResponses","parameters":[{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmCustomerResponse"},"type":"array"}}},"description":"Newest first, with Total, Per-Page and Link headers"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM view denied"},"404":{"description":"Scoped opportunity or proposal not found"}},"summary":"List staff-recorded customer response evidence for an exact proposal revision","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"description":"Requires project CRM edit and crm:write token scope. The exact current approved proposal and same-project contact must still match the review token. A matching request_key retry returns 200 with the original row; the first write returns 201. This does not send an offer, verify the customer, change stage or post financial values.","operationId":"createProjectCrmOpportunityProposalCustomerResponse","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerResponseCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerResponse"}}},"description":"Idempotent replay"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerResponse"}}},"description":"Response recorded"},"400":{"description":"Invalid observation time"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM edit denied"},"404":{"description":"Scoped proposal or contact not found"},"409":{"description":"Stale review, expired or superseded proposal, active response or conflicting retry"},"422":{"description":"Validation failed"}},"summary":"Record a staff-reported customer response with reviewed proposal and recipient evidence","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/customer_responses/review_preview":{"get":{"description":"Requires project CRM edit and crm:read token scope. The preview token is bound to the proposal snapshot, selected contact and response history.","operationId":"listProjectCrmOpportunityProposalCustomerResponsesReviewPreview","parameters":[{"in":"query","name":"contact_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerResponsePreview"}}},"description":"Review snapshot"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM edit denied"},"404":{"description":"Scoped proposal or contact not found"},"409":{"description":"Proposal not current and approved, expired or already has an active response"}},"summary":"Review the current approved proposal and selected recipient before recording a staff response","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/customer_responses/{response_id}/void":{"post":{"description":"Requires project CRM administrator and crm:write token scope. The original recipient and response evidence remain in history; a new reviewed response can then be recorded if the proposal is still current and valid.","operationId":"voidProjectCrmOpportunityProposalCustomerResponse","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"response_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerResponseVoid"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerResponse"}}},"description":"Voided response or idempotent retry"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM admin denied"},"404":{"description":"Scoped response not found"},"409":{"description":"Already voided with a different reason"},"422":{"description":"Validation failed"}},"summary":"Void a staff-recorded response with a retained reason","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/offers":{"get":{"description":"Requires project CRM view and crm:read token scope. Metadata omits invitation secrets and PDF bytes. Offers with delivery_state not_sent have not been sent by the application.","operationId":"listProjectCrmOpportunityProposalOffers","parameters":[{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmCustomerOffer"},"type":"array"}}},"description":"Paginated offer metadata with Total, Per-Page and Link headers"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM view denied"},"404":{"description":"Scoped opportunity or proposal not found"}},"summary":"List frozen customer offers for an exact proposal revision","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"description":"Requires project CRM administrator and crm:write token scope. The invitation_path contains a one-time bearer secret in the URL fragment and is returned once only. Treat it as sensitive; the application does not send the link or verify delivery. Portal response is attributable to the link holder, not verified signatory authority or an electronic signature. Does not change stage, contract or budget.","operationId":"createProjectCrmOpportunityProposalOffer","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerOfferCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerOfferCreated"}}},"description":"Offer and one-time invitation path"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM administrator denied"},"404":{"description":"Scoped proposal or contact not found"},"409":{"description":"Proposal expired or superseded, contact has no email, or an unrevoked offer exists"},"422":{"description":"Validation failed"}},"summary":"Freeze the current approved proposal as a customer offer and create a one-use unsent invitation link","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/offers/{offer_id}/authority_evidence":{"get":{"description":"Requires project CRM administrator and crm:read token scope. Historical evidence remains visible after offer expiry or revocation. An asserted role does not prove signer identity or authorize portal acceptance.","operationId":"listProjectCrmOpportunityProposalOfferAuthorityEvidence","parameters":[{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"offer_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmOfferAuthorityEvidence"},"type":"array"}}},"description":"Paginated private evidence"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM administrator denied"},"404":{"description":"Scoped offer not found"}},"summary":"List staff-reported, unverified offer recipient authority evidence","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"description":"Requires project CRM administrator and crm:write token scope. The observation must follow offer creation, and the current contact email, active offer, approved proposal and PDF digest must match. This evidence remains unverified and does not alter portal response, contract, stage or budget.","operationId":"authorityEvidenceProjectCrmOpportunityProposalOffer","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"offer_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmOfferAuthorityEvidenceCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmOfferAuthorityEvidence"}}},"description":"Idempotent replay"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmOfferAuthorityEvidence"}}},"description":"Staff observation recorded"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM administrator denied"},"404":{"description":"Scoped offer not found"},"409":{"description":"Offer or recipient changed, proposal stale or request-key conflict"},"422":{"description":"Validation failed"}},"summary":"Record a staff observation of the exact offer recipient's claimed authority","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/offers/{offer_id}/authority_evidence/{evidence_id}/void":{"post":{"description":"Requires project CRM administrator and crm:write token scope. Does not change the offer or portal response.","operationId":"voidProjectCrmOpportunityProposalOfferAuthorityEvidence","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"offer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"evidence_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmOfferAuthorityEvidenceVoid"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmOfferAuthorityEvidence"}}},"description":"Voided evidence or idempotent retry"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM administrator denied"},"404":{"description":"Scoped evidence not found"},"409":{"description":"Already voided with a different reason"},"422":{"description":"Validation failed"}},"summary":"Void a staff-reported authority observation while retaining its history","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/offers/{offer_id}/deliveries":{"get":{"description":"Requires project CRM administrator and crm:read token scope. Provider acceptance does not prove inbox delivery. Generic webhook and Resend transports may append authenticated delivered or bounced events. Portal invitation redemption is separate first-party link-access evidence. A queued attempt persisting beyond the provider timeout has an uncertain submission outcome and is not resent automatically.","operationId":"listProjectCrmOpportunityProposalOfferDeliveries","parameters":[{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"offer_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmOfferDeliveryAttempt"},"type":"array"}}},"description":"Paginated private dispatch attempts"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM administrator denied"},"404":{"description":"Scoped offer not found"}},"summary":"List private offer email dispatch attempts and signed delivery events","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"description":"Requires project CRM administrator and crm:write token scope. Rotates and invalidates the original unsent invitation link. Requires a configured webhook or Resend provider; local outbox mode fails closed. No bearer link is persisted in the application database or returned by this operation. One attempt per offer; an uncertain outcome is never retried automatically. Provider acceptance is not proof of recipient delivery or identity.","operationId":"createProjectCrmOpportunityProposalOfferDelivery","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"offer_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmOfferDeliveryCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmOfferDeliveryResult"}}},"description":"Idempotent replay without resending"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmOfferDeliveryResult"}}},"description":"Dispatch attempted; result is provider acceptance, definite failure, or unknown"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM administrator denied"},"404":{"description":"Scoped offer not found"},"409":{"description":"Provider unavailable, offer stale or used, or prior dispatch attempt exists"},"422":{"description":"Validation failed"},"503":{"description":"Outcome persistence uncertain; inspect with same request key without resending"}},"summary":"Submit a new one-use offer link to the configured email provider once","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/offers/{offer_id}/identity_reviews":{"get":{"description":"Project CRM administrators only. Approval means staff-reviewed evidence, not legal identity proof, signer authority or a signature. Historical records remain visible after access changes.","operationId":"listProjectCrmOpportunityProposalOfferIdentityReviews","parameters":[{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"offer_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmOfferIdentityReview"},"type":"array"}}},"description":"Private paged review history"},"401":{"description":"Authentication required"},"403":{"description":"CRM administrator denied"},"404":{"description":"Scoped offer not found"}},"summary":"List exact-grant staff identity evidence reviews for an offer","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"description":"Requires a current customer principal and exact active grant. A separate CRM administrator must decide the review. No contract, opportunity stage or budget changes.","operationId":"createProjectCrmOpportunityProposalOfferIdentityReview","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"offer_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmOfferIdentityReviewCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmOfferIdentityReview"}}},"description":"Idempotent replay"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmOfferIdentityReview"}}},"description":"Review submitted"},"400":{"description":"Evidence observation or expiry is outside the accepted window"},"401":{"description":"Authentication required"},"403":{"description":"CRM administrator denied"},"404":{"description":"Scoped offer or grant not found"},"409":{"description":"Stale grant, recipient, artifact or request key"},"422":{"description":"Validation failed"}},"summary":"Submit staff identity evidence for exact customer grant and frozen offer","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/offers/{offer_id}/identity_reviews/{review_id}/decisions":{"post":{"description":"Approval or rejection requires an administrator other than the submitter. Any current CRM administrator may revoke an approval with a reason. Approval is current only while the exact offer and customer grant remain current; it is never a legal signature.","operationId":"createProjectCrmOpportunityProposalOfferIdentityReviewDecision","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"offer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"review_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmOfferIdentityDecisionCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmOfferIdentityReview"}}},"description":"Decision recorded or idempotently replayed"},"401":{"description":"Authentication required"},"403":{"description":"CRM administrator denied"},"404":{"description":"Scoped review not found"},"409":{"description":"Stale grant, offer, artifact or conflicting decision"},"422":{"description":"Validation failed"}},"summary":"Independently approve, reject or revoke a staff identity evidence review","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/offers/{offer_id}/revoke":{"post":{"description":"Requires project CRM administrator and crm:write token scope. The original offer and any link-holder response remain in history; the reason is retained.","operationId":"revokeProjectCrmOpportunityProposalOffer","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"offer_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerOfferRevoke"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCustomerOffer"}}},"description":"Revoked offer or idempotent retry"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM administrator denied"},"404":{"description":"Scoped offer not found"},"409":{"description":"Already revoked with a different reason"},"422":{"description":"Validation failed"}},"summary":"Revoke a customer offer invitation and all open portal sessions","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/review":{"post":{"operationId":"reviewProjectCrmOpportunityProposal","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmProposalReview"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmProposal"}}},"description":"Reviewed proposal"},"401":{"description":"Authentication required"},"403":{"description":"CRM admin or independent-review rule denied"},"404":{"description":"Scoped proposal not found"},"409":{"description":"Stale review or proposal state"},"422":{"description":"Validation failed"}},"summary":"Approve or reject a submitted proposal for internal review","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/review_preview":{"get":{"operationId":"listProjectCrmOpportunityProposalReviewPreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmProposalReviewPreview"}}},"description":"Proposal and review token"},"401":{"description":"Authentication required"},"403":{"description":"CRM admin or independent-review rule denied"},"404":{"description":"Scoped proposal not found"},"409":{"description":"Proposal is not submitted"}},"summary":"Review the current submitted proposal and obtain a fresh review token","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/submit":{"post":{"operationId":"submitProjectCrmOpportunityProposal","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmProposal"}}},"description":"Submitted proposal"},"401":{"description":"Authentication required"},"403":{"description":"CRM edit or author denied"},"404":{"description":"Scoped proposal not found"},"409":{"description":"Revision is not the current scoped draft"}},"summary":"Submit the current draft for internal review","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/proposals/{proposal_id}/withdraw":{"post":{"operationId":"withdrawProjectCrmOpportunityProposal","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"proposal_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmProposalWithdrawal"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmProposal"}}},"description":"Withdrawn proposal"},"401":{"description":"Authentication required"},"403":{"description":"CRM admin denied"},"404":{"description":"Scoped proposal not found"},"409":{"description":"Revision is no longer the current draft or submitted proposal"},"422":{"description":"Validation failed"}},"summary":"Withdraw the current draft or submitted proposal with a retained reason","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/restore":{"post":{"description":"Clears archived_at so the opportunity returns to lists, summaries, forecasts and cohorts. Project CRM edit permission and crm:write, as for DELETE. Repeating the request, or restoring an active record, is a no-op. Records a restored history entry.","operationId":"restoreProjectCrmOpportunity","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Restored"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"}},"summary":"Restore archived CRM opportunity","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/opportunities/{id}/source_history":{"get":{"description":"Backfilled legacy opportunities begin with an unknown baseline; corrections preserve before/after values and staff reason. Requires current CRM scope access.","operationId":"listProjectCrmOpportunitySourceHistory","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"events":{"items":{"additionalProperties":false,"properties":{"action":{"enum":["baseline","created","corrected"],"type":"string"},"actor_id":{"minimum":1,"type":["integer","null"]},"from":{"additionalProperties":false,"properties":{"category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"detail":{"maxLength":200,"type":["string","null"]}},"required":["category","detail"],"type":["object","null"]},"id":{"minimum":1,"type":"integer"},"reason":{"maxLength":1000,"type":["string","null"]},"recorded_at":{"format":"date-time","type":"string"},"to":{"additionalProperties":false,"properties":{"category":{"enum":["unknown","repeat_customer","referral","invitation","public_bid","website","outbound","partner","other"],"type":"string"},"detail":{"maxLength":200,"type":["string","null"]}},"required":["category","detail"],"type":"object"}},"required":["id","action","actor_id","recorded_at","reason","from","to"],"type":"object"},"type":"array"},"page":{"minimum":1,"type":"integer"},"per_page":{"maximum":100,"minimum":1,"type":"integer"},"total":{"minimum":0,"type":"integer"}},"required":["events","total","page","per_page"],"type":"object"}}},"description":"Opportunity source event page"},"401":{"description":"Authentication required"},"403":{"description":"Current CRM access denied"},"404":{"description":"Opportunity not found in current scope"}},"summary":"Paginated staff-attributed opportunity source history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/crm/service_cases":{"get":{"description":"Requires current project CRM view and crm:read token scope. List entries omit detailed event history; read an individual case for its events.","operationId":"listProjectCrmServiceCases","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"status","schema":{"enum":["open","triaged","in_progress","waiting_customer","resolved","closed"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmServiceCase"},"type":"array"}}},"description":"Page of case summaries with Total, Per-Page and Link headers"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Project not found"}},"summary":"List private project customer service cases","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"description":"Requires project CRM create and crm:write token scope. Requester contact, location and assignee are scoped to the project. Does not send a customer message.","operationId":"createProjectCrmServiceCase","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"service_case":{"additionalProperties":false,"properties":{"assigned_to_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"contact_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"description":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}]},"location_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"priority":{"enum":["low","normal","high","urgent"],"type":"string"},"report_evidence":{"maxLength":10000,"minLength":1,"type":"string"},"report_source":{"enum":["phone","email","in_person","document","portal","other"],"type":"string"},"reported_at":{"format":"date-time","type":"string"},"request_key":{"format":"uuid","type":"string"},"response_due_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"title":{"maxLength":200,"minLength":1,"type":"string"}},"required":["title","reported_at","report_source","report_evidence"],"type":"object"}},"required":["service_case"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmServiceCase"}}},"description":"Created case and intake event"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"422":{"description":"Invalid request"}},"summary":"Record a staff-reported customer service request","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/service_cases/response_queue":{"get":{"description":"Requires project CRM view and crm:read. Derived overdue and due-soon states use one server capture time. This queue does not send notifications or establish a contractual SLA.","operationId":"listProjectCrmServiceCasesResponseQueue","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"filter","schema":{"enum":["mine","unassigned","response_overdue","response_due_soon"],"type":"string"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmServiceResponseQueue"}}},"description":"Private queue and totals with pagination headers"},"401":{"description":"Authentication required"},"403":{"description":"Access denied"},"404":{"description":"Case or visible item not found"}},"summary":"Read the permission-scoped staff first-response worklist","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/crm/service_cases/{id}":{"get":{"operationId":"getProjectCrmServiceCase","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmServiceCase"}}},"description":"Case with staff history"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Case not found"}},"summary":"Read a private service case and event history","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"patch":{"description":"Requires project CRM edit and crm:write token scope. Customer response and warranty decisions require explicit evidence; status transitions do not change field-tool records.","operationId":"updateProjectCrmServiceCase","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"service_case":{"additionalProperties":false,"properties":{"assigned_to_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"note":{"maxLength":10000,"minLength":1,"type":"string"},"priority":{"enum":["low","normal","high","urgent"],"type":"string"},"response_due_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"response_note":{"maxLength":10000,"minLength":1,"type":"string"},"status":{"enum":["open","triaged","in_progress","waiting_customer","resolved","closed"],"type":"string"},"version":{"minimum":1,"type":"integer"},"warranty_coverage_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"warranty_decision":{"enum":["pending","covered","not_covered"],"type":"string"},"warranty_rationale":{"maxLength":10000,"minLength":1,"type":"string"},"warranty_review_reference":{"maxLength":500,"minLength":1,"type":"string"}},"required":["version"],"type":"object"}},"required":["service_case"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmServiceCase"}}},"description":"Updated case with retained event"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Case not found"},"409":{"description":"Stale version or invalid transition"},"422":{"description":"Invalid update"}},"summary":"Record a version-checked service case update","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/service_cases/{id}/asset_links":{"get":{"operationId":"listProjectCrmServiceCaseAssetLinks","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmCaseAssetLink"},"type":"array"}}},"description":"Active asset associations"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Project, case, or asset not found"}},"summary":"List active installed assets linked to a service case","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"post":{"description":"Requires CRM edit and crm:write. Does not make a warranty eligibility decision or alter the asset.","operationId":"createProjectCrmServiceCaseAssetLink","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"asset_link":{"additionalProperties":false,"properties":{"asset_id":{"minimum":1,"type":"integer"},"request_key":{"format":"uuid","type":"string"}},"required":["asset_id"],"type":"object"}},"required":["asset_link"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmCaseAssetLink"}}},"description":"Recorded association"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Project, case, or asset not found"},"409":{"description":"Duplicate, request-key, or link-limit conflict"}},"summary":"Link a same-project active installed asset to a service case","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/service_cases/{id}/asset_links/{link_id}":{"delete":{"operationId":"deleteProjectCrmServiceCaseAssetLink","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"link_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"note":{"maxLength":10000,"minLength":1,"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmAssetLinkRevocation"}}},"description":"Retained revocation"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Project, case, or asset not found"}},"summary":"Remove a case-to-asset association and retain history","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/service_cases/{id}/work_links":{"get":{"description":"Requires crm:read and current item-level visibility in Punch List, Observations or Tasks. Scoped tokens also need the corresponding target tool read scope. Hidden or deleted links are omitted entirely, including their IDs and counts.","operationId":"listProjectCrmServiceCaseWorkLinks","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmServiceWorkLink"},"type":"array"}}},"description":"Visible active links only"},"401":{"description":"Authentication required"},"403":{"description":"Access denied"},"404":{"description":"Case or visible item not found"}},"summary":"List currently visible field work linked to a service case","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false},"post":{"description":"Requires CRM edit and crm:write plus target tool read and item-level visibility. Link evidence is retained separately from the general case event history to prevent hidden-link disclosure.","operationId":"createProjectCrmServiceCaseWorkLink","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"work_link":{"additionalProperties":false,"properties":{"kind":{"enum":["punch_item","observation","task_item"],"type":"string"},"request_key":{"format":"uuid","type":"string"},"target_id":{"minimum":1,"type":"integer"}},"required":["kind","target_id"],"type":"object"}},"required":["work_link"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmServiceWorkLink"}}},"description":"Linked visible field item"},"401":{"description":"Authentication required"},"403":{"description":"Access denied"},"404":{"description":"Case or visible item not found"},"409":{"description":"Duplicate, limit, or request-key conflict"}},"summary":"Link one currently visible field work item to a service case","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/service_cases/{id}/work_links/{link_id}":{"delete":{"description":"Requires CRM edit, crm:write, current target item visibility and target tool read scope. Revocation retains private link evidence without changing general case history.","operationId":"deleteProjectCrmServiceCaseWorkLink","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"link_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"note":{"maxLength":1000,"minLength":1,"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"minimum":1,"type":"integer"},"revoked_at":{"format":"date-time","type":"string"},"revoked_by_id":{"minimum":1,"type":"integer"}},"required":["id","revoked_at","revoked_by_id"],"type":"object"}}},"description":"Revoked association"},"401":{"description":"Authentication required"},"403":{"description":"Access denied"},"404":{"description":"Case or visible item not found"}},"summary":"Remove a currently visible service-to-field-work association","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/summary":{"get":{"operationId":"listProjectCrmSummary","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"contacts":{"type":"integer"},"currency":{"const":"USD"},"openAmount":{"type":"string"},"openOpportunities":{"type":"integer"},"overdueActivities":{"type":"integer"},"weightedAmount":{"type":"string"},"wonOpportunities":{"type":"integer"}},"required":["contacts","openOpportunities","wonOpportunities","overdueActivities","openAmount","weightedAmount","currency"],"type":"object"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"CRM permission, token scope, tenant or tool enablement denied"},"404":{"description":"Scoped resource not found"},"422":{"description":"Validation failed"}},"summary":"CRM totals and exact USD pipeline forecast","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/warranty_coverages":{"get":{"description":"Requires project CRM view and crm:read token scope. Dates do not automatically decide eligibility.","operationId":"listProjectCrmWarrantyCoverages","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"location_id","schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/crm_CrmWarrantyCoverage"},"type":"array"}}},"description":"Page of coverage records with Total, Per-Page and Link headers"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"}},"summary":"List reviewed project warranty coverage evidence","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":true},"post":{"description":"Requires project CRM create and crm:write token scope. Records a source and exact term without inferring from project completion.","operationId":"createProjectCrmWarrantyCoverage","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"warranty_coverage":{"additionalProperties":false,"properties":{"component_name":{"maxLength":200,"minLength":1,"type":"string"},"ends_on":{"format":"date","type":"string"},"evidence_note":{"maxLength":10000,"minLength":1,"type":"string"},"issuer_name":{"maxLength":200,"minLength":1,"type":"string"},"location_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}]},"request_key":{"format":"uuid","type":"string"},"source_reference":{"maxLength":500,"minLength":1,"type":"string"},"starts_on":{"format":"date","type":"string"}},"required":["component_name","starts_on","ends_on","issuer_name","source_reference","evidence_note"],"type":"object"}},"required":["warranty_coverage"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmWarrantyCoverage"}}},"description":"Recorded coverage evidence"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"422":{"description":"Invalid evidence"}},"summary":"Record reviewed project warranty coverage evidence","tags":["crm"],"x-os-idempotent":true,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/crm/warranty_coverages/{id}":{"get":{"description":"Requires current project CRM view and crm:read token scope.","operationId":"getProjectCrmWarrantyCoverage","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm_CrmWarrantyCoverage"}}},"description":"Exact reviewed coverage source"},"401":{"description":"Authentication required"},"403":{"description":"Project CRM denied"},"404":{"description":"Coverage not found"}},"summary":"Read one private project warranty coverage source","tags":["crm"],"x-os-idempotent":false,"x-os-module":"crm","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/daily_construction_report_logs":{"get":{"operationId":"listProjectDailyConstructionReportLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[status]","schema":{"type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"type":"integer"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"apprentice_hours":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"first_year_hours":{"type":"string"},"foreman_hours":{"type":"string"},"id":{"type":"integer"},"journeyman_hours":{"type":"string"},"local_city_hours":{"type":"string"},"local_county_hours":{"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"minority_hours":{"type":"string"},"notes":{"type":"string"},"number_of_apprentice_workers":{"type":"integer"},"number_of_foreman_workers":{"type":"integer"},"number_of_journeyman_workers":{"type":"integer"},"number_of_other_workers":{"type":"integer"},"other_hours":{"type":"string"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"veteran_hours":{"type":"string"},"women_hours":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Daily Construction Report Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectDailyConstructionReportLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"daily_construction_report_log":{"allOf":[{"properties":{"apprentice_hours":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"first_year_hours":{"type":"string"},"foreman_hours":{"type":"string"},"journeyman_hours":{"type":"string"},"local_city_hours":{"type":"string"},"local_county_hours":{"type":"string"},"location_id":{"type":"integer"},"minority_hours":{"type":"string"},"notes":{"type":"string"},"number_of_apprentice_workers":{"type":"integer"},"number_of_foreman_workers":{"type":"integer"},"number_of_journeyman_workers":{"type":"integer"},"number_of_other_workers":{"type":"integer"},"other_hours":{"type":"string"},"trade_id":{"type":"integer"},"vendor_id":{"type":"integer"},"veteran_hours":{"type":"string"},"women_hours":{"type":"string"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"required":["vendor_id","trade_id"],"type":"object"}},"required":["daily_construction_report_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"daily_construction_report_log":{"properties":{"apprentice_hours":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"first_year_hours":{"type":"string"},"foreman_hours":{"type":"string"},"journeyman_hours":{"type":"string"},"local_city_hours":{"type":"string"},"local_county_hours":{"type":"string"},"location_id":{"type":"integer"},"minority_hours":{"type":"string"},"notes":{"type":"string"},"number_of_apprentice_workers":{"type":"integer"},"number_of_foreman_workers":{"type":"integer"},"number_of_journeyman_workers":{"type":"integer"},"number_of_other_workers":{"type":"integer"},"other_hours":{"type":"string"},"trade_id":{"type":"integer"},"vendor_id":{"type":"integer"},"veteran_hours":{"type":"string"},"women_hours":{"type":"string"}},"required":["vendor_id","trade_id"],"type":"object"}},"required":["daily_construction_report_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"apprentice_hours":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"first_year_hours":{"type":"string"},"foreman_hours":{"type":"string"},"id":{"type":"integer"},"journeyman_hours":{"type":"string"},"local_city_hours":{"type":"string"},"local_county_hours":{"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"minority_hours":{"type":"string"},"notes":{"type":"string"},"number_of_apprentice_workers":{"type":"integer"},"number_of_foreman_workers":{"type":"integer"},"number_of_journeyman_workers":{"type":"integer"},"number_of_other_workers":{"type":"integer"},"other_hours":{"type":"string"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"veteran_hours":{"type":"string"},"women_hours":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Daily Construction Report Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/daily_construction_report_logs/vendor_options":{"get":{"operationId":"listProjectDailyConstructionReportLogsVendorOptions","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"type":"array"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Daily Construction Report Logs Vendor Options","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/daily_construction_report_logs/{id}":{"delete":{"operationId":"deleteProjectDailyConstructionReportLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Daily Construction Report Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectDailyConstructionReportLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"apprentice_hours":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"first_year_hours":{"type":"string"},"foreman_hours":{"type":"string"},"id":{"type":"integer"},"journeyman_hours":{"type":"string"},"local_city_hours":{"type":"string"},"local_county_hours":{"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"minority_hours":{"type":"string"},"notes":{"type":"string"},"number_of_apprentice_workers":{"type":"integer"},"number_of_foreman_workers":{"type":"integer"},"number_of_journeyman_workers":{"type":"integer"},"number_of_other_workers":{"type":"integer"},"other_hours":{"type":"string"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"veteran_hours":{"type":"string"},"women_hours":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Daily Construction Report Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectDailyConstructionReportLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"daily_construction_report_log":{"allOf":[{"properties":{"apprentice_hours":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"first_year_hours":{"type":"string"},"foreman_hours":{"type":"string"},"journeyman_hours":{"type":"string"},"local_city_hours":{"type":"string"},"local_county_hours":{"type":"string"},"location_id":{"type":"integer"},"minority_hours":{"type":"string"},"notes":{"type":"string"},"number_of_apprentice_workers":{"type":"integer"},"number_of_foreman_workers":{"type":"integer"},"number_of_journeyman_workers":{"type":"integer"},"number_of_other_workers":{"type":"integer"},"other_hours":{"type":"string"},"status":{"type":"string"},"trade_id":{"type":"integer"},"vendor_id":{"type":"integer"},"veteran_hours":{"type":"string"},"women_hours":{"type":"string"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["daily_construction_report_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"daily_construction_report_log":{"properties":{"apprentice_hours":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"first_year_hours":{"type":"string"},"foreman_hours":{"type":"string"},"journeyman_hours":{"type":"string"},"local_city_hours":{"type":"string"},"local_county_hours":{"type":"string"},"location_id":{"type":"integer"},"minority_hours":{"type":"string"},"notes":{"type":"string"},"number_of_apprentice_workers":{"type":"integer"},"number_of_foreman_workers":{"type":"integer"},"number_of_journeyman_workers":{"type":"integer"},"number_of_other_workers":{"type":"integer"},"other_hours":{"type":"string"},"status":{"type":"string"},"trade_id":{"type":"integer"},"vendor_id":{"type":"integer"},"veteran_hours":{"type":"string"},"women_hours":{"type":"string"}},"type":"object"}},"required":["daily_construction_report_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"apprentice_hours":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"first_year_hours":{"type":"string"},"foreman_hours":{"type":"string"},"id":{"type":"integer"},"journeyman_hours":{"type":"string"},"local_city_hours":{"type":"string"},"local_county_hours":{"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"minority_hours":{"type":"string"},"notes":{"type":"string"},"number_of_apprentice_workers":{"type":"integer"},"number_of_foreman_workers":{"type":"integer"},"number_of_journeyman_workers":{"type":"integer"},"number_of_other_workers":{"type":"integer"},"other_hours":{"type":"string"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"veteran_hours":{"type":"string"},"women_hours":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Daily Construction Report Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/daily_log_headers":{"get":{"operationId":"listProjectDailyLogHeaders","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"log_date","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"completable":{"type":"boolean"},"completed":{"type":"boolean"},"completed_at":{"format":"date-time","type":"string"},"completed_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"distributable":{"type":"boolean"},"distributed":{"type":"boolean"},"distributed_at":{"format":"date-time","type":"string"},"distributed_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"log_date":{"format":"date","type":"string"},"log_datetime":{"format":"date-time","type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Get the Daily Log Header via date or id","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectDailyLogHeaders","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"log_date","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"app_name","required":false,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"daily_log_header":{"properties":{"completed":{"type":"boolean"},"distributed":{"type":"boolean"}},"required":["completed","distributed"],"type":"object"}},"required":["daily_log_header"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"completable":{"type":"boolean"},"completed":{"type":"boolean"},"completed_at":{"format":"date-time","type":"string"},"completed_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"distributable":{"type":"boolean"},"distributed":{"type":"boolean"},"distributed_at":{"format":"date-time","type":"string"},"distributed_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"log_date":{"format":"date","type":"string"},"log_datetime":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update the state of a Daily Log Header","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/daily_log_headers/index":{"get":{"operationId":"listProjectDailyLogHeadersIndex","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"start_date","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"completable":{"type":"boolean"},"completed":{"type":"boolean"},"completed_at":{"format":"date-time","type":"string"},"completed_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"distributable":{"type":"boolean"},"distributed":{"type":"boolean"},"distributed_at":{"format":"date-time","type":"string"},"distributed_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"log_date":{"format":"date","type":"string"},"log_datetime":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Get Daily Log Headers for the Project","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/daily_logs/bulk_updates/bulk_update":{"patch":{"operationId":"updateProjectDailyLogsBulkUpdatesBulkUpdate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"updates":{"properties":{"accident_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"call_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"daily_construction_report_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"delay_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"delivery_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"dumpster_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"equipment_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"inspection_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"manpower_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"notes_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"plan_revision_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"productivity_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"quantity_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"safety_violation_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"timecard_entry":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"visitor_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"waste_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"work_log":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"}},"type":"object"}},"required":["updates"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"accident_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"call_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"daily_construction_report_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"delay_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"delivery_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"dumpster_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"equipment_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"inspection_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"manpower_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"notes_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"plan_revision_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"productivity_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"quantity_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"safety_violation_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"timecard_entry":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"visitor_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"waste_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"},"work_log":{"items":{"properties":{"error":{"type":"string"},"id":{"type":"integer"},"status":{"enum":["pending","approved","rejected"],"type":"string"},"success":{"type":"boolean"}},"required":["id","status","success"],"type":"object"},"type":"array"}},"type":"object"},"type":"array"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Bulk Updates for Daily Logs","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/daily_logs/clones":{"post":{"operationId":"createProjectDailyLogsClone","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"header","name":"Idempotency-Token","schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"daily_log_segment_id":{"nullable":true,"type":"integer"},"from_date":{"format":"date","type":"string"},"log_types":{"items":{"enum":["accident_log","call_log","delay_log","delivery_log","dumpster_log","equipment_log","inspection_log","manpower_log","daily_construction_report_log","notes_log","plan_revision_log","productivity_log","quantity_log","safety_violation_log","timecard_entry","visitor_log","waste_log","work_log"],"type":"string"},"type":"array"},"to_date":{"format":"date","type":"string"}},"required":["from_date","to_date","log_types"],"type":"object"}}},"required":true},"responses":{"200":{},"201":{"content":{"application/json":{"schema":{"properties":{"notes_log":{"properties":{"attachments":{"items":{"type":"object"},"type":"array"},"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"number"},"login":{"type":"string"},"name":{"nullable":true,"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"type":"object"},"daily_log_header_id":{"type":"number"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"nullable":true,"type":"string"},"id":{"type":"number"},"is_issue_day":{"nullable":true,"type":"string"},"location":{"nullable":true,"type":"string"},"permissions":{"properties":{"can_delete":{"nullable":true,"type":"boolean"},"can_update":{"nullable":true,"type":"boolean"}},"type":"object"},"position":{"type":"number"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Clones Daily Logs from one Date to another Date","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/daily_logs/count":{"get":{"deprecated":true,"operationId":"listProjectDailyLogsCount","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[status]","schema":{"type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"count":{"type":"integer"},"module_name":{"type":"string"},"position":{"type":"integer"}},"type":"object"},"type":"array"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Counts of Daily Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/daily_logs/delay_log_types":{"get":{"operationId":"listProjectDailyLogsDelayLogTypes","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"filters[visible]","required":false,"schema":{"default":"true","enum":["true","false","false...true"],"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"display_name":{"type":"string"},"english_or_display_name":{"type":"string"},"id":{"type":"integer"},"translation_key":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"visible":{"type":"boolean"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Delay Log Types","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectDailyLogsDelayLogType","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"delay_log_type":{"properties":{"display_name":{"type":"string"},"visible":{"type":"boolean"}},"required":["display_name"],"type":"object"}},"required":["delay_log_type"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"display_name":{"type":"string"},"english_or_display_name":{"type":"string"},"id":{"type":"integer"},"translation_key":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"visible":{"type":"boolean"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create new Delay Log Type","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/daily_logs/delay_log_types/{id}":{"patch":{"operationId":"updateProjectDailyLogsDelayLogType","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"delay_log_type":{"properties":{"visible":{"type":"boolean"}},"type":"object"}},"required":["delay_log_type"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"display_name":{"type":"string"},"english_or_display_name":{"type":"string"},"id":{"type":"integer"},"translation_key":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"visible":{"type":"boolean"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update a Delay Log Type","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/daily_logs/weather_conditions":{"get":{"operationId":"listProjectDailyLogsWeatherConditions","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"calamity":{"items":{"properties":{"key":{"enum":["Earthquake","Fire","Flash Flood","Landslide","Tornado","Hurricane","Snow","Other"],"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"ground":{"items":{"properties":{"key":{"enum":["Dry","Wet/Muddy","Flooded","Snow","Frozen","-----","High Tide","Low Tide","Heavy Surf/Swell"],"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"sky":{"items":{"properties":{"key":{"enum":["Clear","Cloudy","Overcast","Fog","Mist","Rain","Snow","Ice/Sleet/Hail","Smoke"],"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"temperature":{"items":{"properties":{"key":{"enum":["Very Hot","Hot","Mild","Cold","Very Cold"],"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"wind":{"items":{"properties":{"key":{"enum":["Calm","Light Wind","High Wind"],"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Accepted Weather Conditions","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/daily_logs/{log_type}/{id}/attachments":{"post":{"operationId":"createProjectDailyLogAttachment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"log_type","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Upload daily log attachment","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/dashboards":{"get":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"listProjectDashboards","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_at":{"type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"type":"string"},"widgets":{"type":"array"}},"required":["id","name","widgets","created_by_id","created_at","updated_at"],"type":"object"},"type":"array"}}}}},"summary":"List dashboards for a project","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false},"post":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"createProjectDashboard","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reporting_Dashboard"}}}}},"summary":"Create a dashboard","tags":["reporting"],"x-os-idempotent":true,"x-os-module":"reporting","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/dashboards/{id}":{"delete":{"operationId":"deleteProjectDashboard","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete dashboard","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false},"get":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"getProjectDashboard","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reporting_ComputedDashboard"}}}}},"summary":"Get a computed dashboard (widget payloads)","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false},"patch":{"operationId":"updateProjectDashboard","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Update dashboard","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/dashboards/{id}/widgets":{"post":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"createProjectDashboardWidget","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reporting_Dashboard"}}}}},"summary":"Append a widget to a dashboard","tags":["reporting"],"x-os-idempotent":true,"x-os-module":"reporting","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/data_exports":{"get":{"operationId":"listProjectDataExports","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"completed_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"file_url":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"requested_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"requested_by_id":{"type":"integer"},"status":{"enum":["queued","processing","complete","failed"],"type":"string"},"tool_scope":{"items":{"type":"string"},"type":"array"},"translated_status":{"type":"string"}},"required":["id","name","tool_scope","status","translated_status","requested_by_id","created_at"],"type":"object"},"type":"array"}}}}},"summary":"List project data exports","tags":["project_archive"],"x-os-idempotent":false,"x-os-module":"project_archive","x-os-paginated":false},"post":{"operationId":"createProjectDataExport","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"completed_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"file_url":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"requested_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"requested_by_id":{"type":"integer"},"status":{"enum":["queued","processing","complete","failed"],"type":"string"},"tool_scope":{"items":{"type":"string"},"type":"array"},"translated_status":{"type":"string"}},"required":["id","name","tool_scope","status","translated_status","requested_by_id","created_at"],"type":"object"}}}}},"summary":"Create (generate) a data export","tags":["project_archive"],"x-os-idempotent":true,"x-os-module":"project_archive","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/data_exports/{id}":{"delete":{"operationId":"deleteProjectDataExport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete data export","tags":["project_archive"],"x-os-idempotent":false,"x-os-module":"project_archive","x-os-paginated":false},"get":{"operationId":"getProjectDataExport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"completed_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"file_url":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"requested_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"requested_by_id":{"type":"integer"},"status":{"enum":["queued","processing","complete","failed"],"type":"string"},"tool_scope":{"items":{"type":"string"},"type":"array"},"translated_status":{"type":"string"}},"required":["id","name","tool_scope","status","translated_status","requested_by_id","created_at"],"type":"object"}}}}},"summary":"Show a data export","tags":["project_archive"],"x-os-idempotent":false,"x-os-module":"project_archive","x-os-paginated":false},"post":{"operationId":"createProjectDataExportPost","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create data export","tags":["project_archive"],"x-os-idempotent":false,"x-os-module":"project_archive","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/data_exports/{id}/download":{"get":{"operationId":"listProjectDataExportDownload","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"format","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"File download."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Download data export","tags":["project_archive"],"x-os-idempotent":false,"x-os-module":"project_archive","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/delay_logs":{"get":{"operationId":"listProjectDelayLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[location_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delay_type":{"type":"string"},"duration":{"format":"float","type":"number"},"end_time":{"type":"string"},"end_time_hour":{"type":"number"},"end_time_minute":{"type":"number"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"start_time_hour":{"type":"number"},"start_time_minute":{"type":"number"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Delay Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectDelayLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"delay_log":{"properties":{"comments":{"type":"string"},"cost_code_id":{"nullable":true,"type":"integer"},"daily_log_header_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delay_type":{"type":"string"},"end_time":{"type":"string"},"end_time_hour":{"type":"number"},"end_time_minute":{"type":"number"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"start_time":{"type":"string"},"start_time_hour":{"type":"number"},"start_time_minute":{"type":"number"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["delay_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"delay_log":{"properties":{"comments":{"type":"string"},"cost_code_id":{"nullable":true,"type":"integer"},"daily_log_header_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delay_type":{"type":"string"},"end_time":{"type":"string"},"end_time_hour":{"type":"number"},"end_time_minute":{"type":"number"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"start_time":{"type":"string"},"start_time_hour":{"type":"number"},"start_time_minute":{"type":"number"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["delay_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delay_type":{"type":"string"},"duration":{"format":"float","type":"number"},"end_time":{"type":"string"},"end_time_hour":{"type":"number"},"end_time_minute":{"type":"number"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"start_time_hour":{"type":"number"},"start_time_minute":{"type":"number"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Delay Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/delay_logs/{id}":{"delete":{"operationId":"deleteProjectDelayLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Delay Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectDelayLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delay_type":{"type":"string"},"duration":{"format":"float","type":"number"},"end_time":{"type":"string"},"end_time_hour":{"type":"number"},"end_time_minute":{"type":"number"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"start_time_hour":{"type":"number"},"start_time_minute":{"type":"number"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Delay Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectDelayLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"delay_log":{"properties":{"comments":{"type":"string"},"cost_code_id":{"nullable":true,"type":"integer"},"daily_log_header_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delay_type":{"type":"string"},"end_time":{"type":"string"},"end_time_hour":{"type":"number"},"end_time_minute":{"type":"number"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"start_time":{"type":"string"},"start_time_hour":{"type":"number"},"start_time_minute":{"type":"number"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["delay_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"delay_log":{"properties":{"comments":{"type":"string"},"cost_code_id":{"nullable":true,"type":"integer"},"daily_log_header_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delay_type":{"type":"string"},"end_time":{"type":"string"},"end_time_hour":{"type":"number"},"end_time_minute":{"type":"number"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"start_time":{"type":"string"},"start_time_hour":{"type":"number"},"start_time_minute":{"type":"number"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["delay_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delay_type":{"type":"string"},"duration":{"format":"float","type":"number"},"end_time":{"type":"string"},"end_time_hour":{"type":"number"},"end_time_minute":{"type":"number"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"start_time_hour":{"type":"number"},"start_time_minute":{"type":"number"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Delay Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/delivery_logs":{"get":{"operationId":"listProjectDeliveryLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[status]","schema":{"type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"contents":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delivery_from":{"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"tracking_number":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Delivery Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectDeliveryLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"delivery_log":{"allOf":[{"properties":{"comments":{"type":"string"},"contents":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delivery_from":{"type":"string"},"location_id":{"type":"integer"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"tracking_number":{"type":"string"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"required":["time_hour","time_minute"],"type":"object"}},"required":["delivery_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"delivery_log":{"properties":{"comments":{"type":"string"},"contents":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delivery_from":{"type":"string"},"location_id":{"type":"integer"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"tracking_number":{"type":"string"},"vendor_id":{"type":"integer"}},"required":["time_hour","time_minute"],"type":"object"}},"required":["delivery_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"contents":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delivery_from":{"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"tracking_number":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Delivery Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/delivery_logs/{id}":{"delete":{"operationId":"deleteProjectDeliveryLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Delivery Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectDeliveryLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"contents":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delivery_from":{"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"tracking_number":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Delivery Log","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectDeliveryLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"delivery_log":{"allOf":[{"properties":{"comments":{"type":"string"},"contents":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delivery_from":{"type":"string"},"location_id":{"type":"integer"},"status":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"tracking_number":{"type":"string"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["delivery_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"delivery_log":{"properties":{"comments":{"type":"string"},"contents":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delivery_from":{"type":"string"},"location_id":{"type":"integer"},"status":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"tracking_number":{"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["delivery_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"contents":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"delivery_from":{"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"tracking_number":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Delivery Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/direct_costs":{"get":{"operationId":"listProjectDirectCosts","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[origin_id]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[invoice_number]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[payment_date]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[received_date]","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"amount":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"direct_cost_date":{"format":"date","type":"string"},"direct_cost_type":{"enum":["invoice","expense","payroll","subcontractor_invoice"],"type":"string"},"employee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"tax_breakdown":{"properties":{"grand_total":{"type":"string"},"subtotal":{"type":"string"},"tax_details":{"items":{"properties":{"amount":{"type":"string"},"selected_tax_code_id":{"type":"integer"},"selected_tax_code_name":{"type":"string"},"tax_code_id":{"type":"integer"},"tax_code_name":{"type":"string"},"tax_code_rate":{"type":"string"},"taxable_amount":{"type":"string"}},"type":"object"},"type":"array"},"tax_total":{"type":"string"}},"type":"object"},"terms":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"type":"string"},"vendor_id":{"type":"integer"},"vendor_name":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Direct Cost Items","tags":["direct_costs"],"x-os-idempotent":false,"x-os-module":"direct_costs","x-os-paginated":true},"post":{"operationId":"createProjectDirectCost","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"item":{"properties":{"direct_cost_date":{"format":"date","type":"string"},"direct_cost_type":{"enum":["invoice","expense","payroll","subcontractor_invoice"],"type":"string"},"employee_id":{"type":"integer"},"invoice_number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"terms":{"type":"string"},"vendor_id":{"type":"integer"}},"required":["invoice_number","vendor_id","direct_cost_type"],"title":"Direct Cost Item","type":"object"}},"required":["item"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"direct_cost_date":{"format":"date","type":"string"},"direct_cost_type":{"enum":["invoice","expense","payroll","subcontractor_invoice"],"type":"string"},"employee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"line_items_count":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"tax_breakdown":{"properties":{"grand_total":{"type":"string"},"subtotal":{"type":"string"},"tax_details":{"items":{"properties":{"amount":{"type":"string"},"selected_tax_code_id":{"type":"integer"},"selected_tax_code_name":{"type":"string"},"tax_code_id":{"type":"integer"},"tax_code_name":{"type":"string"},"tax_code_rate":{"type":"string"},"taxable_amount":{"type":"string"}},"type":"object"},"type":"array"},"tax_total":{"type":"string"}},"type":"object"},"terms":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"vendor_id":{"type":"integer"},"vendor_name":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Direct Cost Item","tags":["direct_costs"],"x-os-idempotent":true,"x-os-module":"direct_costs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/direct_costs/line_items":{"get":{"operationId":"listProjectDirectCostsLineItems","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[direct_cost_id]","required":false,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[cost_code_id]","schema":{"type":"string"}},{"in":"query","name":"filters[line_item_type_id]","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"amount":{"type":"string"},"cost_code":{"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"funding_rule_id":{"nullable":true,"type":"integer"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"type":"object"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"sub_job_id":{"nullable":true,"type":"integer"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List All Direct Cost Line Items","tags":["direct_costs"],"x-os-idempotent":false,"x-os-module":"direct_costs","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/direct_costs/line_items/sync":{"patch":{"description":"Create or update up to 100 direct cost line items in one request. Items with `id` update that record; items without `id` create one under `direct_cost_id` (required on every item). Nothing is deleted. Each item runs through the same checks as the single-record routes; failures are listed in `errors` and do not roll back other items.","operationId":"updateProjectDirectCostsLineItemsSync","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"updates":{"items":{"properties":{"amount":{"format":"float","type":"number"},"cost_code_id":{"type":"integer"},"direct_cost_id":{"type":"integer"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"funding_rule_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"line_item_type_id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"format":"float","type":"number"},"tax_code_id":{"type":"integer"},"unit_cost":{"format":"float","type":"number"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"},"wbs_code_id":{"type":"integer"}},"title":"LineItem","type":"object"},"type":"array"}},"required":["updates"],"title":"Direct Cost Line Item Sync Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"entities":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"funding_rule_id":{"nullable":true,"type":"integer"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"errors":{"items":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]},"id":{"nullable":true,"type":"integer"},"index":{"description":"Position of the item in `updates`.","type":"integer"},"status":{"type":"integer"}},"required":["index","status","errors"],"type":"object"},"type":"array"}},"required":["entities","errors"],"type":"object"}}},"description":"Saved records and per-item errors."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"More than 100 items."}},"summary":"Sync Direct Cost Line Items","tags":["direct_costs"],"x-os-idempotent":true,"x-os-module":"direct_costs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/direct_costs/sync":{"patch":{"description":"Create or update up to 100 direct costs in one request. Items with `id` update that record; items without `id` create one. Nothing is deleted. Each item runs through the same checks as the single-record routes; failures are listed in `errors` and do not roll back other items.","operationId":"updateProjectDirectCostsSync","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"updates":{"items":{"properties":{"currency_exchange_rate":{"format":"float","type":"number"},"currency_iso_code":{"type":"string"},"direct_cost_date":{"format":"date","type":"string"},"direct_cost_type":{"enum":["invoice","expense","payroll","subcontractor_invoice"],"type":"string"},"employee_id":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"terms":{"type":"string"},"vendor_id":{"type":"integer"}},"title":"Direct Cost Item","type":"object"},"type":"array"}},"required":["updates"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"entities":{"items":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"direct_cost_date":{"format":"date","type":"string"},"direct_cost_type":{"enum":["invoice","expense","payroll","subcontractor_invoice"],"type":"string"},"employee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"line_items_count":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"tax_breakdown":{"properties":{"grand_total":{"type":"string"},"subtotal":{"type":"string"},"tax_details":{"items":{"properties":{"amount":{"type":"string"},"selected_tax_code_id":{"type":"integer"},"selected_tax_code_name":{"type":"string"},"tax_code_id":{"type":"integer"},"tax_code_name":{"type":"string"},"tax_code_rate":{"type":"string"},"taxable_amount":{"type":"string"}},"type":"object"},"type":"array"},"tax_total":{"type":"string"}},"type":"object"},"terms":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"vendor_id":{"type":"integer"},"vendor_name":{"type":"string"}},"type":"object"},"type":"array"},"errors":{"items":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]},"id":{"nullable":true,"type":"integer"},"index":{"description":"Position of the item in `updates`.","type":"integer"},"status":{"type":"integer"}},"required":["index","status","errors"],"type":"object"},"type":"array"}},"required":["entities","errors"],"type":"object"}}},"description":"Saved records and per-item errors."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"More than 100 items."}},"summary":"Sync Direct Cost Items","tags":["direct_costs"],"x-os-idempotent":true,"x-os-module":"direct_costs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/direct_costs/{direct_cost_id}/line_items":{"get":{"operationId":"listProjectDirectCostLineItems","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"direct_cost_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[cost_code_id]","schema":{"type":"string"}},{"in":"query","name":"filters[line_item_type_id]","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"funding_rule_id":{"nullable":true,"type":"integer"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Direct Cost Line Items","tags":["direct_costs"],"x-os-idempotent":false,"x-os-module":"direct_costs","x-os-paginated":true},"post":{"operationId":"createProjectDirectCostLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"direct_cost_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"line_item":{"properties":{"amount":{"format":"float","type":"number"},"cost_code_id":{"type":"integer"},"direct_cost_id":{"type":"integer"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"funding_rule_id":{"nullable":true,"type":"integer"},"line_item_type_id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"format":"float","type":"number"},"tax_code_id":{"type":"integer"},"unit_cost":{"format":"float","type":"number"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"},"wbs_code_id":{"type":"integer"}},"title":"Line Item","type":"object"}},"required":["line_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"funding_rule_id":{"nullable":true,"type":"integer"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Direct Cost Line Item","tags":["direct_costs"],"x-os-idempotent":false,"x-os-module":"direct_costs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/direct_costs/{direct_cost_id}/line_items/{id}":{"delete":{"operationId":"deleteProjectDirectCostLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"direct_cost_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete a Direct Cost Line Item","tags":["direct_costs"],"x-os-idempotent":false,"x-os-module":"direct_costs","x-os-paginated":false},"get":{"operationId":"getProjectDirectCostLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"direct_cost_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"funding_rule_id":{"nullable":true,"type":"integer"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Direct Cost Line Item","tags":["direct_costs"],"x-os-idempotent":false,"x-os-module":"direct_costs","x-os-paginated":false},"patch":{"operationId":"updateProjectDirectCostLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"direct_cost_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"line_item":{"properties":{"amount":{"format":"float","type":"number"},"cost_code_id":{"type":"integer"},"direct_cost_id":{"type":"integer"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"funding_rule_id":{"nullable":true,"type":"integer"},"line_item_type_id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"format":"float","type":"number"},"tax_code_id":{"type":"integer"},"unit_cost":{"format":"float","type":"number"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"},"wbs_code_id":{"type":"integer"}},"title":"Line Item","type":"object"}},"required":["line_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"funding_rule_id":{"nullable":true,"type":"integer"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Direct Cost Line Item","tags":["direct_costs"],"x-os-idempotent":false,"x-os-module":"direct_costs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/direct_costs/{id}":{"delete":{"operationId":"deleteProjectDirectCost","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Direct Cost Item","tags":["direct_costs"],"x-os-idempotent":true,"x-os-module":"direct_costs","x-os-paginated":false},"get":{"operationId":"getProjectDirectCost","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"direct_cost_date":{"format":"date","type":"string"},"direct_cost_type":{"enum":["invoice","expense","payroll","subcontractor_invoice"],"type":"string"},"employee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"line_items_count":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"tax_breakdown":{"properties":{"grand_total":{"type":"string"},"subtotal":{"type":"string"},"tax_details":{"items":{"properties":{"amount":{"type":"string"},"selected_tax_code_id":{"type":"integer"},"selected_tax_code_name":{"type":"string"},"tax_code_id":{"type":"integer"},"tax_code_name":{"type":"string"},"tax_code_rate":{"type":"string"},"taxable_amount":{"type":"string"}},"type":"object"},"type":"array"},"tax_total":{"type":"string"}},"type":"object"},"terms":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"vendor_id":{"type":"integer"},"vendor_name":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Direct Cost Item","tags":["direct_costs"],"x-os-idempotent":false,"x-os-module":"direct_costs","x-os-paginated":false},"patch":{"operationId":"updateProjectDirectCost","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"item":{"properties":{"direct_cost_date":{"format":"date","type":"string"},"employee_id":{"type":"integer"},"invoice_number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"terms":{"type":"string"},"vendor_id":{"type":"integer"}},"title":"Direct Cost Item","type":"object"}},"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"direct_cost_date":{"format":"date","type":"string"},"direct_cost_type":{"enum":["invoice","expense","payroll","subcontractor_invoice"],"type":"string"},"employee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"line_items_count":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"tax_breakdown":{"properties":{"grand_total":{"type":"string"},"subtotal":{"type":"string"},"tax_details":{"items":{"properties":{"amount":{"type":"string"},"selected_tax_code_id":{"type":"integer"},"selected_tax_code_name":{"type":"string"},"tax_code_id":{"type":"integer"},"tax_code_name":{"type":"string"},"tax_code_rate":{"type":"string"},"taxable_amount":{"type":"string"}},"type":"object"},"type":"array"},"tax_total":{"type":"string"}},"type":"object"},"terms":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"vendor_id":{"type":"integer"},"vendor_name":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Direct Cost Item","tags":["direct_costs"],"x-os-idempotent":true,"x-os-module":"direct_costs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/direct_costs/{id}/attachments":{"post":{"operationId":"createProjectDirectCostAttachment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Upload direct cost attachment","tags":["direct_costs"],"x-os-idempotent":false,"x-os-module":"direct_costs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/distribution_groups":{"get":{"operationId":"listProjectDistributionGroups","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[search]","schema":{"type":"string"}},{"in":"query","name":"sort","required":false,"schema":{"enum":["name"],"type":"string"}},{"in":"query","name":"view","required":false,"schema":{"enum":["extended"],"type":"string"}},{"in":"query","name":"include_ancestors","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"domain_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"min_ual","required":false,"schema":{"type":"integer"}},{"in":"query","name":"ual","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"anyOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Normal View","type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"users":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"imageUrl":{"type":"string"},"initials":{"type":"string"},"job_title":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"title":"Extended View","type":"object"},{"properties":{"domain_user_ids":{"items":{"type":"integer"},"type":"array"},"id":{"type":"integer"},"name":{"type":"string"},"users":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"imageUrl":{"type":"string"},"initials":{"type":"string"},"job_title":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"title":"Extended View with Domain User IDs","type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Project Distribution Groups","tags":["directory"],"x-os-idempotent":false,"x-os-module":"directory","x-os-paginated":true},"post":{"operationId":"createProjectDistributionGroup","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"header","name":"Idempotency-Token","schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"distribution_group":{"properties":{"name":{"type":"string"},"user_ids":{"items":{"type":"integer"},"type":"array"}},"required":["name"],"title":"Distribution Group","type":"object"}},"required":["distribution_group"],"title":"Create Distribution Group Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"users":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"imageUrl":{"type":"string"},"initials":{"type":"string"},"job_title":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"title":"Extended View","type":"object"}}}},"201":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"users":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"imageUrl":{"type":"string"},"initials":{"type":"string"},"job_title":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"title":"Extended View","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"exception":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Project Distribution Group","tags":["directory"],"x-os-idempotent":true,"x-os-module":"directory","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/distribution_groups/{distribution_group_id}":{"delete":{"operationId":"deleteProjectDistributionGroup","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"distribution_group_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"exception":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Project Distribution Group","tags":["directory"],"x-os-idempotent":false,"x-os-module":"directory","x-os-paginated":false},"get":{"operationId":"getProjectDistributionGroup","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"distribution_group_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["extended"],"type":"string"}},{"in":"query","name":"include_ancestors","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"domain_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"min_ual","required":false,"schema":{"type":"integer"}},{"in":"query","name":"ual","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Normal View","type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"users":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"imageUrl":{"type":"string"},"initials":{"type":"string"},"job_title":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"title":"Extended View","type":"object"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"exception":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}}},"summary":"Show Project Distribution Group","tags":["directory"],"x-os-idempotent":false,"x-os-module":"directory","x-os-paginated":false},"patch":{"operationId":"updateProjectDistributionGroup","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"distribution_group_id","required":true,"schema":{"type":"integer"}},{"in":"header","name":"Idempotency-Token","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"distribution_group":{"properties":{"name":{"type":"string"},"user_ids":{"items":{"type":"integer"},"type":"array"}},"title":"Distribution Group","type":"object"}},"required":["distribution_group"],"title":"Update Distribution Group Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"users":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"imageUrl":{"type":"string"},"initials":{"type":"string"},"job_title":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"title":"Extended View","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"exception":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Project Distribution Group","tags":["directory"],"x-os-idempotent":false,"x-os-module":"directory","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_areas":{"get":{"operationId":"listProjectDrawingAreas","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[exclude_empty_connected]","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"deletable":{"type":"boolean"},"drawing_disciplines":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"}},"type":"object"},"type":"array"},"drawing_sets":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"date":{"format":"date","type":"string"},"drawing_revisions_count":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"project_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"DrawingSet","type":"object"},"type":"array"},"drawings_count":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"DrawingArea","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List drawing areas","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":true},"post":{"operationId":"createProjectDrawingArea","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"}},"required":["name"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create drawing area","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_areas/{id}":{"delete":{"description":"Delete an empty drawing area. An area that still holds drawings (current or recycled) returns 409; move them to another area first. Needs drawings delete permission.","operationId":"deleteProjectDrawingArea","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."}},"summary":"Delete a drawing area","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false},"get":{"description":"Alias of `GET /rest/v1.1/projects/{project_id}/drawing_areas/{id}`, with the same behaviour. Requires the `view` permission on the project's drawings tool. A scoped API token needs `drawings:read`.","operationId":"getProjectDrawingArea","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"type":["string","null"]},"name":{"minLength":1,"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"Get drawing area","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false},"patch":{"operationId":"updateProjectDrawingArea","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"}},"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update a drawing area","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_disciplines":{"get":{"operationId":"listProjectDrawingDisciplines","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"abbreviations":{"items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"}},"type":"object"},"type":"array"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Drawing Disciplines","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false},"post":{"operationId":"createProjectDrawingDiscipline","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create drawing discipline","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_disciplines/{id}":{"get":{"operationId":"getProjectDrawingDiscipline","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"abbreviations":{"items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"}},"required":["id","name"],"type":"object"}}}}},"summary":"Show Drawing Discipline","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false},"patch":{"operationId":"updateProjectDrawingDiscipline","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"abbreviations":{"items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"}},"required":["id","name"],"type":"object"}}}}},"summary":"Update Drawing Discipline","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_revision_emails/{id}/send_email":{"post":{"operationId":"sendEmailProjectDrawingRevisionEmail","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bcc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"body":{"type":"string"},"cc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"subject":{"type":"string"}},"required":["distribution_ids"],"type":"object"}}},"required":true},"responses":{"204":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Send email","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_revision_terms":{"get":{"operationId":"listProjectDrawingRevisionTerms","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"drawing_revision_ids","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"drawing_revision_id":{"type":"integer"},"terms":{"additionalProperties":{"items":{"properties":{"height":{"type":"integer"},"index":{"type":"integer"},"width":{"type":"integer"},"x":{"type":"integer"},"y":{"type":"integer"}},"type":"object"},"type":"array"},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"DrawingRevisionTermSet","type":"object"},"nullable":true,"type":"array"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List drawing revision terms","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_revisions":{"get":{"operationId":"listProjectDrawingRevisions","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"drawing_area_id","schema":{"type":"integer"}},{"in":"query","name":"drawing_id","schema":{"type":"integer"}},{"in":"query","name":"drawing_discipline_id","schema":{"type":"integer"}},{"in":"query","name":"drawing_set_id","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"id","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[ids]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[deleted]","required":false,"schema":{"enum":["only","with"],"type":"string"}},{"in":"query","name":"filters[viewer_experience]","required":false,"schema":{"enum":["legacy","unified"],"type":"string"}},{"in":"query","name":"is_reviewed","schema":{"type":"boolean"}},{"in":"query","name":"query","schema":{"type":"string"}},{"in":"query","name":"with_obsolete","schema":{"type":"boolean"}},{"in":"query","name":"sort","required":false,"schema":{"enum":["id","-id","created_at","deleted_at","drawing_number","number","title","drawing_date","received_date","status","revision_number","revision","drawing_set","sheet_number","obsolete"],"type":"string"}},{"in":"query","name":"view","required":false,"schema":{"enum":["only_pdf_urls","only_ids","only_ids_post_review","web_index","web_show","extended_coordinates","extended_files","extended_dpi","android"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"activity_stream_last_viewed_at":{"nullable":true,"type":"string"},"connectability_outdated":{"type":"boolean"},"current":{"type":"boolean"},"custom_fields":{"additionalProperties":true,"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"discipline":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"}},"type":"object"},"drawing_area":{"properties":{"id":{"type":"integer"}},"type":"object"},"drawing_date":{"format":"date","nullable":true,"type":"string"},"drawing_id":{"type":"integer"},"drawing_number":{"nullable":true,"type":"string"},"drawing_set":{"properties":{"id":{"type":"integer"}},"type":"object"},"drawing_sketches_count":{"type":"integer"},"floorplan":{"type":"boolean"},"has_drawing_sketches":{"type":"boolean"},"has_public_markup_layer_elements":{"type":"boolean"},"height":{"type":"integer"},"id":{"type":"integer"},"large_thumbnail_url":{"type":"string"},"number":{"type":"string"},"obsolete":{"type":"boolean"},"order_in_drawing":{"nullable":true,"type":"integer"},"pdf_size":{"type":"integer"},"pdf_url":{"type":"string"},"png_size":{"type":"integer"},"png_url":{"type":"string"},"position":{"nullable":true,"type":"integer"},"received_date":{"format":"date","nullable":true,"type":"string"},"revision_number":{"nullable":true,"type":"string"},"sheet_number":{"nullable":true,"type":"integer"},"status":{"type":"string"},"thumbnail_url":{"type":"string"},"title":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"viewer_experience":{"enum":["legacy","unified"],"type":"string"},"width":{"type":"integer"},"zip_url":{"nullable":true,"type":"string"}},"title":"DrawingRevision","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List drawing revisions","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":true},"post":{"operationId":"createProjectDrawingRevision","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create drawing revision","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_revisions/publish":{"post":{"operationId":"createProjectDrawingRevisionsPublish","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"distribute":{"type":"boolean"},"drawing_area_id":{"type":"integer"},"drawing_set_id":{"type":"integer"}},"required":["drawing_set_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"drawing_revisions":{"items":{"properties":{"id":{"type":"integer"}},"type":"object"},"type":"array"}},"type":"object"},{"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"type":"object"}],"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"exception":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Publish Drawing Revisions","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_revisions/{drawing_revision_id}/drawing_tiles":{"get":{"operationId":"listProjectDrawingRevisionDrawingTiles","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"drawing_revision_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"max_zoom_level":{"type":"integer"},"tile_size":{"items":{"type":"integer"},"type":"array"},"tiles":{"items":{"properties":{"id":{"type":"integer"},"url":{"type":"string"},"x":{"type":"integer"},"y":{"type":"integer"},"z":{"type":"integer"}},"title":"DrawingTile","type":"object"},"type":"array"},"zip_url":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List drawing tiles","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_revisions/{id}":{"get":{"operationId":"getProjectDrawingRevision","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"activity_stream_last_viewed_at":{"nullable":true,"type":"string"},"connectability_outdated":{"type":"boolean"},"current":{"type":"boolean"},"custom_fields":{"additionalProperties":true,"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"discipline":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"}},"type":"object"},"drawing_area":{"properties":{"id":{"type":"integer"}},"type":"object"},"drawing_date":{"format":"date","nullable":true,"type":"string"},"drawing_id":{"type":"integer"},"drawing_number":{"nullable":true,"type":"string"},"drawing_set":{"properties":{"id":{"type":"integer"}},"type":"object"},"drawing_sketches_count":{"type":"integer"},"floorplan":{"type":"boolean"},"has_drawing_sketches":{"type":"boolean"},"has_public_markup_layer_elements":{"type":"boolean"},"height":{"type":"integer"},"id":{"type":"integer"},"large_thumbnail_url":{"type":"string"},"number":{"type":"string"},"obsolete":{"type":"boolean"},"order_in_drawing":{"nullable":true,"type":"integer"},"pdf_size":{"type":"integer"},"pdf_url":{"type":"string"},"png_size":{"type":"integer"},"png_url":{"type":"string"},"position":{"nullable":true,"type":"integer"},"received_date":{"format":"date","nullable":true,"type":"string"},"revision_number":{"nullable":true,"type":"string"},"sheet_number":{"nullable":true,"type":"integer"},"status":{"type":"string"},"thumbnail_url":{"type":"string"},"title":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"viewer_experience":{"enum":["legacy","unified"],"type":"string"},"width":{"type":"integer"},"zip_url":{"nullable":true,"type":"string"}},"title":"DrawingRevision","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Drawing Revision","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false},"patch":{"operationId":"updateProjectDrawingRevision","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"drawing_revision":{"properties":{"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"drawing_date":{"format":"date","type":"string"},"drawing_id":{"type":"integer"},"drawing_set_id":{"type":"integer"},"floorplan":{"type":"boolean"},"received_date":{"format":"date","type":"string"},"revision_number":{"type":"string"}},"title":"Drawing Revision","type":"object"}},"required":["drawing_revision"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"current":{"type":"boolean"},"custom_fields":{"additionalProperties":true,"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"drawing_date":{"format":"date","type":"string"},"drawing_id":{"type":"integer"},"drawing_set":{"properties":{"id":{"type":"integer"}},"type":"object"},"floorplan":{"type":"boolean"},"id":{"type":"integer"},"ordered_revision_ids":{"items":{"type":"integer"},"type":"array"},"received_date":{"format":"date","type":"string"},"revision_number":{"type":"string"},"sheet_number":{"nullable":true,"type":"integer"}},"title":"DrawingRevision","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"exception":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Drawing Revision","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_revisions/{id}/markups":{"get":{"operationId":"listProjectDrawingRevisionMarkups","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"company_id":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"type":"object"},"created_by_id":{"type":"integer"},"data":{"items":{"type":"object"},"type":"array"},"drawing_revision_id":{"type":"integer"},"elements_count":{"type":"integer"},"id":{"type":"integer"},"layer":{"type":"string"},"project_id":{"type":"integer"},"updated_at":{"type":"string"}},"required":["id","drawing_revision_id","layer","data","created_by_id","created_at"],"type":"object"},"type":"array"}}}},"401":{},"404":{}},"summary":"List markups for a drawing revision","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false},"post":{"operationId":"createProjectDrawingRevisionMarkup","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"markup":{"properties":{"data":{"items":{"type":"object"},"type":"array"},"layer":{"type":"string"}},"required":["data"],"type":"object"}},"required":["markup"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"company_id":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"type":"object"},"created_by_id":{"type":"integer"},"data":{"items":{"type":"object"},"type":"array"},"drawing_revision_id":{"type":"integer"},"elements_count":{"type":"integer"},"id":{"type":"integer"},"layer":{"type":"string"},"project_id":{"type":"integer"},"updated_at":{"type":"string"}},"required":["id","drawing_revision_id","layer","data","created_by_id","created_at"],"type":"object"}}},"headers":{"ETag":{"description":"Opaque strong version token for this persisted markup. Send the exact value in If-Match on PATCH or DELETE.","schema":{"type":"string"}}}},"401":{},"404":{},"422":{}},"summary":"Create a markup layer on a drawing revision","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_revisions/{id}/markups/{markup_id}":{"delete":{"description":"Concurrency contract transition: unconditional writes are no longer accepted. GET this markup first and send its exact ETag in If-Match. A changed version returns 412 without writing; review the latest contents before retrying. Missing If-Match returns 428. One strong token only; wildcard, weak and multiple tokens are rejected. Authorization and nested revision checks still apply before checking the precondition.","operationId":"deleteProjectDrawingRevisionMarkup","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"markup_id","required":true,"schema":{"type":"integer"}},{"description":"Exactly one strong ETag obtained from GET, POST or the last successful PATCH of this markup.","in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\"[a-f0-9]{64}\"$","type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"required":["errors"],"type":"object"}}},"description":"Malformed If-Match: supply one strong ETag, not a wildcard, weak validator or list."},"401":{},"404":{},"412":{"content":{"application/json":{"schema":{"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"required":["errors"],"type":"object"}}},"description":"The markup changed after the supplied ETag was read. No mutation occurred."},"428":{"content":{"application/json":{"schema":{"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"required":["errors"],"type":"object"}}},"description":"If-Match is required. GET the markup and review its contents before retrying."}},"summary":"Delete a markup layer","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false},"get":{"operationId":"getProjectDrawingRevisionMarkup","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"markup_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"company_id":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"type":"object"},"created_by_id":{"type":"integer"},"data":{"items":{"type":"object"},"type":"array"},"drawing_revision_id":{"type":"integer"},"elements_count":{"type":"integer"},"id":{"type":"integer"},"layer":{"type":"string"},"project_id":{"type":"integer"},"updated_at":{"type":"string"}},"required":["id","drawing_revision_id","layer","data","created_by_id","created_at"],"type":"object"}}},"headers":{"ETag":{"description":"Opaque strong version token for this persisted markup. Send the exact value in If-Match on PATCH or DELETE.","schema":{"type":"string"}}}},"401":{},"404":{}},"summary":"Show a markup","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false},"patch":{"description":"Concurrency contract transition: unconditional writes are no longer accepted. GET this markup first and send its exact ETag in If-Match. A changed version returns 412 without writing; review the latest contents before retrying. Missing If-Match returns 428. One strong token only; wildcard, weak and multiple tokens are rejected. Authorization and nested revision checks still apply before checking the precondition.","operationId":"updateProjectDrawingRevisionMarkup","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"markup_id","required":true,"schema":{"type":"integer"}},{"description":"Exactly one strong ETag obtained from GET, POST or the last successful PATCH of this markup.","in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\"[a-f0-9]{64}\"$","type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"markup":{"properties":{"data":{"items":{"type":"object"},"type":"array"},"layer":{"type":"string"}},"type":"object"}},"required":["markup"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"company_id":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"type":"object"},"created_by_id":{"type":"integer"},"data":{"items":{"type":"object"},"type":"array"},"drawing_revision_id":{"type":"integer"},"elements_count":{"type":"integer"},"id":{"type":"integer"},"layer":{"type":"string"},"project_id":{"type":"integer"},"updated_at":{"type":"string"}},"required":["id","drawing_revision_id","layer","data","created_by_id","created_at"],"type":"object"}}},"headers":{"ETag":{"description":"Opaque strong version token for this persisted markup. Send the exact value in If-Match on PATCH or DELETE.","schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"required":["errors"],"type":"object"}}},"description":"Malformed If-Match: supply one strong ETag, not a wildcard, weak validator or list."},"401":{},"404":{},"412":{"content":{"application/json":{"schema":{"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"required":["errors"],"type":"object"}}},"description":"The markup changed after the supplied ETag was read. No mutation occurred."},"428":{"content":{"application/json":{"schema":{"properties":{"errors":{"items":{"type":"string"},"type":"array"}},"required":["errors"],"type":"object"}}},"description":"If-Match is required. GET the markup and review its contents before retrying."}},"summary":"Update a markup layer","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_sets":{"get":{"operationId":"listProjectDrawingSets","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[exclude_empty_sets]","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"filters[only_attachable_sets]","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"filters[with_sketches]","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"filters[with_measurements]","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"drawing_area_id","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"company_id":{"nullable":true,"type":"integer"},"connected":{"nullable":false,"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"date":{"format":"date","nullable":true,"type":"string"},"deletable":{"deprecated":true,"nullable":false,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"},"project_id":{"type":"integer"},"published_drawings_count":{"nullable":false,"type":"integer"},"unpublished_drawings_count":{"nullable":false,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"DrawingSet","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List drawing sets","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":true},"post":{"operationId":"createProjectDrawingSet","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"date":{"format":"date","type":"string"},"name":{"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"company_id":{"nullable":true,"type":"integer"},"connected":{"nullable":false,"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"date":{"format":"date","nullable":true,"type":"string"},"deletable":{"deprecated":true,"nullable":false,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"},"project_id":{"type":"integer"},"published_drawings_count":{"nullable":false,"type":"integer"},"unpublished_drawings_count":{"nullable":false,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"DrawingSet","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create drawing set","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_sets/{id}":{"delete":{"description":"Delete an unused drawing set. A published set, or a set holding revisions, returns 409. Needs drawings delete permission.","operationId":"deleteProjectDrawingSet","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."}},"summary":"Delete drawing set","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false},"get":{"description":"Requires the `view` permission on the project's drawings tool. A scoped API token needs `drawings:read`.","operationId":"getProjectDrawingSet","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"drawing_area_id","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"date":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},{"type":"null"}]},"name":{"minLength":1,"type":"string"},"received_date":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},{"type":"null"}]},"status":{"enum":["draft","in_review"],"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"Get drawing set","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false},"patch":{"operationId":"updateProjectDrawingSet","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"drawing_set":{"properties":{"date":{"format":"date","type":"string"},"name":{"type":"string"}},"title":"Drawing Set","type":"object"}},"required":["drawing_set"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"company_id":{"nullable":true,"type":"integer"},"connected":{"nullable":false,"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"date":{"format":"date","nullable":true,"type":"string"},"deletable":{"deprecated":true,"nullable":false,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"},"project_id":{"type":"integer"},"published_drawings_count":{"nullable":false,"type":"integer"},"unpublished_drawings_count":{"nullable":false,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"DrawingSet","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update drawing set","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_sets/{id}/publish":{"post":{"operationId":"publishProjectDrawingSet","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Publish drawing set","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawing_sheet_index":{"get":{"operationId":"listProjectDrawingSheetIndex","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"current_revision_id":{"nullable":true,"type":"integer"},"current_revision_number":{"nullable":true,"type":"string"},"discipline":{"type":"string"},"drawing_area":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"drawing_area_id":{"nullable":true,"type":"integer"},"drawing_discipline_id":{"type":"integer"},"drawing_number":{"type":"string"},"id":{"type":"integer"},"number":{"type":"string"},"obsolete":{"type":"boolean"},"sheet_number":{"nullable":true,"type":"integer"},"title":{"nullable":true,"type":"string"}},"required":["id","number","title","discipline","drawing_discipline_id"],"type":"object"},"type":"array"}}}}},"summary":"Sheet Index","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawings/recycle_bin":{"get":{"operationId":"listProjectDrawingsRecycleBin","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"current_revision_number":{"nullable":true,"type":"string"},"deleted":{"type":"boolean"},"deleted_at":{"nullable":true,"type":"string"},"discipline":{"type":"string"},"drawing_area_id":{"nullable":true,"type":"integer"},"drawing_discipline_id":{"type":"integer"},"drawing_number":{"type":"string"},"id":{"type":"integer"},"number":{"type":"string"},"obsolete":{"type":"boolean"},"revisions_count":{"type":"integer"},"sheet_number":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"}},"required":["id","number","title","discipline","deleted","deleted_at"],"type":"object"},"type":"array"}}}}},"summary":"List recycled drawings (os.construction extension)","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/drawings/{id}":{"delete":{"operationId":"deleteProjectDrawing","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{}},"summary":"Delete (recycle) a drawing (os.construction extension)","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawings/{id}/compare":{"get":{"operationId":"listProjectDrawingCompare","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"a","required":true,"schema":{"type":"integer"}},{"in":"query","name":"b","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"changed_count":{"type":"integer"},"diff":{"items":{"properties":{"a":{"nullable":true,"type":"string"},"b":{"nullable":true,"type":"string"},"changed":{"type":"boolean"},"field":{"type":"string"},"label":{"type":"string"}},"required":["field","label","a","b","changed"],"type":"object"},"type":"array"},"drawing":{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"title":{"nullable":true,"type":"string"}},"required":["id","number"],"type":"object"},"identical":{"type":"boolean"},"revision_a":{"properties":{"current":{"type":"boolean"},"drawing_date":{"nullable":true,"type":"string"},"drawing_id":{"type":"integer"},"drawing_number":{"type":"string"},"id":{"type":"integer"},"png_url":{"type":"string"},"received_date":{"nullable":true,"type":"string"},"revision_number":{"type":"string"},"status":{"type":"string"},"thumbnail_url":{"type":"string"},"title":{"nullable":true,"type":"string"}},"required":["id","drawing_id","revision_number","current"],"type":"object"},"revision_b":{"properties":{"current":{"type":"boolean"},"drawing_date":{"nullable":true,"type":"string"},"drawing_id":{"type":"integer"},"drawing_number":{"type":"string"},"id":{"type":"integer"},"png_url":{"type":"string"},"received_date":{"nullable":true,"type":"string"},"revision_number":{"type":"string"},"status":{"type":"string"},"thumbnail_url":{"type":"string"},"title":{"nullable":true,"type":"string"}},"required":["id","drawing_id","revision_number","current"],"type":"object"}},"required":["drawing","revision_a","revision_b","diff","changed_count","identical"],"type":"object"}}}},"401":{},"404":{},"422":{}},"summary":"Compare two revisions of a drawing (os.construction extension)","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/drawings/{id}/restore":{"patch":{"operationId":"restoreProjectDrawing","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"discipline":{"type":"string"},"drawing_number":{"type":"string"},"id":{"type":"integer"},"number":{"type":"string"},"obsolete":{"type":"boolean"},"sheet_number":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"}},"required":["id","number","title","obsolete","discipline"],"type":"object"}}}}},"summary":"Restore a recycled drawing (os.construction extension)","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/dumpster_logs":{"get":{"operationId":"listProjectDumpsterLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[vendor_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"quantity_delivered":{"type":"integer"},"quantity_removed":{"type":"integer"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Dumpster Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectDumpsterLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"dumpster_log":{"allOf":[{"properties":{"comments":{"type":"string"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"location_id":{"type":"integer"},"quantity_delivered":{"type":"integer"},"quantity_removed":{"type":"integer"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["dumpster_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"dumpster_log":{"properties":{"comments":{"type":"string"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"location_id":{"type":"integer"},"quantity_delivered":{"type":"integer"},"quantity_removed":{"type":"integer"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["dumpster_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"quantity_delivered":{"type":"integer"},"quantity_removed":{"type":"integer"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Dumpster Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/dumpster_logs/{id}":{"delete":{"operationId":"deleteProjectDumpsterLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Dumpster Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectDumpsterLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"quantity_delivered":{"type":"integer"},"quantity_removed":{"type":"integer"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Dumpster Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectDumpsterLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"dumpster_log":{"allOf":[{"properties":{"comments":{"type":"string"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"location_id":{"type":"integer"},"quantity_delivered":{"type":"integer"},"quantity_removed":{"type":"integer"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["dumpster_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"dumpster_log":{"properties":{"comments":{"type":"string"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"location_id":{"type":"integer"},"quantity_delivered":{"type":"integer"},"quantity_removed":{"type":"integer"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["dumpster_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"quantity_delivered":{"type":"integer"},"quantity_removed":{"type":"integer"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Dumpster Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/email_intake/addresses":{"get":{"description":"Requires the project Admin tool at admin level (token scope admin:read for reads, admin:write for writes).","operationId":"listProjectEmailIntakeAddresses","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"address":{"description":"The full inbound address, <slug>-<token>@<inbound domain>.","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"enabled":{"type":"boolean"},"id":{"type":"integer"},"label":{"nullable":true,"type":"string"},"project_id":{"type":"integer"},"receiving_enabled":{"description":"Whether the platform currently receives mail (INBOUND_EMAIL_ENABLED). Uploading .eml works either way.","type":"boolean"},"rotated_at":{"format":"date-time","nullable":true,"type":"string"},"target_type":{"enum":["rfi","submittal","ap_invoice"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","project_id","address","target_type","enabled","receiving_enabled"],"type":"object"},"type":"array"}}},"description":"Addresses"},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}},"description":"Not a project admin"}},"summary":"List inbound email addresses","tags":["email_intake"],"x-os-idempotent":false,"x-os-module":"email_intake","x-os-paginated":false},"post":{"description":"Requires the project Admin tool at admin level (token scope admin:read for reads, admin:write for writes).","operationId":"createProjectEmailIntakeAddress","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"inbound_address":{"properties":{"label":{"maxLength":120,"nullable":true,"type":"string"},"target_type":{"default":"rfi","enum":["rfi","submittal","ap_invoice"],"type":"string"}},"type":"object"}},"required":["inbound_address"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"address":{"description":"The full inbound address, <slug>-<token>@<inbound domain>.","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"enabled":{"type":"boolean"},"id":{"type":"integer"},"label":{"nullable":true,"type":"string"},"project_id":{"type":"integer"},"receiving_enabled":{"description":"Whether the platform currently receives mail (INBOUND_EMAIL_ENABLED). Uploading .eml works either way.","type":"boolean"},"rotated_at":{"format":"date-time","nullable":true,"type":"string"},"target_type":{"enum":["rfi","submittal","ap_invoice"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","project_id","address","target_type","enabled","receiving_enabled"],"type":"object"}}},"description":"Created"},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}},"description":"Not a project admin"},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}},"description":"Invalid body"}},"summary":"Create an inbound email address","tags":["email_intake"],"x-os-idempotent":true,"x-os-module":"email_intake","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/email_intake/addresses/{id}":{"get":{"description":"Requires the project Admin tool at admin level (token scope admin:read for reads, admin:write for writes).","operationId":"getProjectEmailIntakeAddress","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"address":{"description":"The full inbound address, <slug>-<token>@<inbound domain>.","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"enabled":{"type":"boolean"},"id":{"type":"integer"},"label":{"nullable":true,"type":"string"},"project_id":{"type":"integer"},"receiving_enabled":{"description":"Whether the platform currently receives mail (INBOUND_EMAIL_ENABLED). Uploading .eml works either way.","type":"boolean"},"rotated_at":{"format":"date-time","nullable":true,"type":"string"},"target_type":{"enum":["rfi","submittal","ap_invoice"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","project_id","address","target_type","enabled","receiving_enabled"],"type":"object"}}},"description":"Address"},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}},"description":"Not found"}},"summary":"Show an inbound email address","tags":["email_intake"],"x-os-idempotent":false,"x-os-module":"email_intake","x-os-paginated":false},"patch":{"description":"Requires the project Admin tool at admin level (token scope admin:read for reads, admin:write for writes). Disable an address to stop it accepting mail; mail to a disabled address is logged as rejected.","operationId":"updateProjectEmailIntakeAddress","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"inbound_address":{"properties":{"enabled":{"type":"boolean"},"label":{"maxLength":120,"nullable":true,"type":"string"},"target_type":{"enum":["rfi","submittal","ap_invoice"],"type":"string"}},"type":"object"}},"required":["inbound_address"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"address":{"description":"The full inbound address, <slug>-<token>@<inbound domain>.","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"enabled":{"type":"boolean"},"id":{"type":"integer"},"label":{"nullable":true,"type":"string"},"project_id":{"type":"integer"},"receiving_enabled":{"description":"Whether the platform currently receives mail (INBOUND_EMAIL_ENABLED). Uploading .eml works either way.","type":"boolean"},"rotated_at":{"format":"date-time","nullable":true,"type":"string"},"target_type":{"enum":["rfi","submittal","ap_invoice"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","project_id","address","target_type","enabled","receiving_enabled"],"type":"object"}}},"description":"Updated"},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}},"description":"Invalid body"}},"summary":"Update an inbound email address","tags":["email_intake"],"x-os-idempotent":true,"x-os-module":"email_intake","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/email_intake/addresses/{id}/rotate":{"post":{"description":"Requires the project Admin tool at admin level (token scope admin:read for reads, admin:write for writes). Issues a new unguessable address; the previous one stops accepting mail immediately.","operationId":"rotateProjectEmailIntakeAddress","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"address":{"description":"The full inbound address, <slug>-<token>@<inbound domain>.","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"enabled":{"type":"boolean"},"id":{"type":"integer"},"label":{"nullable":true,"type":"string"},"project_id":{"type":"integer"},"receiving_enabled":{"description":"Whether the platform currently receives mail (INBOUND_EMAIL_ENABLED). Uploading .eml works either way.","type":"boolean"},"rotated_at":{"format":"date-time","nullable":true,"type":"string"},"target_type":{"enum":["rfi","submittal","ap_invoice"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","project_id","address","target_type","enabled","receiving_enabled"],"type":"object"}}},"description":"Rotated"},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}},"description":"Not found"}},"summary":"Rotate an inbound email address","tags":["email_intake"],"x-os-idempotent":true,"x-os-module":"email_intake","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/email_intake/messages":{"get":{"description":"Requires the project Admin tool at admin level (token scope admin:read for reads, admin:write for writes). Newest first. Bodies are not stored in the log; open the draft record.","operationId":"listProjectEmailIntakeMessages","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"status","schema":{"enum":["received","drafted","rejected","failed"],"type":"string"}},{"in":"query","name":"address_id","schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"address_id":{"nullable":true,"type":"integer"},"attachment_count":{"type":"integer"},"authentication":{"nullable":true,"properties":{"dkim":{"nullable":true,"type":"string"},"dmarc":{"nullable":true,"type":"string"},"spf":{"nullable":true,"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"from_address":{"type":"string"},"id":{"type":"integer"},"processed_at":{"format":"date-time","nullable":true,"type":"string"},"project_id":{"type":"integer"},"reason":{"nullable":true,"type":"string"},"reason_code":{"description":"auto_reply, bulk_mail, mail_loop, bounce_sender, sender_unauthenticated, sender_unknown, sender_not_permitted, too_large, rate_limited, address_disabled, unparseable, no_sender, processing_failed","nullable":true,"type":"string"},"received_at":{"format":"date-time","type":"string"},"record":{"nullable":true,"properties":{"api_path":{"nullable":true,"type":"string"},"id":{"nullable":true,"type":"integer"},"type":{"enum":["rfi","submittal","ap_captured_document"],"type":"string"}},"type":"object"},"sender_user_id":{"nullable":true,"type":"integer"},"sender_verified":{"type":"boolean"},"size_bytes":{"type":"integer"},"skipped_attachments":{"items":{"properties":{"filename":{"type":"string"},"reason":{"type":"string"}},"type":"object"},"type":"array"},"source":{"enum":["resend","eml_upload"],"type":"string"},"status":{"enum":["received","drafted","rejected","failed"],"type":"string"},"subject":{"nullable":true,"type":"string"},"target_type":{"enum":["rfi","submittal","ap_invoice"],"type":"string"},"uploaded_by_id":{"nullable":true,"type":"integer"}},"required":["id","project_id","source","status","target_type"],"type":"object"},"type":"array"}}},"description":"Messages"},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}},"description":"Not a project admin"}},"summary":"List the email intake log","tags":["email_intake"],"x-os-idempotent":false,"x-os-module":"email_intake","x-os-paginated":true},"post":{"description":"Uploads one RFC 5322 message (.eml) and turns it into a DRAFT for review, created as the caller. target_type rfi needs RFI create permission (rfis:write), submittal needs submittal create permission (submittals:write), ap_invoice needs AP entry (accounting:write) and puts the PDF/image attachments in the AP capture inbox. Auto-replies, list mail and loops are rejected. A repeat upload of the same message (same Message-ID) answers 200 with the earlier log entry. Works whether or not inbound mail receiving is enabled.","operationId":"createProjectEmailIntakeMessage","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"query","name":"target_type","schema":{"default":"rfi","enum":["rfi","submittal","ap_invoice"],"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"The .eml file (message/rfc822).","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"address_id":{"nullable":true,"type":"integer"},"attachment_count":{"type":"integer"},"authentication":{"nullable":true,"properties":{"dkim":{"nullable":true,"type":"string"},"dmarc":{"nullable":true,"type":"string"},"spf":{"nullable":true,"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"from_address":{"type":"string"},"id":{"type":"integer"},"processed_at":{"format":"date-time","nullable":true,"type":"string"},"project_id":{"type":"integer"},"reason":{"nullable":true,"type":"string"},"reason_code":{"description":"auto_reply, bulk_mail, mail_loop, bounce_sender, sender_unauthenticated, sender_unknown, sender_not_permitted, too_large, rate_limited, address_disabled, unparseable, no_sender, processing_failed","nullable":true,"type":"string"},"received_at":{"format":"date-time","type":"string"},"record":{"nullable":true,"properties":{"api_path":{"nullable":true,"type":"string"},"id":{"nullable":true,"type":"integer"},"type":{"enum":["rfi","submittal","ap_captured_document"],"type":"string"}},"type":"object"},"sender_user_id":{"nullable":true,"type":"integer"},"sender_verified":{"type":"boolean"},"size_bytes":{"type":"integer"},"skipped_attachments":{"items":{"properties":{"filename":{"type":"string"},"reason":{"type":"string"}},"type":"object"},"type":"array"},"source":{"enum":["resend","eml_upload"],"type":"string"},"status":{"enum":["received","drafted","rejected","failed"],"type":"string"},"subject":{"nullable":true,"type":"string"},"target_type":{"enum":["rfi","submittal","ap_invoice"],"type":"string"},"uploaded_by_id":{"nullable":true,"type":"integer"}},"required":["id","project_id","source","status","target_type"],"type":"object"}}},"description":"Duplicate of an earlier upload"},"201":{"content":{"application/json":{"schema":{"properties":{"address_id":{"nullable":true,"type":"integer"},"attachment_count":{"type":"integer"},"authentication":{"nullable":true,"properties":{"dkim":{"nullable":true,"type":"string"},"dmarc":{"nullable":true,"type":"string"},"spf":{"nullable":true,"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"from_address":{"type":"string"},"id":{"type":"integer"},"processed_at":{"format":"date-time","nullable":true,"type":"string"},"project_id":{"type":"integer"},"reason":{"nullable":true,"type":"string"},"reason_code":{"description":"auto_reply, bulk_mail, mail_loop, bounce_sender, sender_unauthenticated, sender_unknown, sender_not_permitted, too_large, rate_limited, address_disabled, unparseable, no_sender, processing_failed","nullable":true,"type":"string"},"received_at":{"format":"date-time","type":"string"},"record":{"nullable":true,"properties":{"api_path":{"nullable":true,"type":"string"},"id":{"nullable":true,"type":"integer"},"type":{"enum":["rfi","submittal","ap_captured_document"],"type":"string"}},"type":"object"},"sender_user_id":{"nullable":true,"type":"integer"},"sender_verified":{"type":"boolean"},"size_bytes":{"type":"integer"},"skipped_attachments":{"items":{"properties":{"filename":{"type":"string"},"reason":{"type":"string"}},"type":"object"},"type":"array"},"source":{"enum":["resend","eml_upload"],"type":"string"},"status":{"enum":["received","drafted","rejected","failed"],"type":"string"},"subject":{"nullable":true,"type":"string"},"target_type":{"enum":["rfi","submittal","ap_invoice"],"type":"string"},"uploaded_by_id":{"nullable":true,"type":"integer"}},"required":["id","project_id","source","status","target_type"],"type":"object"}}},"description":"Processed (status drafted, rejected or failed)"},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}},"description":"Missing permission"},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}},"description":"Larger than the intake size limit"},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}},"description":"No file"}},"summary":"Upload an .eml as a draft","tags":["email_intake"],"x-os-idempotent":true,"x-os-module":"email_intake","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/email_intake/messages/{id}":{"get":{"description":"Requires the project Admin tool at admin level (token scope admin:read for reads, admin:write for writes).","operationId":"getProjectEmailIntakeMessage","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"address_id":{"nullable":true,"type":"integer"},"attachment_count":{"type":"integer"},"authentication":{"nullable":true,"properties":{"dkim":{"nullable":true,"type":"string"},"dmarc":{"nullable":true,"type":"string"},"spf":{"nullable":true,"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"from_address":{"type":"string"},"id":{"type":"integer"},"processed_at":{"format":"date-time","nullable":true,"type":"string"},"project_id":{"type":"integer"},"reason":{"nullable":true,"type":"string"},"reason_code":{"description":"auto_reply, bulk_mail, mail_loop, bounce_sender, sender_unauthenticated, sender_unknown, sender_not_permitted, too_large, rate_limited, address_disabled, unparseable, no_sender, processing_failed","nullable":true,"type":"string"},"received_at":{"format":"date-time","type":"string"},"record":{"nullable":true,"properties":{"api_path":{"nullable":true,"type":"string"},"id":{"nullable":true,"type":"integer"},"type":{"enum":["rfi","submittal","ap_captured_document"],"type":"string"}},"type":"object"},"sender_user_id":{"nullable":true,"type":"integer"},"sender_verified":{"type":"boolean"},"size_bytes":{"type":"integer"},"skipped_attachments":{"items":{"properties":{"filename":{"type":"string"},"reason":{"type":"string"}},"type":"object"},"type":"array"},"source":{"enum":["resend","eml_upload"],"type":"string"},"status":{"enum":["received","drafted","rejected","failed"],"type":"string"},"subject":{"nullable":true,"type":"string"},"target_type":{"enum":["rfi","submittal","ap_invoice"],"type":"string"},"uploaded_by_id":{"nullable":true,"type":"integer"}},"required":["id","project_id","source","status","target_type"],"type":"object"}}},"description":"Message"},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"type":"object"}}},"description":"Not found"}},"summary":"Show an email intake log entry","tags":["email_intake"],"x-os-idempotent":false,"x-os-module":"email_intake","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/equipment_logs":{"get":{"operationId":"listProjectEquipmentLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"type":"integer"},"style":"form"},{"explode":false,"in":"query","name":"filters[location_id]","schema":{"type":"integer"},"style":"form"},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"project_id":{"type":"integer"}},"type":"object"},"equipment_register":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"type":"object"},"hours_idle":{"type":"string"},"hours_operating":{"type":"string"},"id":{"type":"integer"},"inspected":{"type":"boolean"},"inspection_hour":{"maximum":23,"minimum":0,"type":"integer"},"inspection_minute":{"maximum":59,"minimum":0,"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"notes":{"type":"string"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Equipment Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectEquipmentLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"equipment_log":{"properties":{"cost_code_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"equipment_id":{"type":"integer"},"equipment_name":{"type":"string"},"equipment_register_id":{"type":"string"},"hours_idle":{"type":"integer"},"hours_operating":{"type":"integer"},"inspected":{"type":"boolean"},"inspection_hour":{"maximum":23,"minimum":0,"type":"integer"},"inspection_minute":{"maximum":59,"minimum":0,"type":"integer"},"location_id":{"nullable":true,"type":"integer"},"mt_location":{"items":{"type":"string"},"nullable":true,"type":"array"},"notes":{"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["equipment_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"equipment_log":{"properties":{"cost_code_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"equipment_id":{"type":"integer"},"equipment_name":{"type":"string"},"equipment_register_id":{"type":"string"},"hours_idle":{"type":"integer"},"hours_operating":{"type":"integer"},"inspected":{"type":"boolean"},"inspection_hour":{"maximum":23,"minimum":0,"type":"integer"},"inspection_minute":{"maximum":59,"minimum":0,"type":"integer"},"location_id":{"nullable":true,"type":"integer"},"mt_location":{"items":{"type":"string"},"nullable":true,"type":"array"},"notes":{"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["equipment_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"project_id":{"type":"integer"}},"type":"object"},"equipment_register":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"type":"object"},"hours_idle":{"type":"string"},"hours_operating":{"type":"string"},"id":{"type":"integer"},"inspected":{"type":"boolean"},"inspection_hour":{"maximum":23,"minimum":0,"type":"integer"},"inspection_minute":{"maximum":59,"minimum":0,"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"notes":{"type":"string"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Equipment Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/equipment_logs/{id}":{"delete":{"operationId":"deleteProjectEquipmentLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Equipment Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectEquipmentLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"project_id":{"type":"integer"}},"type":"object"},"equipment_register":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"type":"object"},"hours_idle":{"type":"string"},"hours_operating":{"type":"string"},"id":{"type":"integer"},"inspected":{"type":"boolean"},"inspection_hour":{"maximum":23,"minimum":0,"type":"integer"},"inspection_minute":{"maximum":59,"minimum":0,"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"notes":{"type":"string"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Equipment Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectEquipmentLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"equipment_log":{"properties":{"cost_code_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"equipment_id":{"type":"integer"},"equipment_name":{"type":"string"},"equipment_register_id":{"type":"string"},"hours_idle":{"type":"integer"},"hours_operating":{"type":"integer"},"inspected":{"type":"boolean"},"inspection_hour":{"maximum":23,"minimum":0,"type":"integer"},"inspection_minute":{"maximum":59,"minimum":0,"type":"integer"},"location_id":{"nullable":true,"type":"integer"},"mt_location":{"items":{"type":"string"},"nullable":true,"type":"array"},"notes":{"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["equipment_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"equipment_log":{"properties":{"cost_code_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"equipment_id":{"type":"integer"},"equipment_name":{"type":"string"},"equipment_register_id":{"type":"string"},"hours_idle":{"type":"integer"},"hours_operating":{"type":"integer"},"inspected":{"type":"boolean"},"inspection_hour":{"maximum":23,"minimum":0,"type":"integer"},"inspection_minute":{"maximum":59,"minimum":0,"type":"integer"},"location_id":{"nullable":true,"type":"integer"},"mt_location":{"items":{"type":"string"},"nullable":true,"type":"array"},"notes":{"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["equipment_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"project_id":{"type":"integer"}},"type":"object"},"equipment_register":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"type":"object"},"hours_idle":{"type":"string"},"hours_operating":{"type":"string"},"id":{"type":"integer"},"inspected":{"type":"boolean"},"inspection_hour":{"maximum":23,"minimum":0,"type":"integer"},"inspection_minute":{"maximum":59,"minimum":0,"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"notes":{"type":"string"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Equipment Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/expense_reports":{"get":{"operationId":"listProjectExpenseReports","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":100,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"status","schema":{"enum":["draft","submitted","returned","rejected","approved"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/expense_reports_ExpenseReport"},"type":"array"}}},"description":"Success","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"string"}},"Total":{"schema":{"type":"string"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Permission or source scope denied"},"404":{"description":"Not found or not visible"},"409":{"description":"Stale version or invalid transition"},"422":{"description":"Invalid input or evidence"}},"summary":"GET /rest/v1.0/projects/{project_id}/expense_reports","tags":["expense_reports"],"x-os-idempotent":false,"x-os-module":"expense_reports","x-os-paginated":true},"post":{"operationId":"createProjectExpenseReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"report":{"additionalProperties":false,"description":"Provide exactly one receipt basis: nonempty evidence or missing-receipt exception. No currency conversion. Claimant is the authenticated creator.","properties":{"currency":{"description":"Supported two-decimal currencies; no exchange conversion.","enum":["USD","CAD","EUR","GBP","AUD","NZD","CHF"],"type":"string"},"evidence":{"items":{"additionalProperties":false,"properties":{"document_version_id":{"minimum":1,"type":"integer"},"file_id":{"minimum":1,"type":"integer"}},"required":["file_id","document_version_id"],"type":"object"},"maxItems":20,"type":"array"},"exception":{"additionalProperties":false,"nullable":true,"properties":{"kind":{"enum":["lost_receipt","merchant_not_issued"],"type":"string"},"reason":{"maxLength":2000,"minLength":10,"type":"string"}},"required":["kind","reason"],"type":"object"},"lines":{"items":{"additionalProperties":false,"properties":{"amount":{"description":"Positive decimal, maximum 9999999999.99, at most two fractional digits; zero rejected.","pattern":"^(0|[1-9]\\d{0,9})(\\.\\d{1,2})?$","type":"string"},"cost_code_id":{"minimum":1,"type":"integer"},"description":{"maxLength":500,"minLength":1,"type":"string"}},"required":["description","cost_code_id","amount"],"type":"object"},"maxItems":100,"minItems":1,"type":"array"},"merchant":{"maxLength":200,"minLength":1,"type":"string"},"occurred_on":{"format":"date","type":"string"},"purpose":{"maxLength":4000,"minLength":3,"type":"string"}},"required":["merchant","purpose","occurred_on","currency","lines"],"type":"object"},"request_key":{"description":"Stable claimant-scoped key; replay returns the original report, changed payload returns409.","format":"uuid","type":"string"}},"required":["report","request_key"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/expense_reports_ExpenseReport"}}},"description":"Success"},"401":{"description":"Unauthenticated"},"403":{"description":"Permission or source scope denied"},"404":{"description":"Not found or not visible"},"409":{"description":"Stale version or invalid transition"},"422":{"description":"Invalid input or evidence"}},"summary":"POST /rest/v1.0/projects/{project_id}/expense_reports","tags":["expense_reports"],"x-os-idempotent":true,"x-os-module":"expense_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/expense_reports/reimbursement_payees":{"post":{"description":"Requires expense report admin, accounting manageVendorBanking with unrestricted entity access, accounting step-up, expense_reports:read/write and accounting:write scopes. Active same-company project claimant and payee; mapper cannot be claimant. One vendor maps to one claimant. expected_version=0 creates; changes use current version and an audited identity-verification reason.","operationId":"createProjectExpenseReportsReimbursementPayee","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/expense_reports_ReimbursementPayeeInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"claimant_id":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"vendor_id":{"minimum":1,"type":"integer"},"version":{"minimum":1,"type":"integer"}},"required":["id","claimant_id","vendor_id","version"],"type":"object"}}},"description":"Mapping identity, claimant, vendor and new version"},"401":{"description":"Unauthenticated"},"403":{"description":"Scope, independent actor, evidence or accounting authority refused"},"404":{"description":"Not found"},"409":{"description":"Stale claim/mapping, changed retry or existing handoff"},"422":{"description":"Invalid payee, account, currency or evidence"}},"summary":"POST /rest/v1.0/projects/{project_id}/expense_reports/reimbursement_payees","tags":["expense_reports"],"x-os-idempotent":true,"x-os-module":"expense_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/expense_reports/{id}":{"get":{"operationId":"getProjectExpenseReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/expense_reports_ExpenseReport"}}},"description":"Success"},"401":{"description":"Unauthenticated"},"403":{"description":"Permission or source scope denied"},"404":{"description":"Not found or not visible"},"409":{"description":"Stale version or invalid transition"},"422":{"description":"Invalid input or evidence"}},"summary":"GET /rest/v1.0/projects/{project_id}/expense_reports/{id}","tags":["expense_reports"],"x-os-idempotent":false,"x-os-module":"expense_reports","x-os-paginated":false},"patch":{"operationId":"updateProjectExpenseReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expected_version":{"minimum":1,"type":"integer"},"report":{"additionalProperties":false,"description":"Provide exactly one receipt basis: nonempty evidence or missing-receipt exception. No currency conversion. Claimant is the authenticated creator.","properties":{"currency":{"description":"Supported two-decimal currencies; no exchange conversion.","enum":["USD","CAD","EUR","GBP","AUD","NZD","CHF"],"type":"string"},"evidence":{"items":{"additionalProperties":false,"properties":{"document_version_id":{"minimum":1,"type":"integer"},"file_id":{"minimum":1,"type":"integer"}},"required":["file_id","document_version_id"],"type":"object"},"maxItems":20,"type":"array"},"exception":{"additionalProperties":false,"nullable":true,"properties":{"kind":{"enum":["lost_receipt","merchant_not_issued"],"type":"string"},"reason":{"maxLength":2000,"minLength":10,"type":"string"}},"required":["kind","reason"],"type":"object"},"lines":{"items":{"additionalProperties":false,"properties":{"amount":{"description":"Positive decimal, maximum 9999999999.99, at most two fractional digits; zero rejected.","pattern":"^(0|[1-9]\\d{0,9})(\\.\\d{1,2})?$","type":"string"},"cost_code_id":{"minimum":1,"type":"integer"},"description":{"maxLength":500,"minLength":1,"type":"string"}},"required":["description","cost_code_id","amount"],"type":"object"},"maxItems":100,"minItems":1,"type":"array"},"merchant":{"maxLength":200,"minLength":1,"type":"string"},"occurred_on":{"format":"date","type":"string"},"purpose":{"maxLength":4000,"minLength":3,"type":"string"}},"required":["merchant","purpose","occurred_on","currency","lines"],"type":"object"}},"required":["expected_version","report"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/expense_reports_ExpenseReport"}}},"description":"Success"},"401":{"description":"Unauthenticated"},"403":{"description":"Permission or source scope denied"},"404":{"description":"Not found or not visible"},"409":{"description":"Stale version or invalid transition"},"422":{"description":"Invalid input or evidence"}},"summary":"PATCH /rest/v1.0/projects/{project_id}/expense_reports/{id}","tags":["expense_reports"],"x-os-idempotent":true,"x-os-module":"expense_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/expense_reports/{id}/reimbursement":{"get":{"description":"Requires expense report admin, expense_reports:read/write and accounting:write; returns management choices without receipt URLs. Receipt evidence additionally requires documents:read and live ACL access.","operationId":"listProjectExpenseReportReimbursement","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Scoped claimant, payee, coding choices and existing bill link"},"401":{"description":"Unauthenticated"},"403":{"description":"Scope, independent actor, evidence or accounting authority refused"},"404":{"description":"Not found"},"409":{"description":"Stale claim/mapping, changed retry or existing handoff"},"422":{"description":"Invalid payee, account, currency or evidence"}},"summary":"GET /rest/v1.0/projects/{project_id}/expense_reports/{id}/reimbursement","tags":["expense_reports"],"x-os-idempotent":false,"x-os-module":"expense_reports","x-os-paginated":false},"post":{"description":"Creates only a draft AP bill from the current approved revision. Explicit verified employee/payee mapping; claimant, reviewer and converter must differ. Currency must match both company base and entity functional currency. Amount, company, entity and payee cannot be supplied. Identical same-converter request replays its original bill forever, including after void. Changed retry conflicts. Source evidence remains protected in Expense Reports.","operationId":"reimbursementProjectExpenseReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/expense_reports_ReimbursementInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/expense_reports_ReimbursementResult"}}},"description":"Created draft or exact replay"},"401":{"description":"Unauthenticated"},"403":{"description":"Scope, independent actor, evidence or accounting authority refused"},"404":{"description":"Not found"},"409":{"description":"Stale claim/mapping, changed retry or existing handoff"},"422":{"description":"Invalid payee, account, currency or evidence"}},"summary":"POST /rest/v1.0/projects/{project_id}/expense_reports/{id}/reimbursement","tags":["expense_reports"],"x-os-idempotent":true,"x-os-module":"expense_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/expense_reports/{id}/transitions":{"post":{"operationId":"createProjectExpenseReportTransition","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"accept_missing_receipt":{"default":false,"type":"boolean"},"action":{"enum":["submit","approve","return","reject"],"type":"string"},"expected_version":{"minimum":1,"type":"integer"},"reason":{"maxLength":2000,"type":"string"}},"required":["expected_version","action"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/expense_reports_ExpenseReport"}}},"description":"Success"},"401":{"description":"Unauthenticated"},"403":{"description":"Permission or source scope denied"},"404":{"description":"Not found or not visible"},"409":{"description":"Stale version or invalid transition"},"422":{"description":"Invalid input or evidence"}},"summary":"POST /rest/v1.0/projects/{project_id}/expense_reports/{id}/transitions","tags":["expense_reports"],"x-os-idempotent":true,"x-os-module":"expense_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/form_templates":{"get":{"operationId":"listProjectFormTemplates","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"archived_at":{"format":"date-time","nullable":true,"type":"string"},"assign_to_new_projects":{"type":"boolean"},"attachment":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Company Form Templates from Project","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/form_templates/{id}":{"get":{"operationId":"getProjectFormTemplate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"archived_at":{"format":"date-time","nullable":true,"type":"string"},"assign_to_new_projects":{"type":"boolean"},"attachment":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Company Form Template from Project","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/forms":{"get":{"operationId":"listProjectForms","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[form_template_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[search]","schema":{"type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"sort","schema":{"enum":["created_by","description","name","created_at","updated_at"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachment":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted":{"type":"boolean"},"download_all_uuid":{"additionalProperties":true,"nullable":true,"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"form_template_id":{"type":"integer"},"form_template_name":{"type":"string"},"holder_class":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"permissions":{"properties":{"can_destroy":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_email":{"type":"boolean"},"can_view_change_history":{"type":"boolean"},"can_view_download_log":{"type":"boolean"}},"type":"object"},"private":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"viewable":{"type":"boolean"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Forms on a project","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":true},"post":{"operationId":"createProjectForm","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"form":{"properties":{"fillable_pdf_prostore_file_id":{"type":"integer"},"fillable_pdf_upload_id":{"type":"string"},"form_template_id":{"type":"integer"},"name":{"type":"string"},"private":{"default":false,"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"required":["name","description","form_template_id","fillable_pdf_prostore_file_id"],"title":"Form","type":"object"}},"required":["form"],"title":"Body","type":"object"}},"multipart/form-data":{"schema":{"properties":{"form":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"fillable_pdf":{"format":"binary","type":"string"},"form_template_id":{"type":"integer"},"name":{"type":"string"},"private":{"default":false,"type":"boolean"}},"required":["name","description","form_template_id","fillable_pdf"],"title":"Form","type":"object"}},"required":["form"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachment":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted":{"type":"boolean"},"download_all_uuid":{"additionalProperties":true,"nullable":true,"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"form_template_id":{"type":"integer"},"form_template_name":{"type":"string"},"holder_class":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"permissions":{"properties":{"can_destroy":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_email":{"type":"boolean"},"can_view_change_history":{"type":"boolean"},"can_view_download_log":{"type":"boolean"}},"type":"object"},"private":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"viewable":{"type":"boolean"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Form","tags":["forms"],"x-os-idempotent":true,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/forms/create_from_template":{"post":{"operationId":"createProjectFormsCreateFromTemplate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create form from template","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/forms/create_with_files":{"post":{"operationId":"createProjectFormsCreateWithFile","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create form with files","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/forms/{id}":{"delete":{"operationId":"deleteProjectForm","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"500":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Form","tags":["forms"],"x-os-idempotent":true,"x-os-module":"forms","x-os-paginated":false},"get":{"operationId":"getProjectForm","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachment":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted":{"type":"boolean"},"download_all_uuid":{"additionalProperties":true,"nullable":true,"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"form_template_id":{"type":"integer"},"form_template_name":{"type":"string"},"holder_class":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"permissions":{"properties":{"can_destroy":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_email":{"type":"boolean"},"can_view_change_history":{"type":"boolean"},"can_view_download_log":{"type":"boolean"}},"type":"object"},"private":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"viewable":{"type":"boolean"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Form","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":false},"patch":{"operationId":"updateProjectForm","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"send_emails","schema":{"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"form":{"properties":{"fillable_pdf_prostore_file_id":{"type":"integer"},"fillable_pdf_upload_id":{"type":"string"},"name":{"type":"string"},"private":{"default":false,"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"title":"Form","type":"object"}},"required":["form"],"title":"Body","type":"object"}},"multipart/form-data":{"schema":{"properties":{"form":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"fillable_pdf":{"format":"binary","type":"string"},"name":{"type":"string"},"private":{"default":false,"type":"boolean"}},"title":"Form","type":"object"}},"required":["form"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachment":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted":{"type":"boolean"},"download_all_uuid":{"additionalProperties":true,"nullable":true,"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"form_template_id":{"type":"integer"},"form_template_name":{"type":"string"},"holder_class":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"permissions":{"properties":{"can_destroy":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_email":{"type":"boolean"},"can_view_change_history":{"type":"boolean"},"can_view_download_log":{"type":"boolean"}},"type":"object"},"private":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"viewable":{"type":"boolean"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Form","tags":["forms"],"x-os-idempotent":true,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/forms/{id}/attachments":{"post":{"operationId":"createProjectFormAttachment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Upload form attachment","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/forms/{id}/document":{"get":{"description":"Requires the `view` permission on the project's forms tool. A scoped API token needs `forms:read`.","operationId":"listProjectFormDocument","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"download","schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"File to upload.","format":"binary","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Generate form document","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":false},"post":{"operationId":"documentProjectForm","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Generate form document","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/forms/{id}/field_values":{"patch":{"operationId":"updateProjectFormFieldValues","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Update form field values","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/generic_tools/{generic_tool_id}/generic_tool_items":{"get":{"operationId":"listProjectGenericToolGenericToolItems","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"assignee":{"nullable":true,"properties":{"company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assignees":{"items":{"nullable":true,"properties":{"company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"closed_at":{"nullable":true,"type":"string"},"cost_code":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"type":"object"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"nullable":true,"type":"string"},"generic_tool":{"properties":{"abbreviation":{"nullable":true,"type":"string"},"fields":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"private_by_default":{"type":"boolean"},"title":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"issued_at":{"nullable":true,"type":"string"},"location":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"}},"type":"object"},"number":{"type":"string"},"position":{"type":"string"},"private":{"type":"boolean"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"schedule_impact":{"nullable":true,"type":"string"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"},"status":{"type":"string"},"status_type":{"type":"string"},"title":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","number","title","status","generic_tool"],"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}}},"summary":"List Correspondence Items","tags":["correspondence"],"x-os-idempotent":false,"x-os-module":"correspondence","x-os-paginated":false},"post":{"operationId":"createProjectGenericToolGenericToolItem","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"assignee":{"nullable":true,"properties":{"company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assignees":{"items":{"nullable":true,"properties":{"company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"type":"object"},"type":"array"},"ball_in_court_ids":{"items":{"type":"integer"},"type":"array"},"closed_at":{"nullable":true,"type":"string"},"cost_code":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"type":"object"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"nullable":true,"type":"string"},"generic_tool":{"properties":{"abbreviation":{"nullable":true,"type":"string"},"fields":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"private_by_default":{"type":"boolean"},"title":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"issued_at":{"nullable":true,"type":"string"},"location":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"}},"type":"object"},"number":{"type":"string"},"position":{"type":"string"},"private":{"type":"boolean"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"responses":{"items":{"properties":{"attachments":{"items":{},"type":"array"},"created_at":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"item_id":{"type":"integer"},"notes":{"type":"string"},"official":{"type":"boolean"},"status":{"type":"string"}},"required":["id","item_id","status"],"type":"object"},"type":"array"},"schedule_impact":{"nullable":true,"type":"string"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"},"status":{"type":"string"},"status_type":{"type":"string"},"title":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","number","title","status","generic_tool"],"type":"object"}}}}},"summary":"Create Correspondence Item","tags":["correspondence"],"x-os-idempotent":true,"x-os-module":"correspondence","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/generic_tools/{generic_tool_id}/generic_tool_items/available_statuses":{"get":{"operationId":"listProjectGenericToolGenericToolItemsAvailableStatuses","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"label":{"type":"string"},"status_type":{"type":"string"},"value":{"type":"string"}},"required":["value","label"],"type":"object"},"type":"array"}}}}},"summary":"Available Statuses","tags":["correspondence"],"x-os-idempotent":false,"x-os-module":"correspondence","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/generic_tools/{generic_tool_id}/generic_tool_items/{generic_tool_item_id}":{"delete":{"operationId":"deleteProjectGenericToolGenericToolItem","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete generic tool item","tags":["correspondence"],"x-os-idempotent":false,"x-os-module":"correspondence","x-os-paginated":false},"get":{"operationId":"getProjectGenericToolGenericToolItem","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignee":{"nullable":true,"properties":{"company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assignees":{"items":{"nullable":true,"properties":{"company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"type":"object"},"type":"array"},"ball_in_court_ids":{"items":{"type":"integer"},"type":"array"},"closed_at":{"nullable":true,"type":"string"},"cost_code":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"type":"object"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"nullable":true,"type":"string"},"generic_tool":{"properties":{"abbreviation":{"nullable":true,"type":"string"},"fields":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"private_by_default":{"type":"boolean"},"title":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"issued_at":{"nullable":true,"type":"string"},"location":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"}},"type":"object"},"number":{"type":"string"},"position":{"type":"string"},"private":{"type":"boolean"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"responses":{"items":{"properties":{"attachments":{"items":{},"type":"array"},"created_at":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"item_id":{"type":"integer"},"notes":{"type":"string"},"official":{"type":"boolean"},"status":{"type":"string"}},"required":["id","item_id","status"],"type":"object"},"type":"array"},"schedule_impact":{"nullable":true,"type":"string"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"},"status":{"type":"string"},"status_type":{"type":"string"},"title":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","number","title","status","generic_tool"],"type":"object"}}}}},"summary":"Show Correspondence Item","tags":["correspondence"],"x-os-idempotent":false,"x-os-module":"correspondence","x-os-paginated":false},"patch":{"operationId":"updateProjectGenericToolGenericToolItem","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignee":{"nullable":true,"properties":{"company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assignees":{"items":{"nullable":true,"properties":{"company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"type":"object"},"type":"array"},"ball_in_court_ids":{"items":{"type":"integer"},"type":"array"},"closed_at":{"nullable":true,"type":"string"},"cost_code":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"type":"object"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"nullable":true,"type":"string"},"generic_tool":{"properties":{"abbreviation":{"nullable":true,"type":"string"},"fields":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"private_by_default":{"type":"boolean"},"title":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"issued_at":{"nullable":true,"type":"string"},"location":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"}},"type":"object"},"number":{"type":"string"},"position":{"type":"string"},"private":{"type":"boolean"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"responses":{"items":{"properties":{"attachments":{"items":{},"type":"array"},"created_at":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"item_id":{"type":"integer"},"notes":{"type":"string"},"official":{"type":"boolean"},"status":{"type":"string"}},"required":["id","item_id","status"],"type":"object"},"type":"array"},"schedule_impact":{"nullable":true,"type":"string"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"},"status":{"type":"string"},"status_type":{"type":"string"},"title":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","number","title","status","generic_tool"],"type":"object"}}}}},"summary":"Update Correspondence Item","tags":["correspondence"],"x-os-idempotent":true,"x-os-module":"correspondence","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/generic_tools/{generic_tool_id}/generic_tool_items/{generic_tool_item_id}/attachments":{"post":{"operationId":"createProjectGenericToolGenericToolItemAttachment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Upload generic tool item attachment","tags":["correspondence"],"x-os-idempotent":false,"x-os-module":"correspondence","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/generic_tools/{generic_tool_id}/generic_tool_items/{generic_tool_item_id}/generic_tool_item_responses":{"get":{"operationId":"listProjectGenericToolGenericToolItemGenericToolItemResponses","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{},"type":"array"},"created_at":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"item_id":{"type":"integer"},"notes":{"type":"string"},"official":{"type":"boolean"},"status":{"type":"string"}},"required":["id","item_id","status"],"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}}},"summary":"List Item Responses","tags":["correspondence"],"x-os-idempotent":false,"x-os-module":"correspondence","x-os-paginated":false},"post":{"operationId":"createProjectGenericToolGenericToolItemGenericToolItemResponse","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"generic_tool_item_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{},"type":"array"},"created_at":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"item_id":{"type":"integer"},"notes":{"type":"string"},"official":{"type":"boolean"},"status":{"type":"string"}},"required":["id","item_id","status"],"type":"object"}}}}},"summary":"Create Item Response","tags":["correspondence"],"x-os-idempotent":true,"x-os-module":"correspondence","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/incidents":{"get":{"operationId":"listProjectIncidents","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":1000,"maximum":1000,"minimum":1,"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[event_date]","required":false,"schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[location_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[status]","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[contributing_behavior_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[contributing_condition_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[hazard_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[time_unknown]","schema":{"default":false,"type":"boolean"}},{"in":"query","name":"filters[recordable]","required":false,"schema":{"type":"boolean"}},{"explode":false,"in":"query","name":"filters[with_record_types]","required":false,"schema":{"items":{"enum":["injury","near_miss","environmental","property_damage"],"type":"string"},"type":"array"},"style":"form"},{"in":"query","name":"filters[has_root_cause_analysis]","required":false,"schema":{"type":"boolean"}},{"explode":false,"in":"query","name":"filters[custom_status_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[type_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[assignee_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"sort","schema":{"enum":["contributing_behavior","contributing_condition","created_at","event_date","hazard","number","recordable","records_count","title"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"actions_count":{"type":"integer"},"attachments_count":{"type":"integer"},"closed_observations_count":{"type":"integer"},"contributing_behavior":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Contributing Behavior","type":"object"},"contributing_condition":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Contributing Condition","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"event_date":{"format":"date-time","type":"string"},"hazard":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Hazard","type":"object"},"id":{"type":"integer"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"integer"},"open_observations_count":{"type":"integer"},"private":{"type":"boolean"},"recordable":{"type":"boolean"},"records_count":{"type":"integer"},"status":{"enum":["open","closed"],"type":"string"},"time_unknown":{"type":"boolean"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"witness_statements_count":{"type":"integer"}},"title":"IncidentCompact","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Incidents","tags":["incidents"],"x-os-idempotent":false,"x-os-module":"incidents","x-os-paginated":true},"post":{"operationId":"createProjectIncident","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","schema":{"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"incident":{"properties":{"assignee_ids":{"items":{"type":"integer"},"type":"array"},"contributing_behavior_id":{"type":"integer"},"contributing_condition_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_status_id":{"type":"integer"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"environmentals":{"items":{"properties":{"affected_company_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"environmental_type_id":{"type":"integer"},"estimated_cost_impact":{"format":"float","type":"number"},"managed_equipment_id":{"type":"integer"},"quantity_unit_of_measure":{"enum":["hours","days","weeks","months","years","ea","ls","lf","sf","sy","cy","lbs","ton","mm","m","m^2","m^3","kg","t"],"type":"string"},"quantity_value":{"format":"float","type":"number"},"work_activity_id":{"type":"integer"}},"title":"IncidentEnvironmentalUpdateParameters","type":"object"},"type":"array"},"event_date":{"format":"date-time","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"hazard_id":{"type":"integer"},"image_ids":{"items":{"type":"integer"},"type":"array"},"injuries":{"items":{"properties":{"affected_body_parts":{"items":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"type":"array"},"affected_company_id":{"type":"integer"},"affected_party_id":{"type":"integer"},"affected_person_id":{"type":"integer"},"affliction_type_id":{"type":"integer"},"body_diagram_type":{"enum":["feminine","masculine"],"type":"string"},"body_part_ids":{"items":{"type":"integer"},"type":"array"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"date_of_death":{"format":"date-time","type":"string"},"filing_type":{"enum":["fatality","first_aid","lost_time","medically_treated","refused_care","report_only","restricted_work"],"type":"string"},"harm_source_id":{"type":"integer"},"hospitalized_overnight":{"type":"boolean"},"managed_equipment_id":{"type":"integer"},"recordable":{"type":"boolean"},"treated_in_er":{"type":"boolean"},"treatment_facility":{"type":"string"},"treatment_facility_address":{"type":"string"},"treatment_provider":{"type":"string"},"work_activity_id":{"type":"integer"},"work_days_absent":{"type":"integer"},"work_days_restricted":{"type":"integer"},"work_days_transferred":{"type":"integer"}},"title":"IncidentInjuryUpdateParameters","type":"object"},"type":"array"},"location_id":{"type":"integer"},"near_misses":{"items":{"properties":{"affected_company_id":{"type":"integer"},"affected_party_id":{"type":"integer"},"affected_person_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"harm_source_id":{"type":"integer"},"managed_equipment_id":{"type":"integer"},"work_activity_id":{"type":"integer"}},"title":"IncidentNearMissUpdateParameters","type":"object"},"type":"array"},"private":{"type":"boolean"},"property_damages":{"items":{"properties":{"affected_company_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"estimated_cost_impact":{"format":"float","type":"number"},"managed_equipment_id":{"type":"integer"},"responsible_company_id":{"type":"integer"},"work_activity_id":{"type":"integer"}},"title":"IncidentPropertyDamageUpdateParameters","type":"object"},"type":"array"},"recordable":{"type":"boolean"},"status":{"enum":["open","closed"],"type":"string"},"time_unknown":{"type":"boolean"},"title":{"type":"string"},"type_id":{"type":"integer"},"upload_uuids":{"items":{"type":"string"},"type":"array"},"witness_statements_attributes":{"items":{"properties":{"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"date_received":{"format":"date","type":"string"},"statement":{"type":"string"},"witness_id":{"type":"integer"}},"title":"IncidentWitnessStatementUpdateParameters","type":"object"},"type":"array"}},"type":"object"}},"required":["incident"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"actions_count":{"type":"integer"},"attachments_count":{"type":"integer"},"closed_observations_count":{"type":"integer"},"contributing_behavior":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Contributing Behavior","type":"object"},"contributing_condition":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Contributing Condition","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"event_date":{"format":"date-time","type":"string"},"hazard":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Hazard","type":"object"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"integer"},"open_observations_count":{"type":"integer"},"private":{"type":"boolean"},"recordable":{"type":"boolean"},"records_count":{"type":"integer"},"status":{"enum":["open","closed"],"type":"string"},"time_unknown":{"type":"boolean"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"witness_statements_count":{"type":"integer"}},"title":"IncidentCompact","type":"object"},{"properties":{"actions":{"items":{"properties":{"action_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Action Type","type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"observation_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"assignees":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"title":"Incident Attachment","type":"object"},"type":"array"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"environmentals":{"items":{"allOf":[{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"environmental_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Environmental Type","type":"object"},"estimated_cost_impact":{"type":"string"},"quantity_unit_of_measure":{"enum":["hours","days","weeks","months","years","ea","ls","lf","sf","sy","cy","lbs","ton","mm","m","m^2","m^3","kg","t"],"type":"string"},"quantity_value":{"type":"string"},"type":{"type":"string"}},"type":"object"},{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"},"recordable":{"type":"boolean"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"}]},"type":"array"},"injuries":{"items":{"allOf":[{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"affected_body_parts":{"items":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"type":"array"},"affected_party":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Party","type":"object"},"affected_person":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"affliction_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"afflictions":{"items":{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"affliction_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"id":{"type":"integer"}},"title":"IncidentAffliction","type":"object"},"type":"array"},"body_diagram_type":{"enum":["feminine","masculine"],"type":"string"},"body_parts":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"type":"integer"},"selectable":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"}},"title":"Body Part","type":"object"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_of_death":{"format":"date","type":"string"},"date_returned_to_work":{"format":"date","type":"string"},"filing_type":{"enum":["fatality","first_aid","lost_time","medically_treated","refused_care","report_only","restricted_work"],"type":"string"},"harm_source":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Harm Source","type":"object"},"hospitalized_overnight":{"type":"boolean"},"treated_in_er":{"type":"boolean"},"treatment_facility":{"type":"string"},"treatment_facility_address":{"type":"string"},"treatment_provider":{"type":"string"},"type":{"type":"string"},"work_days_absent":{"type":"integer"},"work_days_restricted":{"type":"integer"},"work_days_transferred":{"type":"integer"}},"type":"object"},{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"},"recordable":{"type":"boolean"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"}]},"type":"array"},"near_misses":{"items":{"allOf":[{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"},"recordable":{"type":"boolean"},"type":{"type":"string"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"},{"properties":{"affected_party":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Party","type":"object"},"affected_person":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"harm_source":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Harm Source","type":"object"}},"type":"object"}]},"type":"array"},"property_damages":{"items":{"allOf":[{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"estimated_cost_impact":{"type":"string"},"responsible_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":{"type":"string"}},"type":"object"},{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"}]},"type":"array"},"type":{"nullable":true,"properties":{"active":{"type":"boolean"},"default":{"type":"boolean"},"global_type":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"witness_statements":{"items":{"properties":{"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_received":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"statement":{"type":"string"},"statement_plain_text":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"witness":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"}},"type":"object"}],"title":"IncidentNormal"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Incident","tags":["incidents"],"x-os-idempotent":true,"x-os-module":"incidents","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/incidents/actions":{"get":{"operationId":"listProjectIncidentsActions","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"incident_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"sort","schema":{"enum":["created_at","updated_at","action_type"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"action_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"name_key":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Action Type","type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"},"viewable_document_id":{"nullable":true,"type":"integer"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"observation_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Actions","tags":["incidents"],"x-os-idempotent":false,"x-os-module":"incidents","x-os-paginated":true},"post":{"operationId":"createProjectIncidentsAction","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","schema":{"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"incident_action":{"properties":{"action_type_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"incident_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"required":["incident_id","action_type_id"],"type":"object"}},"required":["incident_action"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"action_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"name_key":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Action Type","type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"},"viewable_document_id":{"nullable":true,"type":"integer"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"observation_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Action","tags":["incidents"],"x-os-idempotent":true,"x-os-module":"incidents","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/incidents/actions/{id}":{"delete":{"description":"Soft-delete the corrective action. Needs incidents delete permission and visibility of the parent incident.","operationId":"deleteProjectIncidentsAction","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"incident_id","required":false,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Destroy Action","tags":["incidents"],"x-os-idempotent":true,"x-os-module":"incidents","x-os-paginated":false},"get":{"operationId":"getProjectIncidentsAction","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"incident_id","required":false,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"action_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"name_key":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Action Type","type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"},"viewable_document_id":{"nullable":true,"type":"integer"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"observation_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Action","tags":["incidents"],"x-os-idempotent":false,"x-os-module":"incidents","x-os-paginated":false},"patch":{"operationId":"updateProjectIncidentsAction","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"incident_id","required":false,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","schema":{"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"incident_action":{"properties":{"action_type_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"incident_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"required":["incident_action"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"action_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"name_key":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Action Type","type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"},"viewable_document_id":{"nullable":true,"type":"integer"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"observation_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Action","tags":["incidents"],"x-os-idempotent":true,"x-os-module":"incidents","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/incidents/filter_options/assignees":{"get":{"operationId":"listProjectIncidentsFilterOptionsAssignees","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"key":{"type":"string"}},"type":"object"},{"properties":{"value":{"type":"string"}},"title":"IncidentFilterOption","type":"object"}]},"type":"array"}}},"headers":{"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Get Assignee Filter Options","tags":["incidents"],"x-os-idempotent":false,"x-os-module":"incidents","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/incidents/filter_options/locations":{"get":{"operationId":"listProjectIncidentsFilterOptionsLocations","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"key":{"type":"string"}},"type":"object"},{"properties":{"value":{"type":"string"}},"title":"IncidentFilterOption","type":"object"}]},"type":"array"}}},"headers":{"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Get Location Filter Options","tags":["incidents"],"x-os-idempotent":false,"x-os-module":"incidents","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/incidents/filter_options/statuses":{"get":{"operationId":"listProjectIncidentsFilterOptionsStatuses","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"key":{"type":"string"}},"type":"object"},{"properties":{"value":{"type":"string"}},"title":"IncidentFilterOption","type":"object"}]},"type":"array"}}},"headers":{"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Get Status Filter Options","tags":["incidents"],"x-os-idempotent":false,"x-os-module":"incidents","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/incidents/injuries":{"get":{"operationId":"listProjectIncidentsInjuries","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"incident_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[affected_company_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[affected_party_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[affected_person_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[harm_source_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[work_activity_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[managed_equipment_id]","schema":{"type":"integer"}},{"in":"query","name":"filters[recordable]","required":false,"schema":{"type":"boolean"}},{"explode":false,"in":"query","name":"filters[affected_body_part]","required":false,"schema":{"items":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[affliction_type_id]","required":false,"schema":{"type":"integer"},"style":"form"},{"explode":false,"in":"query","name":"filters[body_part_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[filing_type]","required":false,"schema":{"items":{"enum":["fatality","first_aid","lost_time","medically_treated","refused_care","report_only","restricted_work"],"type":"string"},"type":"array"},"style":"form"},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"sort","schema":{"enum":["affected_company","affected_person","created_at","full_number","harm_source","managed_equipment","number","recordable","work_activity"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right",null],"nullable":true,"type":"string"},"affected_body_parts":{"items":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"type":"array"},"affected_party":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Party","type":"object"},"affected_person":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"affliction_type":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"afflictions":{"items":{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"affliction_type":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"id":{"type":"integer"}},"title":"IncidentAffliction","type":"object"},"type":"array"},"body_diagram_type":{"enum":["feminine","masculine",null],"nullable":true,"type":"string"},"body_parts":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"selectable":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"}},"title":"Body Part","type":"object"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_of_death":{"format":"date","type":"string"},"date_returned_to_work":{"format":"date","type":"string"},"filing_type":{"enum":["fatality","first_aid","lost_time","medically_treated","refused_care","report_only","restricted_work"],"type":"string"},"harm_source":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Harm Source","type":"object"},"hospitalized_overnight":{"type":"boolean"},"recordable":{"type":"boolean"},"treated_in_er":{"type":"boolean"},"treatment_facility":{"type":"string"},"treatment_facility_address":{"type":"string"},"treatment_provider":{"nullable":true,"type":"string"},"type":{"type":"string"},"work_days_absent":{"type":"integer"},"work_days_restricted":{"type":"integer"},"work_days_transferred":{"type":"integer"}},"type":"object"},{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Injuries","tags":["incidents"],"x-os-idempotent":false,"x-os-module":"incidents","x-os-paginated":true},"post":{"operationId":"createProjectIncidentsInjury","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","schema":{"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"injury":{"properties":{"affected_body_parts":{"items":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"type":"array"},"affected_company_id":{"type":"integer"},"affected_party_id":{"type":"integer"},"affected_person_id":{"type":"integer"},"affliction_type_id":{"type":"integer"},"body_diagram_type":{"enum":["feminine","masculine"],"type":"string"},"body_part_ids":{"items":{"type":"integer"},"type":"array"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"date_of_death":{"format":"date","type":"string"},"date_returned_to_work":{"format":"date","type":"string"},"filing_type":{"enum":["fatality","first_aid","lost_time","medically_treated","refused_care","report_only","restricted_work"],"type":"string"},"harm_source_id":{"type":"integer"},"hospitalized_overnight":{"type":"boolean"},"incident_id":{"type":"integer"},"managed_equipment_id":{"type":"integer"},"recordable":{"type":"boolean"},"treated_in_er":{"type":"boolean"},"treatment_facility":{"type":"string"},"treatment_facility_address":{"type":"string"},"treatment_provider":{"type":"string"},"work_activity_id":{"type":"integer"},"work_days_absent":{"type":"integer"},"work_days_restricted":{"type":"integer"},"work_days_transferred":{"type":"integer"}},"required":["incident_id"],"title":"IncidentInjuryCreateParameters","type":"object"}},"required":["injury"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right",null],"nullable":true,"type":"string"},"affected_body_parts":{"items":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"type":"array"},"affected_party":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Party","type":"object"},"affected_person":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"affliction_type":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"afflictions":{"items":{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"affliction_type":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"id":{"type":"integer"}},"title":"IncidentAffliction","type":"object"},"type":"array"},"body_diagram_type":{"enum":["feminine","masculine",null],"nullable":true,"type":"string"},"body_parts":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"selectable":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"}},"title":"Body Part","type":"object"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_of_death":{"format":"date","type":"string"},"date_returned_to_work":{"format":"date","type":"string"},"filing_type":{"enum":["fatality","first_aid","lost_time","medically_treated","refused_care","report_only","restricted_work"],"type":"string"},"harm_source":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Harm Source","type":"object"},"hospitalized_overnight":{"type":"boolean"},"recordable":{"type":"boolean"},"treated_in_er":{"type":"boolean"},"treatment_facility":{"type":"string"},"treatment_facility_address":{"type":"string"},"treatment_provider":{"nullable":true,"type":"string"},"type":{"type":"string"},"work_days_absent":{"type":"integer"},"work_days_restricted":{"type":"integer"},"work_days_transferred":{"type":"integer"}},"type":"object"},{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Injury","tags":["incidents"],"x-os-idempotent":true,"x-os-module":"incidents","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/incidents/injuries/{id}":{"delete":{"description":"Soft-delete the injury/illness record (incident creator or an admin only). Needs incidents delete permission and visibility of the parent incident.","operationId":"deleteProjectIncidentsInjury","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"incident_id","required":false,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Destroy Injury","tags":["incidents"],"x-os-idempotent":true,"x-os-module":"incidents","x-os-paginated":false},"get":{"operationId":"getProjectIncidentsInjury","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"incident_id","required":false,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right",null],"nullable":true,"type":"string"},"affected_body_parts":{"items":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"type":"array"},"affected_party":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Party","type":"object"},"affected_person":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"affliction_type":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"afflictions":{"items":{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"affliction_type":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"id":{"type":"integer"}},"title":"IncidentAffliction","type":"object"},"type":"array"},"body_diagram_type":{"enum":["feminine","masculine",null],"nullable":true,"type":"string"},"body_parts":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"selectable":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"}},"title":"Body Part","type":"object"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_of_death":{"format":"date","type":"string"},"date_returned_to_work":{"format":"date","type":"string"},"filing_type":{"enum":["fatality","first_aid","lost_time","medically_treated","refused_care","report_only","restricted_work"],"type":"string"},"harm_source":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Harm Source","type":"object"},"hospitalized_overnight":{"type":"boolean"},"recordable":{"type":"boolean"},"treated_in_er":{"type":"boolean"},"treatment_facility":{"type":"string"},"treatment_facility_address":{"type":"string"},"treatment_provider":{"nullable":true,"type":"string"},"type":{"type":"string"},"work_days_absent":{"type":"integer"},"work_days_restricted":{"type":"integer"},"work_days_transferred":{"type":"integer"}},"type":"object"},{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Injury","tags":["incidents"],"x-os-idempotent":false,"x-os-module":"incidents","x-os-paginated":false},"patch":{"operationId":"updateProjectIncidentsInjury","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"incident_id","required":false,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","schema":{"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"injury":{"properties":{"affected_body_parts":{"items":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"type":"array"},"affected_company_id":{"type":"integer"},"affected_party_id":{"type":"integer"},"affected_person_id":{"type":"integer"},"affliction_type_id":{"type":"integer"},"body_diagram_type":{"enum":["feminine","masculine"],"type":"string"},"body_part_ids":{"items":{"type":"integer"},"type":"array"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"date_of_death":{"format":"date-time","type":"string"},"filing_type":{"enum":["fatality","first_aid","lost_time","medically_treated","refused_care","report_only","restricted_work"],"type":"string"},"harm_source_id":{"type":"integer"},"hospitalized_overnight":{"type":"boolean"},"managed_equipment_id":{"type":"integer"},"recordable":{"type":"boolean"},"treated_in_er":{"type":"boolean"},"treatment_facility":{"type":"string"},"treatment_facility_address":{"type":"string"},"treatment_provider":{"type":"string"},"work_activity_id":{"type":"integer"},"work_days_absent":{"type":"integer"},"work_days_restricted":{"type":"integer"},"work_days_transferred":{"type":"integer"}},"title":"IncidentInjuryUpdateParameters","type":"object"}},"required":["injury"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right",null],"nullable":true,"type":"string"},"affected_body_parts":{"items":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"type":"array"},"affected_party":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Party","type":"object"},"affected_person":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"affliction_type":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"afflictions":{"items":{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"affliction_type":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"id":{"type":"integer"}},"title":"IncidentAffliction","type":"object"},"type":"array"},"body_diagram_type":{"enum":["feminine","masculine",null],"nullable":true,"type":"string"},"body_parts":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"selectable":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"}},"title":"Body Part","type":"object"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_of_death":{"format":"date","type":"string"},"date_returned_to_work":{"format":"date","type":"string"},"filing_type":{"enum":["fatality","first_aid","lost_time","medically_treated","refused_care","report_only","restricted_work"],"type":"string"},"harm_source":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Harm Source","type":"object"},"hospitalized_overnight":{"type":"boolean"},"recordable":{"type":"boolean"},"treated_in_er":{"type":"boolean"},"treatment_facility":{"type":"string"},"treatment_facility_address":{"type":"string"},"treatment_provider":{"nullable":true,"type":"string"},"type":{"type":"string"},"work_days_absent":{"type":"integer"},"work_days_restricted":{"type":"integer"},"work_days_transferred":{"type":"integer"}},"type":"object"},{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Injury","tags":["incidents"],"x-os-idempotent":true,"x-os-module":"incidents","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/incidents/osha_300_log":{"get":{"description":"Requires the `view` permission on the project's incidents tool. A scoped API token needs `incidents:read`.","operationId":"listProjectIncidentsOsha300Log","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Get OSHA 300 log","tags":["incidents"],"x-os-idempotent":false,"x-os-module":"incidents","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/incidents/witness_statements":{"get":{"operationId":"listProjectIncidentsWitnessStatements","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"incident_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[date_received]","required":false,"schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[witness_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"sort","schema":{"enum":["created_at","date_received","witness"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_received":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"recording":{"nullable":true,"properties":{"attachment":{"properties":{"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"captured_by":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"witness_statement_id":{"type":"integer"}},"type":"object"},"statement":{"type":"string"},"statement_plain_text":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"witness":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Witness Statements","tags":["incidents"],"x-os-idempotent":false,"x-os-module":"incidents","x-os-paginated":true},"post":{"operationId":"createProjectIncidentsWitnessStatement","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"witness_statement":{"properties":{"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"date_received":{"format":"date","type":"string"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"incident_id":{"type":"integer"},"recording":{"properties":{"upload_id":{"type":"string"}},"type":"object"},"statement":{"type":"string"},"upload_uuids":{"items":{"type":"string"},"type":"array"},"witness_id":{"type":"integer"}},"required":["incident_id","witness_id"],"title":"IncidentWitnessStatementCreateParameters","type":"object"}},"required":["witness_statement"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_received":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"recording":{"nullable":true,"properties":{"attachment":{"properties":{"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"captured_by":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"witness_statement_id":{"type":"integer"}},"type":"object"},"statement":{"type":"string"},"statement_plain_text":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"witness":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Witness Statement","tags":["incidents"],"x-os-idempotent":true,"x-os-module":"incidents","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/incidents/witness_statements/{id}":{"delete":{"description":"Soft-delete the witness statement. Needs incidents delete permission and visibility of the parent incident.","operationId":"deleteProjectIncidentsWitnessStatement","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"incident_id","required":false,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Destroy Witness Statement","tags":["incidents"],"x-os-idempotent":true,"x-os-module":"incidents","x-os-paginated":false},"get":{"operationId":"getProjectIncidentsWitnessStatement","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"incident_id","required":false,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_received":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"recording":{"nullable":true,"properties":{"attachment":{"properties":{"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"captured_by":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"witness_statement_id":{"type":"integer"}},"type":"object"},"statement":{"type":"string"},"statement_plain_text":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"witness":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Witness Statement","tags":["incidents"],"x-os-idempotent":false,"x-os-module":"incidents","x-os-paginated":false},"patch":{"description":"Update a witness statement: any of statement, date_received, witness_id, witness_name. Attachments and custom fields are not supported on witness statements.","operationId":"updateProjectIncidentsWitnessStatement","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"incident_id","required":false,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"witness_statement":{"properties":{"date_received":{"format":"date","nullable":true,"type":"string"},"statement":{"minLength":1,"type":"string"},"witness_id":{"nullable":true,"type":"integer"},"witness_name":{"nullable":true,"type":"string"}},"type":"object"}},"required":["witness_statement"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_received":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"recording":{"nullable":true,"properties":{"attachment":{"properties":{"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"captured_by":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"witness_statement_id":{"type":"integer"}},"type":"object"},"statement":{"type":"string"},"statement_plain_text":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"witness":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Update Witness Statement","tags":["incidents"],"x-os-idempotent":true,"x-os-module":"incidents","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/incidents/{id}":{"delete":{"operationId":"deleteProjectIncident","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Incident","tags":["incidents"],"x-os-idempotent":true,"x-os-module":"incidents","x-os-paginated":false},"get":{"operationId":"getProjectIncident","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"actions_count":{"type":"integer"},"attachments_count":{"type":"integer"},"closed_observations_count":{"type":"integer"},"contributing_behavior":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Contributing Behavior","type":"object"},"contributing_condition":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Contributing Condition","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"event_date":{"format":"date-time","type":"string"},"hazard":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Hazard","type":"object"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"integer"},"open_observations_count":{"type":"integer"},"private":{"type":"boolean"},"recordable":{"type":"boolean"},"records_count":{"type":"integer"},"status":{"enum":["open","closed"],"type":"string"},"time_unknown":{"type":"boolean"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"witness_statements_count":{"type":"integer"}},"title":"IncidentCompact","type":"object"},{"properties":{"actions":{"items":{"properties":{"action_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Action Type","type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"observation_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"assignees":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"title":"Incident Attachment","type":"object"},"type":"array"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"environmentals":{"items":{"allOf":[{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"environmental_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Environmental Type","type":"object"},"estimated_cost_impact":{"type":"string"},"quantity_unit_of_measure":{"enum":["hours","days","weeks","months","years","ea","ls","lf","sf","sy","cy","lbs","ton","mm","m","m^2","m^3","kg","t"],"type":"string"},"quantity_value":{"type":"string"},"type":{"type":"string"}},"type":"object"},{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"},"recordable":{"type":"boolean"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"}]},"type":"array"},"injuries":{"items":{"allOf":[{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"affected_body_parts":{"items":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"type":"array"},"affected_party":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Party","type":"object"},"affected_person":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"affliction_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"afflictions":{"items":{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"affliction_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"id":{"type":"integer"}},"title":"IncidentAffliction","type":"object"},"type":"array"},"body_diagram_type":{"enum":["feminine","masculine"],"type":"string"},"body_parts":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"type":"integer"},"selectable":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"}},"title":"Body Part","type":"object"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_of_death":{"format":"date","type":"string"},"date_returned_to_work":{"format":"date","type":"string"},"filing_type":{"enum":["fatality","first_aid","lost_time","medically_treated","refused_care","report_only","restricted_work"],"type":"string"},"harm_source":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Harm Source","type":"object"},"hospitalized_overnight":{"type":"boolean"},"treated_in_er":{"type":"boolean"},"treatment_facility":{"type":"string"},"treatment_facility_address":{"type":"string"},"treatment_provider":{"type":"string"},"type":{"type":"string"},"work_days_absent":{"type":"integer"},"work_days_restricted":{"type":"integer"},"work_days_transferred":{"type":"integer"}},"type":"object"},{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"},"recordable":{"type":"boolean"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"}]},"type":"array"},"near_misses":{"items":{"allOf":[{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"},"recordable":{"type":"boolean"},"type":{"type":"string"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"},{"properties":{"affected_party":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Party","type":"object"},"affected_person":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"harm_source":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Harm Source","type":"object"}},"type":"object"}]},"type":"array"},"property_damages":{"items":{"allOf":[{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"estimated_cost_impact":{"type":"string"},"responsible_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":{"type":"string"}},"type":"object"},{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"}]},"type":"array"},"type":{"nullable":true,"properties":{"active":{"type":"boolean"},"default":{"type":"boolean"},"global_type":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"witness_statements":{"items":{"properties":{"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_received":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"statement":{"type":"string"},"statement_plain_text":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"witness":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"}},"type":"object"}],"title":"IncidentNormal"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Incident","tags":["incidents"],"x-os-idempotent":false,"x-os-module":"incidents","x-os-paginated":false},"patch":{"operationId":"updateProjectIncident","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","schema":{"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"incident":{"properties":{"assignee_ids":{"items":{"type":"integer"},"type":"array"},"contributing_behavior_id":{"type":"integer"},"contributing_condition_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_status_id":{"type":"integer"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"environmentals":{"items":{"properties":{"affected_company_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"environmental_type_id":{"type":"integer"},"estimated_cost_impact":{"format":"float","type":"number"},"managed_equipment_id":{"type":"integer"},"quantity_unit_of_measure":{"enum":["hours","days","weeks","months","years","ea","ls","lf","sf","sy","cy","lbs","ton","mm","m","m^2","m^3","kg","t"],"type":"string"},"quantity_value":{"format":"float","type":"number"},"work_activity_id":{"type":"integer"}},"title":"IncidentEnvironmentalUpdateParameters","type":"object"},"type":"array"},"event_date":{"format":"date-time","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"hazard_id":{"type":"integer"},"image_ids":{"items":{"type":"integer"},"type":"array"},"injuries":{"items":{"properties":{"affected_body_parts":{"items":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"type":"array"},"affected_company_id":{"type":"integer"},"affected_party_id":{"type":"integer"},"affected_person_id":{"type":"integer"},"affliction_type_id":{"type":"integer"},"body_diagram_type":{"enum":["feminine","masculine"],"type":"string"},"body_part_ids":{"items":{"type":"integer"},"type":"array"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"date_of_death":{"format":"date-time","type":"string"},"filing_type":{"enum":["fatality","first_aid","lost_time","medically_treated","refused_care","report_only","restricted_work"],"type":"string"},"harm_source_id":{"type":"integer"},"hospitalized_overnight":{"type":"boolean"},"managed_equipment_id":{"type":"integer"},"recordable":{"type":"boolean"},"treated_in_er":{"type":"boolean"},"treatment_facility":{"type":"string"},"treatment_facility_address":{"type":"string"},"treatment_provider":{"type":"string"},"work_activity_id":{"type":"integer"},"work_days_absent":{"type":"integer"},"work_days_restricted":{"type":"integer"},"work_days_transferred":{"type":"integer"}},"title":"IncidentInjuryUpdateParameters","type":"object"},"type":"array"},"location_id":{"type":"integer"},"near_misses":{"items":{"properties":{"affected_company_id":{"type":"integer"},"affected_party_id":{"type":"integer"},"affected_person_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"harm_source_id":{"type":"integer"},"managed_equipment_id":{"type":"integer"},"work_activity_id":{"type":"integer"}},"title":"IncidentNearMissUpdateParameters","type":"object"},"type":"array"},"private":{"type":"boolean"},"property_damages":{"items":{"properties":{"affected_company_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"estimated_cost_impact":{"format":"float","type":"number"},"managed_equipment_id":{"type":"integer"},"responsible_company_id":{"type":"integer"},"work_activity_id":{"type":"integer"}},"title":"IncidentPropertyDamageUpdateParameters","type":"object"},"type":"array"},"recordable":{"type":"boolean"},"status":{"enum":["open","closed"],"type":"string"},"time_unknown":{"type":"boolean"},"title":{"type":"string"},"type_id":{"type":"integer"},"upload_uuids":{"items":{"type":"string"},"type":"array"},"witness_statements_attributes":{"items":{"properties":{"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"date_received":{"format":"date","type":"string"},"statement":{"type":"string"},"witness_id":{"type":"integer"}},"title":"IncidentWitnessStatementUpdateParameters","type":"object"},"type":"array"}},"type":"object"}},"required":["incident"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"actions_count":{"type":"integer"},"attachments_count":{"type":"integer"},"closed_observations_count":{"type":"integer"},"contributing_behavior":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Contributing Behavior","type":"object"},"contributing_condition":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Contributing Condition","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"event_date":{"format":"date-time","type":"string"},"hazard":{"nullable":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Hazard","type":"object"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"integer"},"open_observations_count":{"type":"integer"},"private":{"type":"boolean"},"recordable":{"type":"boolean"},"records_count":{"type":"integer"},"status":{"enum":["open","closed"],"type":"string"},"time_unknown":{"type":"boolean"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"witness_statements_count":{"type":"integer"}},"title":"IncidentCompact","type":"object"},{"properties":{"actions":{"items":{"properties":{"action_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Action Type","type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"observation_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"assignees":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"title":"Incident Attachment","type":"object"},"type":"array"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"environmentals":{"items":{"allOf":[{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"environmental_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Environmental Type","type":"object"},"estimated_cost_impact":{"type":"string"},"quantity_unit_of_measure":{"enum":["hours","days","weeks","months","years","ea","ls","lf","sf","sy","cy","lbs","ton","mm","m","m^2","m^3","kg","t"],"type":"string"},"quantity_value":{"type":"string"},"type":{"type":"string"}},"type":"object"},{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"},"recordable":{"type":"boolean"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"}]},"type":"array"},"injuries":{"items":{"allOf":[{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"affected_body_parts":{"items":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"type":"array"},"affected_party":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Party","type":"object"},"affected_person":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"affliction_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"afflictions":{"items":{"properties":{"affected_body_part":{"enum":["abdomen","ankle","ankle_left","ankle_right","arm","arm_left","arm_right","back","body_systems","breast","breast_left","breast_right","buttock","chest","circulatory_system","cranium","digestive_system","ear","ear_left","ear_right","elbow","elbow_left","elbow_right","entire_body_systemic","eye","eye_left","eye_right","face","finger","finger_index","finger_index_left","finger_index_right","finger_middle","finger_middle_left","finger_middle_right","finger_pinky","finger_pinky_left","finger_pinky_right","finger_ring","finger_ring_left","finger_ring_right","foot","foot_left","foot_right","foot_top_left","foot_top_right","forearm","forearm_left","forearm_right","groin","hand","hand_back_left","hand_back_right","hand_left","hand_right","head","head_back","heart","heel_left","heel_right","hip","hip_left","hip_right","internal_organs","knee","knee_left","knee_right","leg","leg_left","leg_right","lower_back","lower_back_left","lower_back_right","lower_leg","lower_leg_left","lower_leg_right","lungs","mouth","neck","neck_back","neck_left","neck_right","nervous_system","nose","palm_left","palm_right","pec","pec_left","pec_right","pelvis","pelvis_front","psychological","reproductive_system","respiratory_system","ribs","ribs_left","ribs_right","shoulder","shoulder_left","shoulder_right","skin","tailbone","teeth","throat","thumb","thumb_left","thumb_right","toe","toe_fifth","toe_fifth_left","toe_fifth_right","toe_first","toe_first_left","toe_first_right","toe_fourth","toe_fourth_left","toe_fourth_right","toe_second","toe_second_left","toe_second_right","toe_third","toe_third_left","toe_third_right","torso","upper_arm","upper_arm_left","upper_arm_right","upper_back","upper_back_left","upper_back_right","upper_leg","upper_leg_left","upper_leg_right","urinary_system","vertebrae","wrist","wrist_left","wrist_right"],"type":"string"},"affliction_type":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Affliction Type","type":"object"},"id":{"type":"integer"}},"title":"IncidentAffliction","type":"object"},"type":"array"},"body_diagram_type":{"enum":["feminine","masculine"],"type":"string"},"body_parts":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"type":"integer"},"selectable":{"type":"boolean"},"updated_at":{"format":"date-time","type":"string"}},"title":"Body Part","type":"object"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_of_death":{"format":"date","type":"string"},"date_returned_to_work":{"format":"date","type":"string"},"filing_type":{"enum":["fatality","first_aid","lost_time","medically_treated","refused_care","report_only","restricted_work"],"type":"string"},"harm_source":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Harm Source","type":"object"},"hospitalized_overnight":{"type":"boolean"},"treated_in_er":{"type":"boolean"},"treatment_facility":{"type":"string"},"treatment_facility_address":{"type":"string"},"treatment_provider":{"type":"string"},"type":{"type":"string"},"work_days_absent":{"type":"integer"},"work_days_restricted":{"type":"integer"},"work_days_transferred":{"type":"integer"}},"type":"object"},{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"},"recordable":{"type":"boolean"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"}]},"type":"array"},"near_misses":{"items":{"allOf":[{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"},"recordable":{"type":"boolean"},"type":{"type":"string"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"},{"properties":{"affected_party":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Party","type":"object"},"affected_person":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"harm_source":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Harm Source","type":"object"}},"type":"object"}]},"type":"array"},"property_damages":{"items":{"allOf":[{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"estimated_cost_impact":{"type":"string"},"responsible_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":{"type":"string"}},"type":"object"},{"properties":{"full_number":{"type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"number":{"type":"integer"}},"title":"IncidentRecordBaseNormal","type":"object"},{"properties":{"affected_company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"description_plain_text":{"type":"string"},"incident_created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"incident_private":{"type":"boolean"},"incident_title":{"type":"string"},"managed_equipment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"summary":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"work_activity":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Work Activity","type":"object"}},"type":"object"}]},"type":"array"},"type":{"nullable":true,"properties":{"active":{"type":"boolean"},"default":{"type":"boolean"},"global_type":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"witness_statements":{"items":{"properties":{"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"title":"Incident Attachment","type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_received":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"incident_id":{"type":"integer"},"statement":{"type":"string"},"statement_plain_text":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"witness":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"}},"type":"object"}],"title":"IncidentNormal"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Incident","tags":["incidents"],"x-os-idempotent":true,"x-os-module":"incidents","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/jobs":{"get":{"description":"List background jobs for a project (newest first), tenant-scoped, with pagination headers. Query: ?filters[status]=completed|queued|running|failed ?filters[type]=export_csv|source_import|... Requires the `view` permission on the project's jobs tool. A scoped API token needs `jobs:read`.","operationId":"listProjectJobs","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Page number, starting at 1.","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Records per page.","in":"query","name":"per_page","schema":{"minimum":1,"type":"integer"}},{"description":"Filters as `filters[field]=value` query parameters.","explode":true,"in":"query","name":"filters","schema":{"additionalProperties":true,"type":"object"},"style":"deepObject"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"List jobs","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/locations":{"get":{"operationId":"listProjectLocations","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[parent_id]","required":false,"schema":{"type":"integer"}},{"in":"query","name":"filters[code]","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"in":"query","name":"filters[search]","schema":{"type":"string"}},{"in":"query","name":"filters[search_with_code]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[superlocations_for]","required":false,"schema":{"type":"integer"}},{"in":"query","name":"filters[sublocations_for]","required":false,"schema":{"type":"integer"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"sort","schema":{"enum":["created_at","name","node_name","parent_id","updated_at"],"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[depth_range]","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"nullable":true,"properties":{"code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Project Locations","tags":["locations"],"x-os-idempotent":false,"x-os-module":"locations","x-os-paginated":true},"post":{"operationId":"createProjectLocation","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"location":{"properties":{"node_name":{"type":"string"},"parent_id":{"type":"integer"}},"title":"Location","type":"object"}},"required":["location"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"nullable":true,"properties":{"code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Location (Admin)","tags":["locations"],"x-os-idempotent":true,"x-os-module":"locations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/locations/{location_id}":{"delete":{"operationId":"deleteProjectLocation","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"location_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Project Location","tags":["locations"],"x-os-idempotent":false,"x-os-module":"locations","x-os-paginated":false},"get":{"operationId":"getProjectLocation","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"location_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"nullable":true,"properties":{"code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Project Location","tags":["locations"],"x-os-idempotent":false,"x-os-module":"locations","x-os-paginated":false},"patch":{"operationId":"updateProjectLocation","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"location_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"location":{"properties":{"node_name":{"type":"string"},"parent_id":{"type":"integer"}},"title":"Location","type":"object"}},"required":["location"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"nullable":true,"properties":{"code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Project Location","tags":["locations"],"x-os-idempotent":false,"x-os-module":"locations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/managed_equipment":{"get":{"operationId":"listProjectManagedEquipment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/equipment_Equipment"},"type":"array"}}}}},"summary":"List project-assigned equipment","tags":["equipment"],"x-os-idempotent":false,"x-os-module":"equipment","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/manpower_logs":{"get":{"operationId":"listProjectManpowerLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[status]","schema":{"type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[location_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[vendor_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[search]","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"contact":{"properties":{"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"email":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"id":{"type":"integer"},"job_title":{"nullable":true,"type":"string"},"login_information_id":{"type":"integer"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"vendor_name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"man_hours":{"type":"string"},"notes":{"type":"string"},"num_hours":{"type":"string"},"num_workers":{"type":"integer"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"user":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Manpower Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectManpowerLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"manpower_log":{"allOf":[{"properties":{"contact_id":{"type":"integer"},"cost_code_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"notes":{"type":"string"},"num_hours":{"type":"string"},"num_workers":{"type":"integer"},"trade_id":{"type":"integer"},"user_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["manpower_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"manpower_log":{"properties":{"contact_id":{"type":"integer"},"cost_code_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"notes":{"type":"string"},"num_hours":{"type":"string"},"num_workers":{"type":"integer"},"trade_id":{"type":"integer"},"user_id":{"type":"integer"}},"type":"object"}},"required":["manpower_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"contact":{"properties":{"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"email":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"id":{"type":"integer"},"job_title":{"nullable":true,"type":"string"},"login_information_id":{"type":"integer"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"vendor_name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"man_hours":{"type":"string"},"notes":{"type":"string"},"num_hours":{"type":"string"},"num_workers":{"type":"integer"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"user":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Manpower Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/manpower_logs/contact_options":{"get":{"operationId":"listProjectManpowerLogsContactOptions","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[is_employee]","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Manpower Logs Contact Options","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/manpower_logs/daily_totals":{"get":{"operationId":"listProjectManpowerLogsDailyTotals","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"total_man_hours":{"format":"float","type":"number"},"total_workers":{"type":"integer"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Get total workers and man hours","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/manpower_logs/vendor_options":{"get":{"operationId":"listProjectManpowerLogsVendorOptions","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Manpower Logs Vendor Options","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/manpower_logs/{id}":{"delete":{"operationId":"deleteProjectManpowerLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Manpower Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectManpowerLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"contact":{"properties":{"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"email":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"id":{"type":"integer"},"job_title":{"nullable":true,"type":"string"},"login_information_id":{"type":"integer"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"vendor_name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"man_hours":{"type":"string"},"notes":{"type":"string"},"num_hours":{"type":"string"},"num_workers":{"type":"integer"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"user":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Manpower Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectManpowerLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"manpower_log":{"allOf":[{"properties":{"contact_id":{"type":"integer"},"cost_code_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"notes":{"type":"string"},"num_hours":{"type":"string"},"num_workers":{"type":"integer"},"status":{"type":"string"},"trade_id":{"type":"integer"},"user_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["manpower_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"manpower_log":{"properties":{"contact_id":{"type":"integer"},"cost_code_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"notes":{"type":"string"},"num_hours":{"type":"string"},"num_workers":{"type":"integer"},"status":{"type":"string"},"trade_id":{"type":"integer"},"user_id":{"type":"integer"}},"type":"object"}},"required":["manpower_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"contact":{"properties":{"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"email":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"id":{"type":"integer"},"job_title":{"nullable":true,"type":"string"},"login_information_id":{"type":"integer"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"vendor_name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"man_hours":{"type":"string"},"notes":{"type":"string"},"num_hours":{"type":"string"},"num_workers":{"type":"integer"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"user":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Manpower Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials":{"get":{"operationId":"listProjectMaterials","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/materials_Material"},"type":"array"}}}}},"summary":"List Materials","tags":["materials"],"x-os-idempotent":false,"x-os-module":"materials","x-os-paginated":false},"post":{"operationId":"createProjectMaterial","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_Material"}}}}},"summary":"Create Material","tags":["materials"],"x-os-idempotent":true,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/deliveries":{"get":{"operationId":"listProjectMaterialsDeliveries","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/materials_DeliveryListItem"},"type":"array"}}}}},"summary":"List Deliveries","tags":["materials"],"x-os-idempotent":false,"x-os-module":"materials","x-os-paginated":false},"post":{"operationId":"createProjectMaterialsDelivery","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_DeliveryShow"}}}}},"summary":"Create Delivery","tags":["materials"],"x-os-idempotent":true,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/deliveries/recycle_bin":{"get":{"operationId":"listProjectMaterialsDeliveriesRecycleBin","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/materials_DeliveryListItem"},"type":"array"}}}}},"summary":"List Recycled Deliveries","tags":["materials"],"x-os-idempotent":false,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/deliveries/{id}":{"delete":{"description":"Recycle (reverses any stock a received delivery added).","operationId":"deleteProjectMaterialsDelivery","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete delivery","tags":["materials"],"x-os-idempotent":false,"x-os-module":"materials","x-os-paginated":false},"get":{"operationId":"getProjectMaterialsDelivery","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_DeliveryShow"}}}}},"summary":"Show Delivery","tags":["materials"],"x-os-idempotent":false,"x-os-module":"materials","x-os-paginated":false},"patch":{"operationId":"updateProjectMaterialsDelivery","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_DeliveryShow"}}}}},"summary":"Update Delivery","tags":["materials"],"x-os-idempotent":true,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/deliveries/{id}/attachments":{"get":{"operationId":"listProjectMaterialsDeliveryAttachments","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/materials_Attachment"},"type":"array"}}}}},"summary":"List Delivery Attachments","tags":["materials"],"x-os-idempotent":false,"x-os-module":"materials","x-os-paginated":false},"post":{"operationId":"createProjectMaterialsDeliveryAttachment","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_DeliveryShow"}}}}},"summary":"Add Delivery Attachments","tags":["materials"],"x-os-idempotent":true,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/deliveries/{id}/attachments/{attachment_id}":{"delete":{"operationId":"deleteProjectMaterialsDeliveryAttachment","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"attachment_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_DeliveryShow"}}}}},"summary":"Remove Delivery Attachment","tags":["materials"],"x-os-idempotent":true,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/deliveries/{id}/receipt_reviews":{"get":{"operationId":"listProjectMaterialsDeliveryReceiptReviews","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_ReceiptReviewWorkspace"}}},"description":"Success"},"401":{"description":"Unauthenticated"},"403":{"description":"Scope, project, PO evidence or accounting authority denied"},"404":{"description":"Not found"},"409":{"description":"Stale evidence, version, reused key or finalized delivery"},"422":{"description":"Invalid quantity, unit, source or accounting setup"}},"summary":"Read source evidence and the latest 100 reviews (materials:read and commitments:read)","tags":["materials"],"x-os-idempotent":false,"x-os-module":"materials","x-os-paginated":false},"post":{"description":"Requires materials:write, commitments:read and materials edit plus PO line visibility. Each delivery item is classified once. A returned review can be corrected only with a fresh snapshot and submission key.","operationId":"createProjectMaterialsDeliveryReceiptReview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_ReceiptReviewSubmission"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_ReceiptReview"}}},"description":"Success"},"401":{"description":"Unauthenticated"},"403":{"description":"Scope, project, PO evidence or accounting authority denied"},"404":{"description":"Not found"},"409":{"description":"Stale evidence, version, reused key or finalized delivery"},"422":{"description":"Invalid quantity, unit, source or accounting setup"}},"summary":"Submit immutable field quantities for independent review","tags":["materials"],"x-os-idempotent":true,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/deliveries/{id}/receipt_reviews/{review_id}/decision":{"post":{"description":"Requires accounting:write, materials:read, commitments:read, materials view, PO line visibility, apEnter and project entity authority. Submitter cannot decide. Accept records one AP receipt and freezes source mutations atomically. An already accepted review replays its original receipt, including after a later accounting void; it never creates a replacement.","operationId":"decisionProjectMaterialsDeliveryReceiptReview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"review_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_ReceiptReviewDecision"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_ReceiptReview"}}},"description":"Success"},"401":{"description":"Unauthenticated"},"403":{"description":"Scope, project, PO evidence or accounting authority denied"},"404":{"description":"Not found"},"409":{"description":"Stale evidence, version, reused key or finalized delivery"},"422":{"description":"Invalid quantity, unit, source or accounting setup"}},"summary":"Independently accept into AP or return the field review","tags":["materials"],"x-os-idempotent":true,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/deliveries/{id}/restore":{"patch":{"operationId":"restoreProjectMaterialsDelivery","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_DeliveryShow"}}}}},"summary":"Restore Delivery","tags":["materials"],"x-os-idempotent":true,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/filter_options/category":{"get":{"operationId":"listProjectMaterialsFilterOptionsCategory","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/materials_FilterOption"},"type":"array"}}}}},"summary":"Material category filter options","tags":["materials"],"x-os-idempotent":false,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/receipt_reviews":{"get":{"description":"Read only. Requires Materials view, commitment SOV read and accounting apEnter. Token scopes: materials:read commitments:read accounting:write. Visibility precedes LIMIT; no total. Source changed rows remain available for return.","operationId":"listProjectMaterialsReceiptReviews","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"after","schema":{"default":0,"maximum":2147483647,"minimum":0,"type":"integer"}},{"in":"query","name":"limit","schema":{"default":10,"maximum":10,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"next_after":{"nullable":true,"type":"integer"},"rows":{"items":{"properties":{"commitment_id":{"type":"integer"},"delivery_id":{"type":"integer"},"delivery_number":{"type":"string"},"evidence_status":{"enum":["current","changed"],"type":"string"},"href":{"type":"string"},"id":{"type":"integer"},"po_number":{"type":"string"},"recorded_delivery_date":{"format":"date","type":"string"},"submitted_at":{"format":"date-time","type":"string"},"version":{"type":"integer"}},"required":["id","version","delivery_id","commitment_id","delivery_number","po_number","href","submitted_at","recorded_delivery_date","evidence_status"],"type":"object"},"maxItems":10,"type":"array"}},"required":["rows","next_after"],"type":"object"}}},"description":"Visible pending work; private, no-store","headers":{"Cache-Control":{"schema":{"type":"string"}}}},"401":{"description":"Authentication required"},"403":{"description":"Current review authority required"},"409":{"description":"Page or source changed; reload"},"422":{"description":"Invalid query or missing entity setup"}},"summary":"Pending independent receipt decisions","tags":["materials"],"x-os-idempotent":false,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/recycle_bin":{"get":{"operationId":"listProjectMaterialsRecycleBin","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/materials_Material"},"type":"array"}}}}},"summary":"List Recycled Materials","tags":["materials"],"x-os-idempotent":false,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/{id}":{"delete":{"operationId":"deleteProjectMaterial","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete material","tags":["materials"],"x-os-idempotent":false,"x-os-module":"materials","x-os-paginated":false},"get":{"operationId":"getProjectMaterial","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_Material"}}}}},"summary":"Show Material","tags":["materials"],"x-os-idempotent":false,"x-os-module":"materials","x-os-paginated":false},"patch":{"operationId":"updateProjectMaterial","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_Material"}}}}},"summary":"Update Material","tags":["materials"],"x-os-idempotent":true,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/{id}/adjust":{"patch":{"operationId":"adjustProjectMaterial","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Adjust material quantity","tags":["materials"],"x-os-idempotent":false,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/materials/{id}/restore":{"patch":{"operationId":"restoreProjectMaterial","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materials_Material"}}}}},"summary":"Restore Material","tags":["materials"],"x-os-idempotent":true,"x-os-module":"materials","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/notes_logs":{"get":{"operationId":"listProjectNotesLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[status]","schema":{"type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"type":"integer"},"style":"form"},{"in":"query","name":"filters[location_id]","schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_header_id":{"nullable":true,"type":"integer"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"is_issue_day":{"type":"boolean"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Notes Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectNotesLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"notes_log":{"allOf":[{"properties":{"comment":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"daily_log_header_id":{"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"is_issue_day":{"type":"boolean"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["notes_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"notes_log":{"properties":{"comment":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"daily_log_header_id":{"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"is_issue_day":{"type":"boolean"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["notes_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_header_id":{"nullable":true,"type":"integer"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"is_issue_day":{"type":"boolean"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Notes Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/notes_logs/{id}":{"delete":{"operationId":"deleteProjectNotesLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Notes Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectNotesLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_header_id":{"nullable":true,"type":"integer"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"is_issue_day":{"type":"boolean"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Notes Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectNotesLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"notes_log":{"allOf":[{"properties":{"comment":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"daily_log_header_id":{"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"is_issue_day":{"type":"boolean"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"status":{"type":"string"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["notes_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"notes_log":{"properties":{"comment":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"daily_log_header_id":{"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"is_issue_day":{"type":"boolean"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"status":{"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["notes_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_header_id":{"nullable":true,"type":"integer"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"is_issue_day":{"type":"boolean"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Notes Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/notifications":{"get":{"description":"Requires notifications:read. The project id must identify a project in the caller's company. Returns the caller's own currently visible inbox across projects and company-wide events, newest first, with summaries and deep links. Source record operations require their own tool scopes. The project in the path validates company access and leaves inbox results recipient-wide.","operationId":"listProjectNotifications","parameters":[{"description":"Project id in the caller's company. Settings are scoped to this project. The inbox and preferences use the caller's identity.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"One-based page number.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Maximum items in a page.","in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Set to true to show only unread items.","in":"query","name":"unread","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Set to false to show only unread items. True leaves results unfiltered.","in":"query","name":"filters[read]","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/notifications_Notification"},"type":"array"}}},"description":"A page of the caller's visible notification records.","headers":{"Link":{"description":"RFC Link header with first, last, and applicable previous and next page URLs.","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size.","schema":{"maximum":1000,"minimum":1,"type":"integer"}},"Total":{"description":"Count of visible records matching the filter, before pagination.","schema":{"minimum":0,"type":"integer"}},"X-Unread-Count":{"description":"Count of all currently visible unread items in the caller's inbox.","schema":{"minimum":0,"type":"integer"}}}},"400":{"$ref":"#/components/responses/notifications_BadRequest"},"401":{"$ref":"#/components/responses/notifications_Unauthorized"},"403":{"$ref":"#/components/responses/notifications_Forbidden"},"404":{"$ref":"#/components/responses/notifications_NotFound"},"429":{"$ref":"#/components/responses/notifications_RateLimited"},"500":{"$ref":"#/components/responses/notifications_InternalError"},"503":{"$ref":"#/components/responses/notifications_AuthUnavailable"}},"summary":"List the caller's notification inbox","tags":["notifications"],"x-os-idempotent":false,"x-os-module":"notifications","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/notifications/mark_read":{"post":{"description":"Requires notifications:write. The project id must identify a project in the caller's company. Marks currently visible notifications read for the caller across projects. Supply ids or all: true. The all option takes precedence if both are supplied.","operationId":"createProjectNotificationsMarkRead","parameters":[{"description":"Project id in the caller's company. Settings are scoped to this project. The inbox and preferences use the caller's identity.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_MarkReadInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_MarkReadResult"}}},"description":"The number newly marked read and the caller's remaining visible unread count."},"400":{"$ref":"#/components/responses/notifications_BadRequest"},"401":{"$ref":"#/components/responses/notifications_Unauthorized"},"403":{"$ref":"#/components/responses/notifications_Forbidden"},"404":{"$ref":"#/components/responses/notifications_NotFound"},"429":{"$ref":"#/components/responses/notifications_RateLimited"},"500":{"$ref":"#/components/responses/notifications_InternalError"},"503":{"$ref":"#/components/responses/notifications_AuthUnavailable"}},"summary":"Mark notifications in the caller's inbox read","tags":["notifications"],"x-os-idempotent":true,"x-os-module":"notifications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/notifications/preferences":{"get":{"description":"Requires notifications:read. The project id must identify a project in the caller's company. Returns user-wide notification channels for each displayed event and the caller's digest cadence. Unsaved channels default to on and unsaved cadence defaults to off.","operationId":"listProjectNotificationsPreferences","parameters":[{"description":"Project id in the caller's company. Settings are scoped to this project. The inbox and preferences use the caller's identity.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_Preferences"}}},"description":"The caller's effective notification preferences."},"401":{"$ref":"#/components/responses/notifications_Unauthorized"},"403":{"$ref":"#/components/responses/notifications_Forbidden"},"404":{"$ref":"#/components/responses/notifications_NotFound"},"429":{"$ref":"#/components/responses/notifications_RateLimited"},"500":{"$ref":"#/components/responses/notifications_InternalError"},"503":{"$ref":"#/components/responses/notifications_AuthUnavailable"}},"summary":"Get the caller's notification preferences","tags":["notifications"],"x-os-idempotent":false,"x-os-module":"notifications","x-os-paginated":false},"patch":{"description":"Requires notifications:write. The project id must identify a project in the caller's company. Saves the caller's user-wide preferences for future delivery. A supplied event row sets both channel flags, with omitted flags defaulting to true. Omitted events and cadence retain their existing values. Updating the cadence schedules or cancels the caller's future digests.","operationId":"updateProjectNotificationsPreferences","parameters":[{"description":"Project id in the caller's company. Settings are scoped to this project. The inbox and preferences use the caller's identity.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_PreferencesInput"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_Preferences"}}},"description":"The caller's effective notification preferences after the update."},"401":{"$ref":"#/components/responses/notifications_Unauthorized"},"403":{"$ref":"#/components/responses/notifications_Forbidden"},"404":{"$ref":"#/components/responses/notifications_NotFound"},"429":{"$ref":"#/components/responses/notifications_RateLimited"},"500":{"$ref":"#/components/responses/notifications_InternalError"},"503":{"$ref":"#/components/responses/notifications_AuthUnavailable"}},"summary":"Update the caller's notification preferences","tags":["notifications"],"x-os-idempotent":true,"x-os-module":"notifications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/notifications/settings":{"get":{"description":"Requires notifications:read and Notifications admin permission on the specified project. Returns enabled and disabled rules for the given tool, sorted by event and then by row id.","operationId":"listProjectNotificationsSettings","parameters":[{"description":"Project id in the caller's company. Settings are scoped to this project. The inbox and preferences use the caller's identity.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Tool slug whose notification recipient rules to list.","in":"query","name":"tool","required":true,"schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/notifications_Setting"},"type":"array"}}},"description":"All notification recipient rules for the tool."},"400":{"$ref":"#/components/responses/notifications_BadRequest"},"401":{"$ref":"#/components/responses/notifications_Unauthorized"},"403":{"$ref":"#/components/responses/notifications_Forbidden"},"404":{"$ref":"#/components/responses/notifications_NotFound"},"429":{"$ref":"#/components/responses/notifications_RateLimited"},"500":{"$ref":"#/components/responses/notifications_InternalError"},"503":{"$ref":"#/components/responses/notifications_AuthUnavailable"}},"summary":"List a project's notification recipient rules for a tool","tags":["notifications"],"x-os-idempotent":false,"x-os-module":"notifications","x-os-paginated":false},"post":{"description":"Requires notifications:write and Notifications admin permission on the specified project. Upserts a rule keyed by project, tool slug, event, recipient type, and recipient reference. An existing rule receives the new enabled value, which defaults to true. This affects recipients added by the rule on future matching events, subject to source access and their own channel preferences. Saving the rule does not send a notification.","operationId":"createProjectNotificationsSetting","parameters":[{"description":"Project id in the caller's company. Settings are scoped to this project. The inbox and preferences use the caller's identity.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_CreateSettingInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_Setting"}}},"description":"The created or updated notification recipient rule."},"400":{"$ref":"#/components/responses/notifications_BadRequest"},"401":{"$ref":"#/components/responses/notifications_Unauthorized"},"403":{"$ref":"#/components/responses/notifications_Forbidden"},"404":{"$ref":"#/components/responses/notifications_NotFound"},"429":{"$ref":"#/components/responses/notifications_RateLimited"},"500":{"$ref":"#/components/responses/notifications_InternalError"},"503":{"$ref":"#/components/responses/notifications_AuthUnavailable"}},"summary":"Create or update a project notification recipient rule","tags":["notifications"],"x-os-idempotent":true,"x-os-module":"notifications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/notifications/settings/{id}":{"delete":{"description":"Requires notifications:write and Notifications admin permission on the specified project. Removes the rule's contribution to future matching events. The response has an empty body.","operationId":"deleteProjectNotificationsSetting","parameters":[{"description":"Project id in the caller's company. Settings are scoped to this project. The inbox and preferences use the caller's identity.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Notification recipient rule id in the specified project.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"The notification recipient rule was deleted."},"401":{"$ref":"#/components/responses/notifications_Unauthorized"},"403":{"$ref":"#/components/responses/notifications_Forbidden"},"404":{"$ref":"#/components/responses/notifications_NotFound"},"429":{"$ref":"#/components/responses/notifications_RateLimited"},"500":{"$ref":"#/components/responses/notifications_InternalError"},"503":{"$ref":"#/components/responses/notifications_AuthUnavailable"}},"summary":"Delete a project notification recipient rule","tags":["notifications"],"x-os-idempotent":true,"x-os-module":"notifications","x-os-paginated":false},"patch":{"description":"Requires notifications:write and Notifications admin permission on the specified project. This affects recipients added by the rule on future matching events, subject to source access and their own channel preferences. Saving the rule does not send a notification.","operationId":"updateProjectNotificationsSetting","parameters":[{"description":"Project id in the caller's company. Settings are scoped to this project. The inbox and preferences use the caller's identity.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Notification recipient rule id in the specified project.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_UpdateSettingInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifications_SettingUpdated"}}},"description":"The rule id and its enabled state."},"400":{"$ref":"#/components/responses/notifications_BadRequest"},"401":{"$ref":"#/components/responses/notifications_Unauthorized"},"403":{"$ref":"#/components/responses/notifications_Forbidden"},"404":{"$ref":"#/components/responses/notifications_NotFound"},"429":{"$ref":"#/components/responses/notifications_RateLimited"},"500":{"$ref":"#/components/responses/notifications_InternalError"},"503":{"$ref":"#/components/responses/notifications_AuthUnavailable"}},"summary":"Enable or disable a project notification recipient rule","tags":["notifications"],"x-os-idempotent":true,"x-os-module":"notifications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/observation_templates":{"get":{"operationId":"listProjectObservationTemplates","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"active":{"type":"boolean"},"assignee":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assignees":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"company_observation_template_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"observation_title":{"type":"string"},"observation_type":{"nullable":true,"properties":{"active":{"type":"boolean"},"category":{"type":"string"},"category_id":{"type":"integer"},"category_key":{"type":"string"},"company_active":{"type":"boolean"},"id":{"type":"integer"},"kind":{"type":"string"},"localized_name":{"type":"string"},"name":{"type":"string"},"name_translations":{"nullable":true,"type":"object"},"parent_inactive":{"type":"boolean"}},"type":"object"},"priority":{"enum":["Low","Medium","High","Urgent",null],"nullable":true,"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","active"],"type":"object"},"type":"array"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/observation_templates","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":false},"post":{"operationId":"createProjectObservationTemplate","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"assignee":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assignees":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"company_observation_template_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"observation_title":{"type":"string"},"observation_type":{"nullable":true,"properties":{"active":{"type":"boolean"},"category":{"type":"string"},"category_id":{"type":"integer"},"category_key":{"type":"string"},"company_active":{"type":"boolean"},"id":{"type":"integer"},"kind":{"type":"string"},"localized_name":{"type":"string"},"name":{"type":"string"},"name_translations":{"nullable":true,"type":"object"},"parent_inactive":{"type":"boolean"}},"type":"object"},"priority":{"enum":["Low","Medium","High","Urgent",null],"nullable":true,"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","active"],"type":"object"}}}}},"summary":"POST /rest/v1.0/projects/{project_id}/observation_templates","tags":["observations"],"x-os-idempotent":true,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/observation_templates/{id}":{"delete":{"operationId":"deleteProjectObservationTemplate","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{}},"summary":"DELETE /rest/v1.0/projects/{project_id}/observation_templates/{id}","tags":["observations"],"x-os-idempotent":true,"x-os-module":"observations","x-os-paginated":false},"get":{"operationId":"getProjectObservationTemplate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"assignee":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assignees":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"company_observation_template_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"observation_title":{"type":"string"},"observation_type":{"nullable":true,"properties":{"active":{"type":"boolean"},"category":{"type":"string"},"category_id":{"type":"integer"},"category_key":{"type":"string"},"company_active":{"type":"boolean"},"id":{"type":"integer"},"kind":{"type":"string"},"localized_name":{"type":"string"},"name":{"type":"string"},"name_translations":{"nullable":true,"type":"object"},"parent_inactive":{"type":"boolean"}},"type":"object"},"priority":{"enum":["Low","Medium","High","Urgent",null],"nullable":true,"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","active"],"type":"object"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/observation_templates/{id}","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":false},"patch":{"operationId":"updateProjectObservationTemplate","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"assignee":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assignees":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"company_observation_template_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"observation_title":{"type":"string"},"observation_type":{"nullable":true,"properties":{"active":{"type":"boolean"},"category":{"type":"string"},"category_id":{"type":"integer"},"category_key":{"type":"string"},"company_active":{"type":"boolean"},"id":{"type":"integer"},"kind":{"type":"string"},"localized_name":{"type":"string"},"name":{"type":"string"},"name_translations":{"nullable":true,"type":"object"},"parent_inactive":{"type":"boolean"}},"type":"object"},"priority":{"enum":["Low","Medium","High","Urgent",null],"nullable":true,"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","active"],"type":"object"}}}}},"summary":"PATCH /rest/v1.0/projects/{project_id}/observation_templates/{id}","tags":["observations"],"x-os-idempotent":true,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/observation_templates/{id}/create_observation":{"post":{"operationId":"createObservationProjectObservationTemplate","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"asset_ids":{"items":{"type":"string"},"type":"array"},"assignee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Assignee's Company","type":"object"}},"title":"Observation Item assignee","type":"object"},"assignees":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Assignee's Company","type":"object"}},"type":"object"},"type":"array"},"attachments":{"items":{"oneOf":[{"properties":{"attached_to_item_id":{"type":"string"},"attached_to_item_type":{"type":"string"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"attached_to_item_id":{"nullable":true,"type":"string"},"attached_to_item_type":{"nullable":true,"type":"string"},"can_be_viewed":{"type":"boolean"},"filename":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"}]},"type":"array"},"checklist_item":{"nullable":true,"properties":{"id":{"type":"integer"}},"type":"object"},"checklist_list":{"nullable":true,"properties":{"id":{"type":"integer"}},"type":"object"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"contributing_behavior":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"created_at":{"deprecated":true,"format":"date-time","type":"string"},"global":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Contributing Behavior","type":"object"},"contributing_condition":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"created_at":{"deprecated":true,"format":"date-time","type":"string"},"global":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Contributing Condition","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"deprecated":true,"type":"string"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Creator's Company","type":"object"}},"title":"Observation Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_notified":{"format":"date","nullable":true,"type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_rich_text":{"type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"download_all_attachments_uuid":{"type":"string"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revisions":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","nullable":true,"type":"string"},"hazard":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"created_at":{"deprecated":true,"format":"date-time","type":"string"},"global":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Hazard","type":"object"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"deprecated":true,"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"deprecated":true,"type":"integer"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"number":{"type":"string"},"origin":{"properties":{"payload":{"properties":{"bim_model_id":{"type":"integer"},"bim_model_name":{"type":"string"},"checklist_item_id":{"type":"integer"},"checklist_list_id":{"type":"integer"},"coordination_issue_id":{"type":"integer"},"coordination_issue_number":{"type":"integer"},"incident_action_id":{"type":"integer"},"incident_id":{"type":"integer"},"name":{"type":"string"}},"title":"Origin Payload","type":"object"},"type":{"enum":["inspection","incident","coordination_issue","bim_model"],"type":"string"}},"title":"Observation origin","type":"object"},"personal":{"type":"boolean"},"priority":{"enum":["Low","Medium","High","Urgent"],"type":"string"},"specification_section":{"nullable":true,"properties":{"current_revision_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"number":{"deprecated":true,"type":"string"},"section":{"type":"string"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"},"trade":{"nullable":true,"properties":{"active":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":{"properties":{"active":{"deprecated":true,"type":"boolean"},"category":{"type":"string"},"category_id":{"deprecated":true,"type":"integer"},"category_key":{"type":"string"},"company_active":{"deprecated":true,"type":"boolean"},"id":{"type":"integer"},"in_use":{"deprecated":true,"type":"boolean"},"kind":{"deprecated":true,"type":"string"},"localized_name":{"deprecated":true,"type":"string"},"name":{"type":"string"},"name_translations":{"additionalProperties":{"type":"string"},"nullable":true,"properties":{"en":{"type":"string"},"en-AU":{"type":"string"},"es":{"type":"string"},"fr-CA":{"type":"string"}},"type":"object"},"observations_category":{"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"parent_inactive":{"deprecated":true,"type":"boolean"}},"title":"Observation Type","type":"object"},"updated_at":{"format":"date-time","type":"string"},"viewpoint":{"properties":{"bim_file_id":{"type":"integer"},"camera_data":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"redlines_data":{"additionalProperties":true,"type":"object"},"sections_data":{"additionalProperties":true,"type":"object"},"snapshot":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"}},"title":"BIM Viewpoint","type":"object"}},"title":"Observation Item","type":"object"}}}}},"summary":"POST /rest/v1.0/projects/{project_id}/observation_templates/{id}/create_observation","tags":["observations"],"x-os-idempotent":true,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/observations/items/statuses":{"get":{"operationId":"listProjectObservationsItemsStatuses","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"label":{"type":"string"},"value":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"}},"type":"object"},"title":"Array of available statuses","type":"array"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List available Observation Item statuses with localized labels","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/observations/items/{id}":{"delete":{"operationId":"deleteProjectObservationsItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Observation Item","tags":["observations"],"x-os-idempotent":true,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/observations/response_logs":{"get":{"operationId":"listProjectObservationsResponseLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"oneOf":[{"properties":{"attached_to_item_id":{"nullable":true,"type":"string"},"attached_to_item_type":{"nullable":true,"type":"string"},"can_be_viewed":{"type":"boolean"},"filename":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"nullable":true,"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},{"properties":{"attached_to_item_id":{"type":"string"},"attached_to_item_type":{"type":"string"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"}],"type":"object"},"type":"array"},"comment":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Created By","type":"object"},"created_by_name":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"item_id":{"type":"integer"},"status":{"enum":["Initiated","Ready For Review","Not Accepted","Closed","Draft"],"type":"string"},"updated_at":{"deprecated":true,"format":"date-time","type":"string"}},"title":"Observation Item Response Log","type":"object"},"title":"Array of Observation Item Response Logs","type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Observations Response Logs","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/owner_reports":{"get":{"description":"Owner Reports tool permission (view to read; create, edit or delete to change). Data sections are assembled with your access in each source tool.","operationId":"listProjectOwnerReports","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/owner_reports_OwnerReport"},"type":"array"}}},"description":"Reports."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"List owner reports","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false},"post":{"description":"Default period: the previous calendar month. Templates: monthly_aia (AIA-style monthly report), gmp_cost (cost-plus backup summary), executive (one-pager).","operationId":"createProjectOwnerReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"owner_report":{"additionalProperties":false,"properties":{"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"sections":{"items":{"enum":["executive_summary","budget_gmp","contingency_allowances","billing","change_orders","schedule","lookahead","rfis_submittals","safety","quality","photos","risks","compliance"],"type":"string"},"type":"array"},"template":{"enum":["monthly_aia","gmp_cost","executive"],"type":"string"},"title":{"maxLength":160,"type":"string"}},"required":["template"],"type":"object"}},"required":["owner_report"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/owner_reports_OwnerReport"}}},"description":"Created."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."},"422":{"description":"Validation failed."}},"summary":"Create an owner report","tags":["owner_reports"],"x-os-idempotent":true,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/owner_reports/{id}":{"delete":{"description":"Soft-deletes the report and revokes its share links. Versions are kept.","operationId":"deleteProjectOwnerReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Delete an owner report","tags":["owner_reports"],"x-os-idempotent":true,"x-os-module":"owner_reports","x-os-paginated":false},"get":{"operationId":"getProjectOwnerReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/owner_reports_OwnerReport"}}},"description":"Report."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Show an owner report","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false},"patch":{"description":"Edit the narrative, section commentary, risks, sections, period and photo selection. Published versions are never changed.","operationId":"updateProjectOwnerReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"owner_report":{"additionalProperties":false,"properties":{"content":{"$ref":"#/components/schemas/owner_reports_ReportContent"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"photo_ids":{"items":{"type":"integer"},"maxItems":12,"type":"array"},"sections":{"items":{"enum":["executive_summary","budget_gmp","contingency_allowances","billing","change_orders","schedule","lookahead","rfis_submittals","safety","quality","photos","risks","compliance"],"type":"string"},"type":"array"},"title":{"maxLength":160,"type":"string"}},"type":"object"}},"required":["owner_report"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/owner_reports_OwnerReport"}}},"description":"Updated."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."},"422":{"description":"Validation failed."}},"summary":"Update an owner report","tags":["owner_reports"],"x-os-idempotent":true,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/owner_reports/{id}/pdf":{"get":{"description":"Renders the live report as a branded PDF without publishing.","operationId":"listProjectOwnerReportPdf","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"PDF file."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Download a draft PDF","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/owner_reports/{id}/preview":{"get":{"description":"Assembles the report now from live project data with your access. Nothing is stored.","operationId":"listProjectOwnerReportPreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"document":{"$ref":"#/components/schemas/owner_reports_ReportDocument"},"sources":{"items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"Document."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Preview the live report","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/owner_reports/{id}/share_links":{"get":{"operationId":"listProjectOwnerReportShareLinks","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/owner_reports_ShareLink"},"type":"array"}}},"description":"Links (tokens are never listed)."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"List share links","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false},"post":{"description":"A read-only, expiring (max 90 days), revocable link to one published version, opened without a sign-in at /owner-report/{token}. Every open is logged. The token is returned once. Optionally emails the link.","operationId":"createProjectOwnerReportShareLink","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"share_link":{"additionalProperties":false,"properties":{"allow_pdf":{"default":true,"type":"boolean"},"expires_in_days":{"default":30,"maximum":90,"minimum":1,"type":"integer"},"recipient_email":{"format":"email","type":"string"},"recipient_name":{"maxLength":120,"type":"string"},"send_email":{"description":"Email the link to recipient_email.","type":"boolean"},"version_id":{"type":"integer"}},"required":["version_id"],"type":"object"}},"required":["share_link"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/owner_reports_ShareLink"}}},"description":"Created."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."},"422":{"description":"Validation failed or the version is not a published one."}},"summary":"Create an owner share link","tags":["owner_reports"],"x-os-idempotent":true,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/owner_reports/{id}/share_links/{link_id}":{"delete":{"description":"The link answers 410 from now on. Optional JSON body with a reason string.","operationId":"deleteProjectOwnerReportShareLink","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"link_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/owner_reports_ShareLink"}}},"description":"Revoked."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Revoke a share link","tags":["owner_reports"],"x-os-idempotent":true,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/owner_reports/{id}/share_links/{link_id}/views":{"get":{"operationId":"listProjectOwnerReportShareLinkViews","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"link_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/owner_reports_LinkView"},"type":"array"}}},"description":"Opens, newest first."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Share link access log","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/owner_reports/{id}/versions":{"get":{"description":"Published versions and scheduled deliveries, newest first.","operationId":"listProjectOwnerReportVersions","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/owner_reports_OwnerReportVersion"},"type":"array"}}},"description":"Versions."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"List versions","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false},"post":{"description":"Assembles the report with your access and freezes it (JSON, branded PDF and photo bytes, PDF SHA-256). Versions are immutable.","operationId":"createProjectOwnerReportVersion","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/owner_reports_OwnerReportVersion"}}},"description":"Published."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Publish a version","tags":["owner_reports"],"x-os-idempotent":true,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/owner_reports/{id}/versions/{version_id}":{"get":{"description":"Requires view on Owner Reports and on every source tool the version contains.","operationId":"getProjectOwnerReportVersion","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"version_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/owner_reports_OwnerReportVersion"},{"properties":{"document":{"$ref":"#/components/schemas/owner_reports_ReportDocument"}},"type":"object"}]}}},"description":"Version with its frozen document."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."}},"summary":"Show a frozen version","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/owner_reports/{id}/versions/{version_id}/pdf":{"get":{"description":"Served only when its SHA-256 still matches (409 otherwise).","operationId":"listProjectOwnerReportVersionPdf","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"version_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"PDF file."},"401":{"description":"Missing or invalid credentials."},"403":{"description":"No permission, tool disabled, or token lacks the scope."},"404":{"description":"Not found (or not visible to you)."},"409":{"description":"Integrity check failed."}},"summary":"Download a frozen version's PDF","tags":["owner_reports"],"x-os-idempotent":false,"x-os-module":"owner_reports","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/payment_applications":{"get":{"operationId":"listProjectPaymentApplications","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/payment_applications_PaymentApplicationListItem"},"type":"array"}}},"headers":{"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}}},"summary":"List payment applications","tags":["payment_applications"],"x-os-idempotent":false,"x-os-module":"payment_applications","x-os-paginated":false},"post":{"operationId":"createProjectPaymentApplication","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/payment_applications_PaymentApplicationCreateBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/payment_applications_PaymentApplicationShow"}}}}},"summary":"Create payment application","tags":["payment_applications"],"x-os-idempotent":true,"x-os-module":"payment_applications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/payment_applications/filter_options/contracts":{"get":{"description":"Requires the `view` permission on the project's payment applications tool. A scoped API token needs `payment_applications:read`.","operationId":"listProjectPaymentApplicationsFilterOptionsContracts","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"List payment applications filter options for contracts","tags":["payment_applications"],"x-os-idempotent":false,"x-os-module":"payment_applications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/payment_applications/filter_options/statuses":{"get":{"operationId":"listProjectPaymentApplicationsFilterOptionsStatuses","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/payment_applications_FilterOption"},"type":"array"}}}}},"summary":"Status filter options","tags":["payment_applications"],"x-os-idempotent":false,"x-os-module":"payment_applications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/payment_applications/{id}":{"delete":{"operationId":"deleteProjectPaymentApplication","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete payment application","tags":["payment_applications"],"x-os-idempotent":false,"x-os-module":"payment_applications","x-os-paginated":false},"get":{"operationId":"getProjectPaymentApplication","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/payment_applications_PaymentApplicationShow"}}}}},"summary":"Show payment application","tags":["payment_applications"],"x-os-idempotent":false,"x-os-module":"payment_applications","x-os-paginated":false},"patch":{"operationId":"updateProjectPaymentApplication","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/payment_applications_PaymentApplicationShow"}}}}},"summary":"Update payment application","tags":["payment_applications"],"x-os-idempotent":true,"x-os-module":"payment_applications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/payment_applications/{id}/approve":{"post":{"operationId":"approveProjectPaymentApplication","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/payment_applications_PaymentApplicationShow"}}}}},"summary":"Approve","tags":["payment_applications"],"x-os-idempotent":true,"x-os-module":"payment_applications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/payment_applications/{id}/lines":{"get":{"operationId":"listProjectPaymentApplicationLines","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/payment_applications_PaymentApplicationLine"},"type":"array"}}}}},"summary":"List continuation-sheet (G703) line items","tags":["payment_applications"],"x-os-idempotent":false,"x-os-module":"payment_applications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/payment_applications/{id}/lines/{line_id}":{"patch":{"operationId":"updateProjectPaymentApplicationLine","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"line_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/payment_applications_PaymentApplicationLine"}}}}},"summary":"Update a line (this-period entry)","tags":["payment_applications"],"x-os-idempotent":true,"x-os-module":"payment_applications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/payment_applications/{id}/mark_paid":{"post":{"operationId":"markPaidProjectPaymentApplication","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Mark payment application paid","tags":["payment_applications"],"x-os-idempotent":false,"x-os-module":"payment_applications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/payment_applications/{id}/reject":{"post":{"operationId":"rejectProjectPaymentApplication","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/payment_applications_PaymentApplicationShow"}}}}},"summary":"Reject","tags":["payment_applications"],"x-os-idempotent":true,"x-os-module":"payment_applications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/payment_applications/{id}/revert_approval":{"post":{"operationId":"revertApprovalProjectPaymentApplication","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Revert payment application approval","tags":["payment_applications"],"x-os-idempotent":false,"x-os-module":"payment_applications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/payment_applications/{id}/revise":{"post":{"operationId":"reviseProjectPaymentApplication","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Revise payment application","tags":["payment_applications"],"x-os-idempotent":false,"x-os-module":"payment_applications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/payment_applications/{id}/submit":{"post":{"operationId":"submitProjectPaymentApplication","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/payment_applications_PaymentApplicationShow"}}}}},"summary":"Submit for review","tags":["payment_applications"],"x-os-idempotent":true,"x-os-module":"payment_applications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/payment_applications/{id}/void":{"post":{"operationId":"voidProjectPaymentApplication","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/payment_applications_PaymentApplicationShow"}}}}},"summary":"Void","tags":["payment_applications"],"x-os-idempotent":true,"x-os-module":"payment_applications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/permission_templates":{"get":{"operationId":"listProjectPermissionTemplates","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"category":{"enum":["internal","external"],"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"project_specific":{"type":"boolean"},"type":{"default":"global","enum":["project_specific","company_tools","global"],"type":"string"}},"type":"object"},"type":"array"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/permission_templates","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/permits":{"get":{"operationId":"listProjectPermits","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"filters[status]","schema":{"type":"string"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/permits_Permit"},"type":"array"}}},"description":"Success"}},"summary":"GET /rest/v1.0/projects/{project_id}/permits","tags":["permits"],"x-os-idempotent":false,"x-os-module":"permits","x-os-paginated":true},"post":{"operationId":"createProjectPermit","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"permit":{"properties":{"authority_name":{"type":"string"},"jurisdiction_code":{"type":"string"},"permit_type":{"type":"string"},"responsible_user_id":{"type":["integer","null"]},"scope_text":{"type":"string"},"title":{"type":"string"}},"required":["title","authority_name","jurisdiction_code","permit_type"],"type":"object"}},"required":["permit"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/permits_PermitDetail"}}},"description":"Success"}},"summary":"POST /rest/v1.0/projects/{project_id}/permits","tags":["permits"],"x-os-idempotent":true,"x-os-module":"permits","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/permits/{id}":{"get":{"operationId":"getProjectPermit","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/permits_PermitDetail"}}},"description":"Success"}},"summary":"GET /rest/v1.0/projects/{project_id}/permits/{id}","tags":["permits"],"x-os-idempotent":false,"x-os-module":"permits","x-os-paginated":false},"patch":{"operationId":"updateProjectPermit","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"permit":{"properties":{"authority_name":{"type":"string"},"jurisdiction_code":{"type":"string"},"permit_type":{"type":"string"},"responsible_user_id":{"type":["integer","null"]},"scope_text":{"type":"string"},"title":{"type":"string"},"version":{"type":"integer"}},"required":["version"],"type":"object"}},"required":["permit"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/permits_PermitDetail"}}},"description":"Success"}},"summary":"PATCH /rest/v1.0/projects/{project_id}/permits/{id}","tags":["permits"],"x-os-idempotent":true,"x-os-module":"permits","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/permits/{id}/conditions":{"get":{"operationId":"listProjectPermitConditions","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/permits_PermitCondition"},"type":"array"}}},"description":"Success"}},"summary":"GET /rest/v1.0/projects/{project_id}/permits/{id}/conditions","tags":["permits"],"x-os-idempotent":false,"x-os-module":"permits","x-os-paginated":false},"post":{"operationId":"createProjectPermitCondition","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"condition":{"properties":{"assignee_user_id":{"type":["integer","null"]},"description":{"type":"string"},"due_on":{"format":"date","type":["string","null"]},"expected_version":{"type":"integer"},"required_before":{"enum":["issue","close"]}},"required":["expected_version","description","required_before"],"type":"object"}},"required":["condition"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/permits_PermitDetail"}}},"description":"Success"}},"summary":"POST /rest/v1.0/projects/{project_id}/permits/{id}/conditions","tags":["permits"],"x-os-idempotent":true,"x-os-module":"permits","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/permits/{id}/conditions/{condition_id}":{"patch":{"operationId":"updateProjectPermitCondition","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"condition_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"condition":{"allOf":[{"anyOf":[{"required":["evidence_url"]},{"required":["missing_evidence_reason"]},{"required":["evidence_document_version_id"]}]}],"description":"Provide an HTTPS evidence reference or an explicit nonblank missing-evidence reason. Missing evidence remains visibly unverified. Whitespace-only text is rejected after trimming. Alternatively select evidence_document_version_id from the authorized evidence options. URL-only sample document versions cannot be attached. Uploaded evidence does not establish authenticity or authority approval.","properties":{"evidence_document_version_id":{"description":"Exact existing uploaded Documents version in the same project; requires current source access. Does not follow later versions.","minimum":1,"type":"integer"},"evidence_url":{"description":"HTTPS evidence reference without URL credentials. The application does not fetch or authenticate this reference.","format":"uri","maxLength":2000,"pattern":"^[Hh][Tt][Tt][Pp][Ss]://","type":"string"},"expected_version":{"minimum":1,"type":"integer"},"missing_evidence_reason":{"maxLength":2000,"minLength":1,"type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["expected_version","version"],"type":"object"}},"required":["condition"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/permits_PermitDetail"}}},"description":"Success"}},"summary":"PATCH /rest/v1.0/projects/{project_id}/permits/{id}/conditions/{condition_id}","tags":["permits"],"x-os-idempotent":true,"x-os-module":"permits","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/permits/{id}/conditions/{condition_id}/follow_up":{"patch":{"description":"Permit edit access required. Correct an open condition's recorded due date and assignee on a permit that is neither closed nor withdrawn. The assignee must be an active same-company project member. Null assignee restores permit-responsible-person fallback. Both versions must match. A material change increments both versions and appends history; an unchanged request does neither and does not reserve its request key. Identical material retries by the same actor replay without further changes, including after completion; reuse with changed payload returns 409. No completion, prerequisite, evidence or authority status changes are accepted.","operationId":"followUpProjectPermitCondition","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"condition_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"condition":{"additionalProperties":false,"properties":{"assignee_user_id":{"minimum":1,"type":["integer","null"]},"due_on":{"format":"date","type":["string","null"]},"expected_version":{"minimum":1,"type":"integer"},"reason":{"maxLength":2000,"minLength":1,"type":"string"},"request_key":{"format":"uuid","type":"string"},"version":{"minimum":1,"type":"integer"}},"required":["expected_version","version","request_key","due_on","assignee_user_id","reason"],"type":"object"}},"required":["condition"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/permits_Permit"}}},"description":"Current permit with independently authorized receipt projection"},"403":{"description":"Permit edit access denied or tool disabled"},"404":{"description":"Permit or nested condition not found in the project"},"409":{"description":"Stale version, completed condition, terminal permit or conflicting request key"},"422":{"description":"Invalid calendar date, assignee or request"}},"summary":"PATCH /rest/v1.0/projects/{project_id}/permits/{id}/conditions/{condition_id}/follow_up","tags":["permits"],"x-os-idempotent":true,"x-os-module":"permits","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/permits/{id}/events":{"post":{"operationId":"createProjectPermitEvent","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"event":{"allOf":[{"anyOf":[{"required":["evidence_url"]},{"required":["missing_evidence_reason"]},{"required":["evidence_document_version_id"]}]},{"else":{"not":{"required":["expires_on"]}},"if":{"properties":{"kind":{"enum":["issue","renew"]}},"required":["kind"]},"then":{"required":["expires_on"]}}],"description":"Provide an HTTPS evidence reference or an explicit nonblank missing-evidence reason. Missing evidence remains visibly unverified. Whitespace-only text is rejected after trimming. The current permit state determines allowed transitions. Approval, issuance, renewal, suspension and closure require permits admin permission. Issuance requires all issuance conditions complete; closure requires every condition complete. A stale expected_version or reused request_key with changed payload returns 409. An identical retry returns the current permit without adding another event. Alternatively select evidence_document_version_id from the authorized evidence options. URL-only sample document versions cannot be attached. Uploaded evidence does not establish authenticity or authority approval.","properties":{"authority_reference":{"description":"Required for submission, approval, issuance and renewal unless the permit already has an authority reference.","maxLength":200,"minLength":1,"type":"string"},"evidence_document_version_id":{"description":"Exact existing uploaded Documents version in the same project; requires current source access. Does not follow later versions.","minimum":1,"type":"integer"},"evidence_url":{"description":"HTTPS evidence reference without URL credentials. The application does not fetch or authenticate this reference.","format":"uri","maxLength":2000,"pattern":"^[Hh][Tt][Tt][Pp][Ss]://","type":"string"},"expected_version":{"minimum":1,"type":"integer"},"expires_on":{"description":"Required only for issuance/renewal. Cannot precede occurred_on; renewal must strictly extend the previously recorded expiration.","format":"date","type":"string"},"kind":{"enum":["submit","request_corrections","approve","issue","suspend","close","withdraw","renew"]},"missing_evidence_reason":{"maxLength":2000,"minLength":1,"type":"string"},"note":{"maxLength":4000,"minLength":1,"type":"string"},"occurred_on":{"description":"Valid calendar date, year 0001–9999. Cannot be in the future or precede the previous recorded authority action.","format":"date","type":"string"},"request_key":{"format":"uuid","type":"string"}},"required":["expected_version","request_key","kind","occurred_on","note"],"type":"object"}},"required":["event"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/permits_PermitDetail"}}},"description":"Success"}},"summary":"POST /rest/v1.0/projects/{project_id}/permits/{id}/events","tags":["permits"],"x-os-idempotent":true,"x-os-module":"permits","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/permits/{id}/evidence_options":{"get":{"description":"Search existing real uploaded Documents versions for this permit. Requires permit view and independent Documents view. Token callers also need documents:read. Results are bounded; refine search when has_more is true.","operationId":"listProjectPermitEvidenceOptions","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"search","schema":{"maxLength":200,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"has_more":{"type":"boolean"},"items":{"items":{"additionalProperties":false,"properties":{"content_type":{"type":"string"},"document_version_id":{"type":"integer"},"file_id":{"type":"integer"},"name":{"type":"string"},"size":{"type":"integer"},"version_number":{"type":"integer"}},"required":["document_version_id","file_id","name","version_number","content_type","size"],"type":"object"},"maxItems":50,"type":"array"}},"required":["items","has_more"],"type":"object"}}},"description":"Authorized document receipt choices"}},"summary":"GET /rest/v1.0/projects/{project_id}/permits/{id}/evidence_options","tags":["permits"],"x-os-idempotent":false,"x-os-module":"permits","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/plan_revision_logs":{"get":{"operationId":"listProjectPlanRevisionLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"category":{"type":"string"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"plan_number":{"type":"string"},"position":{"type":"integer"},"revision":{"type":"string"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Plan Revision Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"post":{"operationId":"createProjectPlanRevisionLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"plan_revision_log":{"allOf":[{"properties":{"category":{"type":"string"},"comments":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"location_id":{"type":"integer"},"plan_number":{"type":"string"},"revision":{"type":"string"},"title":{"type":"string"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["plan_revision_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"plan_revision_log":{"properties":{"category":{"type":"string"},"comments":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"location_id":{"type":"integer"},"plan_number":{"type":"string"},"revision":{"type":"string"},"title":{"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["plan_revision_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"category":{"type":"string"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"plan_number":{"type":"string"},"position":{"type":"integer"},"revision":{"type":"string"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Plan Revision Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/plan_revision_logs/{id}":{"delete":{"operationId":"deleteProjectPlanRevisionLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Plan Revision Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectPlanRevisionLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"category":{"type":"string"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"plan_number":{"type":"string"},"position":{"type":"integer"},"revision":{"type":"string"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Plan Revision Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectPlanRevisionLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"plan_revision_log":{"allOf":[{"properties":{"category":{"type":"string"},"comments":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"location_id":{"type":"integer"},"plan_number":{"type":"string"},"revision":{"type":"string"},"title":{"type":"string"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["plan_revision_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"plan_revision_log":{"properties":{"category":{"type":"string"},"comments":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"location_id":{"type":"integer"},"plan_number":{"type":"string"},"revision":{"type":"string"},"title":{"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["plan_revision_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"category":{"type":"string"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"plan_number":{"type":"string"},"position":{"type":"integer"},"revision":{"type":"string"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Plan Revision Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/prequalification/questionnaires":{"get":{"operationId":"listProjectPrequalificationQuestionnaires","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"company_id":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"frozen":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"project_id":{"nullable":true,"type":"integer"},"question_count":{"type":"integer"},"questions":{"items":{"properties":{"field_type":{"enum":["text","number","boolean","select"],"type":"string"},"help_text":{"nullable":true,"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"options":{"items":{"type":"string"},"type":"array"},"required":{"type":"boolean"}},"required":["key","label","field_type","required","options"],"type":"object"},"type":"array"},"reference_count":{"type":"integer"},"updated_at":{"type":"string"}},"required":["id","name","questions","question_count","created_at"],"type":"object"},"type":"array"}}}}},"summary":"List prequalification questionnaires available to a project","tags":["prequalification"],"x-os-idempotent":false,"x-os-module":"prequalification","x-os-paginated":false},"post":{"operationId":"createProjectPrequalificationQuestionnaire","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"company_id":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"frozen":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"project_id":{"nullable":true,"type":"integer"},"question_count":{"type":"integer"},"questions":{"items":{"properties":{"field_type":{"enum":["text","number","boolean","select"],"type":"string"},"help_text":{"nullable":true,"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"options":{"items":{"type":"string"},"type":"array"},"required":{"type":"boolean"}},"required":["key","label","field_type","required","options"],"type":"object"},"type":"array"},"reference_count":{"type":"integer"},"updated_at":{"type":"string"}},"required":["id","name","questions","question_count","created_at"],"type":"object"}}}}},"summary":"Create a prequalification questionnaire","tags":["prequalification"],"x-os-idempotent":true,"x-os-module":"prequalification","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/prequalification/questionnaires/{id}":{"delete":{"operationId":"deleteProjectPrequalificationQuestionnaire","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete questionnaire","tags":["prequalification"],"x-os-idempotent":false,"x-os-module":"prequalification","x-os-paginated":false},"get":{"operationId":"getProjectPrequalificationQuestionnaire","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"company_id":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"frozen":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"project_id":{"nullable":true,"type":"integer"},"question_count":{"type":"integer"},"questions":{"items":{"properties":{"field_type":{"enum":["text","number","boolean","select"],"type":"string"},"help_text":{"nullable":true,"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"options":{"items":{"type":"string"},"type":"array"},"required":{"type":"boolean"}},"required":["key","label","field_type","required","options"],"type":"object"},"type":"array"},"reference_count":{"type":"integer"},"updated_at":{"type":"string"}},"required":["id","name","questions","question_count","created_at"],"type":"object"}}}}},"summary":"Show a prequalification questionnaire","tags":["prequalification"],"x-os-idempotent":false,"x-os-module":"prequalification","x-os-paginated":false},"patch":{"operationId":"updateProjectPrequalificationQuestionnaire","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"company_id":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"frozen":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"project_id":{"nullable":true,"type":"integer"},"question_count":{"type":"integer"},"questions":{"items":{"properties":{"field_type":{"enum":["text","number","boolean","select"],"type":"string"},"help_text":{"nullable":true,"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"options":{"items":{"type":"string"},"type":"array"},"required":{"type":"boolean"}},"required":["key","label","field_type","required","options"],"type":"object"},"type":"array"},"reference_count":{"type":"integer"},"updated_at":{"type":"string"}},"required":["id","name","questions","question_count","created_at"],"type":"object"}}}}},"summary":"Update a prequalification questionnaire","tags":["prequalification"],"x-os-idempotent":true,"x-os-module":"prequalification","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/prequalification/submissions":{"get":{"operationId":"listProjectPrequalificationSubmissions","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"answers":{"additionalProperties":{"type":"string"},"type":"object"},"bonding_capacity":{"nullable":true,"type":"string"},"company_id":{"type":"integer"},"created_at":{"type":"string"},"emr":{"nullable":true,"type":"string"},"expired":{"type":"boolean"},"expires_at":{"nullable":true,"type":"string"},"id":{"type":"integer"},"project_id":{"type":"integer"},"questionnaire_id":{"type":"integer"},"questionnaire_name":{"nullable":true,"type":"string"},"reviewed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"score":{"nullable":true,"type":"integer"},"status":{"enum":["invited","submitted","under_review","approved","rejected","expired"],"type":"string"},"submitted_at":{"nullable":true,"type":"string"},"trade_scope":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"validity":{"enum":["valid","expired","not_approved"],"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["id","questionnaire_id","vendor","status","translated_status","answers"],"type":"object"},"type":"array"}}}}},"summary":"List prequalification submissions on a project","tags":["prequalification"],"x-os-idempotent":false,"x-os-module":"prequalification","x-os-paginated":false},"post":{"operationId":"createProjectPrequalificationSubmission","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"answers":{"additionalProperties":{"type":"string"},"type":"object"},"bonding_capacity":{"nullable":true,"type":"string"},"company_id":{"type":"integer"},"created_at":{"type":"string"},"emr":{"nullable":true,"type":"string"},"expired":{"type":"boolean"},"expires_at":{"nullable":true,"type":"string"},"id":{"type":"integer"},"project_id":{"type":"integer"},"questionnaire_id":{"type":"integer"},"questionnaire_name":{"nullable":true,"type":"string"},"reviewed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"score":{"nullable":true,"type":"integer"},"status":{"enum":["invited","submitted","under_review","approved","rejected","expired"],"type":"string"},"submitted_at":{"nullable":true,"type":"string"},"trade_scope":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"validity":{"enum":["valid","expired","not_approved"],"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["id","questionnaire_id","vendor","status","translated_status","answers"],"type":"object"}}}}},"summary":"Invite a vendor to prequalify (create submission)","tags":["prequalification"],"x-os-idempotent":true,"x-os-module":"prequalification","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/prequalification/submissions/{id}":{"delete":{"operationId":"deleteProjectPrequalificationSubmission","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete submission","tags":["prequalification"],"x-os-idempotent":false,"x-os-module":"prequalification","x-os-paginated":false},"get":{"operationId":"getProjectPrequalificationSubmission","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"answers":{"additionalProperties":{"type":"string"},"type":"object"},"bonding_capacity":{"nullable":true,"type":"string"},"company_id":{"type":"integer"},"created_at":{"type":"string"},"emr":{"nullable":true,"type":"string"},"expired":{"type":"boolean"},"expires_at":{"nullable":true,"type":"string"},"id":{"type":"integer"},"project_id":{"type":"integer"},"questionnaire_id":{"type":"integer"},"questionnaire_name":{"nullable":true,"type":"string"},"reviewed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"score":{"nullable":true,"type":"integer"},"status":{"enum":["invited","submitted","under_review","approved","rejected","expired"],"type":"string"},"submitted_at":{"nullable":true,"type":"string"},"trade_scope":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"validity":{"enum":["valid","expired","not_approved"],"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["id","questionnaire_id","vendor","status","translated_status","answers"],"type":"object"}}}}},"summary":"Show a prequalification submission","tags":["prequalification"],"x-os-idempotent":false,"x-os-module":"prequalification","x-os-paginated":false},"patch":{"operationId":"updateProjectPrequalificationSubmission","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"answers":{"additionalProperties":{"type":"string"},"type":"object"},"bonding_capacity":{"nullable":true,"type":"string"},"company_id":{"type":"integer"},"created_at":{"type":"string"},"emr":{"nullable":true,"type":"string"},"expired":{"type":"boolean"},"expires_at":{"nullable":true,"type":"string"},"id":{"type":"integer"},"project_id":{"type":"integer"},"questionnaire_id":{"type":"integer"},"questionnaire_name":{"nullable":true,"type":"string"},"reviewed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"score":{"nullable":true,"type":"integer"},"status":{"enum":["invited","submitted","under_review","approved","rejected","expired"],"type":"string"},"submitted_at":{"nullable":true,"type":"string"},"trade_scope":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"validity":{"enum":["valid","expired","not_approved"],"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["id","questionnaire_id","vendor","status","translated_status","answers"],"type":"object"}}}}},"summary":"Update a prequalification submission","tags":["prequalification"],"x-os-idempotent":true,"x-os-module":"prequalification","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/prequalification/submissions/{id}/record":{"post":{"operationId":"recordProjectPrequalificationSubmission","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"prequal_submission":{"properties":{"answers":{"additionalProperties":{"nullable":true,"type":"string"},"type":"object"},"bonding_capacity":{"nullable":true,"type":"string"},"emr":{"nullable":true,"type":"string"},"trade_scope":{"nullable":true,"type":"string"}},"type":"object"}},"required":["prequal_submission"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"answers":{"additionalProperties":{"type":"string"},"type":"object"},"bonding_capacity":{"nullable":true,"type":"string"},"company_id":{"type":"integer"},"created_at":{"type":"string"},"emr":{"nullable":true,"type":"string"},"expires_at":{"nullable":true,"type":"string"},"id":{"type":"integer"},"project_id":{"type":"integer"},"questionnaire_id":{"type":"integer"},"questionnaire_name":{"nullable":true,"type":"string"},"reviewed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"score":{"nullable":true,"type":"integer"},"status":{"enum":["invited","submitted","under_review","approved","rejected","expired"],"type":"string"},"submitted_at":{"nullable":true,"type":"string"},"trade_scope":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["id","questionnaire_id","vendor","status","translated_status","answers"],"type":"object"}}}},"403":{},"404":{},"409":{},"422":{}},"summary":"Record received answers (staff action; local extension)","tags":["prequalification"],"x-os-idempotent":true,"x-os-module":"prequalification","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/prequalification/submissions/{id}/review":{"post":{"operationId":"reviewProjectPrequalificationSubmission","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"answers":{"additionalProperties":{"type":"string"},"type":"object"},"bonding_capacity":{"nullable":true,"type":"string"},"company_id":{"type":"integer"},"created_at":{"type":"string"},"emr":{"nullable":true,"type":"string"},"expired":{"type":"boolean"},"expires_at":{"nullable":true,"type":"string"},"id":{"type":"integer"},"project_id":{"type":"integer"},"questionnaire_id":{"type":"integer"},"questionnaire_name":{"nullable":true,"type":"string"},"reviewed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"score":{"nullable":true,"type":"integer"},"status":{"enum":["invited","submitted","under_review","approved","rejected","expired"],"type":"string"},"submitted_at":{"nullable":true,"type":"string"},"trade_scope":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"validity":{"enum":["valid","expired","not_approved"],"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["id","questionnaire_id","vendor","status","translated_status","answers"],"type":"object"}}}}},"summary":"Review a submission (approve/reject with score)","tags":["prequalification"],"x-os-idempotent":true,"x-os-module":"prequalification","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/productivity_logs":{"get":{"operationId":"listProjectProductivityLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"company":{"type":"string"},"contract":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"line_item_description":{"type":"string"},"line_item_holder":{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"type":"object"},"line_item_id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"notes":{"type":"string"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"previously_delivered":{"type":"string"},"previously_used":{"type":"string"},"quantity_delivered":{"type":"string"},"quantity_used":{"type":"string"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Productivity Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectProductivityLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"productivity_log":{"allOf":[{"properties":{"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"line_item_id":{"type":"integer"},"location_id":{"type":"integer"},"notes":{"type":"string"},"quantity_delivered":{"type":"string"},"quantity_used":{"type":"string"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"required":["line_item_id"],"type":"object"}},"required":["productivity_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"company":{"type":"string"},"contract":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"line_item_description":{"type":"string"},"line_item_holder":{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"type":"object"},"line_item_id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"notes":{"type":"string"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"previously_delivered":{"type":"string"},"previously_used":{"type":"string"},"quantity_delivered":{"type":"string"},"quantity_used":{"type":"string"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Productivity Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/productivity_logs/{id}":{"delete":{"operationId":"deleteProjectProductivityLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Productivity Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectProductivityLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"company":{"type":"string"},"contract":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"line_item_description":{"type":"string"},"line_item_holder":{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"type":"object"},"line_item_id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"notes":{"type":"string"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"previously_delivered":{"type":"string"},"previously_used":{"type":"string"},"quantity_delivered":{"type":"string"},"quantity_used":{"type":"string"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Productivity Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectProductivityLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"productivity_log":{"allOf":[{"properties":{"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"line_item_id":{"type":"integer"},"location_id":{"type":"integer"},"notes":{"type":"string"},"quantity_delivered":{"type":"string"},"quantity_used":{"type":"string"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["productivity_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"content_type":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"nullable":true,"type":"string"},"share_url":{"type":"string"},"url":{"type":"string"},"viewable_type":{"type":"string"},"viewable_url":{"type":"string"}},"type":"object"},"type":"array"},"company":{"type":"string"},"contract":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"line_item_description":{"type":"string"},"line_item_holder":{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"}},"type":"object"},"line_item_id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"notes":{"type":"string"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"previously_delivered":{"type":"string"},"previously_used":{"type":"string"},"quantity_delivered":{"type":"string"},"quantity_used":{"type":"string"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Productivity Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/project_report_templates":{"get":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"listProjectProjectReportTemplates","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/reporting_ReportTemplate"},"type":"array"}}}}},"summary":"List the canned report-template catalog (Reports Library)","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/project_report_templates/{id}":{"get":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"getProjectProjectReportTemplate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reporting_ReportTemplate"}}}}},"summary":"Show one report template (by id or template key)","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/project_reports":{"get":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"listProjectProjectReports","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/reporting_ProjectReport"},"type":"array"}}}}},"summary":"List a project's saved library reports","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false},"post":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"createProjectProjectReport","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reporting_ProjectReport"}}}}},"summary":"Create a project report (from a template or custom)","tags":["reporting"],"x-os-idempotent":true,"x-os-module":"reporting","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/project_reports/{id}":{"delete":{"operationId":"deleteProjectProjectReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete project report","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false},"get":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"getProjectProjectReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reporting_ProjectReport"}}}}},"summary":"Show a saved library report's configuration","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false},"patch":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"updateProjectProjectReport","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reporting_ProjectReport"}}}}},"summary":"Update a saved library report","tags":["reporting"],"x-os-idempotent":true,"x-os-module":"reporting","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/project_reports/{id}/run":{"get":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"listProjectProjectReportRun","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reporting_ComputedReport"}}}}},"summary":"Run a saved library report, returning computed rows","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/project_roles":{"get":{"operationId":"listProjectProjectRoles","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"contact_id":{"type":"integer"},"created_at":{"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"role":{"type":["string","null"]},"user_id":{"type":"integer"}},"title":"ProjectRole","type":"object"},"type":"array"}}}}},"summary":"List Project Roles","tags":["directory"],"x-os-idempotent":false,"x-os-module":"directory","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/punch_item_assignments/{id}":{"get":{"operationId":"getProjectPunchItemAssignment","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/punch_list_PunchItemAssignment"}}},"description":"The assignment."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Show Punch Assignment","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":false},"patch":{"description":"Record an assignee's response: status (unresolved, ready_for_review, resolved) and comment. Only the assignee (or a same-company peer with the respond grant, or a punch list admin) may respond, while the punch item is in a responding state. When every assignee has responded the item moves to ready_for_review. Manager acceptance (approved) and reassignment (login_information_id) are item-level: PATCH /rest/v1.0/punch_items/{id}; sending them here returns 422.","operationId":"updateProjectPunchItemAssignment","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"punch_item_assignment":{"properties":{"approved":{"description":"Read-only here; must equal the current value.","type":"boolean"},"comment":{"nullable":true,"type":"string"},"login_information_id":{"description":"Read-only here; must equal the current assignee.","type":"integer"},"status":{"enum":["unresolved","ready_for_review","resolved"],"type":"string"}},"type":"object"},"send_emails":{"description":"Accepted for compatibility; notifications follow the project's settings.","type":"string"}},"required":["punch_item_assignment"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/punch_list_PunchItemAssignment"}}},"description":"The updated assignment."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Update Punch Item Assignment","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/punch_item_templates":{"get":{"operationId":"listProjectPunchItemTemplates","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[active]","schema":{"type":"boolean"}},{"in":"query","name":"filters[updated_at]","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"active":{"type":"boolean"},"assignee":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"company_punch_item_template_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"final_approver":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"priority":{"enum":["low","medium","high",null],"nullable":true,"type":"string"},"project_id":{"type":"integer"},"punch_item_manager":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"template_category":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Template Category","type":"object"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","active"],"title":"Project Punch Item Templates","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Project Punch Item Templates","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true},"post":{"operationId":"createProjectPunchItemTemplate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[active]","schema":{"type":"boolean"}},{"in":"query","name":"filters[updated_at]","schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"punch_item_template":{"properties":{"active":{"type":"boolean"},"assignee_id":{"nullable":true,"type":"integer"},"assignee_ids":{"items":{"type":"integer"},"type":"array"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"final_approver_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"priority":{"enum":["low","medium","high",null],"nullable":true,"type":"string"},"punch_item_manager_id":{"nullable":true,"type":"integer"},"punch_item_type_id":{"nullable":true,"type":"integer"},"trade_id":{"nullable":true,"type":"integer"}},"required":["name"],"type":"object"}},"required":["punch_item_template"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"assignee":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"company_punch_item_template_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"final_approver":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"priority":{"enum":["low","medium","high",null],"nullable":true,"type":"string"},"project_id":{"type":"integer"},"punch_item_manager":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"template_category":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Template Category","type":"object"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","active"],"title":"Project Punch Item Templates","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"type":"object"}}}}},"summary":"Create a Project Punch Item Template","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/punch_item_templates/{id}":{"delete":{"operationId":"deleteProjectPunchItemTemplate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"type":"object"}}}}},"summary":"Delete a Project Punch Item Template","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false},"get":{"operationId":"getProjectPunchItemTemplate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"assignee":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"company_punch_item_template_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"final_approver":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"priority":{"enum":["low","medium","high",null],"nullable":true,"type":"string"},"project_id":{"type":"integer"},"punch_item_manager":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"template_category":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Template Category","type":"object"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","active"],"title":"Project Punch Item Templates","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"type":"object"}}}}},"summary":"Show a Project Punch Item Template","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":false},"patch":{"operationId":"updateProjectPunchItemTemplate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"punch_item_template":{"properties":{"active":{"type":"boolean"},"assignee_id":{"nullable":true,"type":"integer"},"assignee_ids":{"items":{"type":"integer"},"type":"array"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"final_approver_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"priority":{"enum":["low","medium","high",null],"nullable":true,"type":"string"},"punch_item_manager_id":{"nullable":true,"type":"integer"},"punch_item_type_id":{"nullable":true,"type":"integer"},"trade_id":{"nullable":true,"type":"integer"}},"type":"object"}},"required":["punch_item_template"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"assignee":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"company_punch_item_template_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"final_approver":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"priority":{"enum":["low","medium","high",null],"nullable":true,"type":"string"},"project_id":{"type":"integer"},"punch_item_manager":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"template_category":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Template Category","type":"object"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","active"],"title":"Project Punch Item Templates","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"type":"object"}}}}},"summary":"Update a Project Punch Item Template","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/punch_item_templates/{id}/create_punch_item":{"post":{"operationId":"createPunchItemProjectPunchItemTemplate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"punch_item":{"type":"object"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"assignments":{"items":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"formatted_status":{"type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"notified_at":{"format":"date","type":"string"},"ready_for_review_at":{"format":"date","type":"string"},"updated_at":{"format":"date","type":"string"},"work_not_accepted_at":{"format":"date","type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"attached_to_item_id":{"nullable":true,"type":"integer"},"attached_to_item_type":{"nullable":true,"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"can_email":{"type":"boolean"},"category":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Category","type":"object"},"closed_at":{"format":"date-time","type":"string"},"closed_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Closed By","type":"object"},"comments":{"items":{"properties":{"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Comment","type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"cost_impact_amount":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"enum":["DRAFT","OPEN","CLOSED"],"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"legacy_workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"nullable":true,"type":"string"},"name":{"type":"string"}},"title":"Punch Item Custom Status","type":"object"},"date_initiated":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"distribution_members":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"download_all_attachments_uuid":{"type":"string"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"final_approver":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Final Approver","type":"object"},"id":{"type":"integer"},"images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Manager","type":"object"},"punch_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Type","type":"object"},"reference":{"type":"string"},"rich_text_description":{"type":"string"},"schedule_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"type":"string"},"schedule_risk_reason":{"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"web_images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"title":"Punch Item","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"type":"object"}}}}},"summary":"Create a Punch Item from a Template","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/punch_items/{id}/attachments":{"post":{"operationId":"createProjectPunchItemAttachment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Upload punch item attachment","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/punch_list/assignees":{"get":{"operationId":"listProjectPunchListAssignees","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List of Punch List Assignee Filter Options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/punch_list/available_final_approvers":{"get":{"operationId":"listProjectPunchListAvailableFinalApprovers","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"query","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Punch List Available Final Approvers","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/punch_list/vendors":{"get":{"description":"Companies of the assignees on punch items the caller can see, sorted by name.","operationId":"listProjectPunchListVendors","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List of Punch List Vendor Filter Options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/punch_list_assignee_options":{"get":{"description":"Active project members who can be assigned punch items. query filters by name or login.","operationId":"listProjectPunchListAssigneeOptions","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"query","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Punch List Assignee options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/punch_list_read_user_options":{"get":{"description":"Active project members who can read the punch list. filters[search] matches name or login.","operationId":"listProjectPunchListReadUserOptions","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[search]","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"},"locale":{"nullable":true,"type":"string"}},"type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Punch List Read User options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/purchase_requests":{"get":{"operationId":"listProjectPurchaseRequests","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"One-based page. The computed offset must not exceed 2147483647.","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":100,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"status","schema":{"enum":["draft","submitted","returned","rejected","approved","converted"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/purchase_requests_PurchaseRequest"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"RFC 8288 pagination links for first, previous, next and last pages as applicable.","schema":{"type":"string"}},"Per-Page":{"description":"Effective page size, capped at 100.","schema":{"maximum":100,"minimum":1,"type":"integer"}},"Total":{"description":"Total matching requests before pagination.","schema":{"minimum":0,"type":"integer"}}}},"403":{"description":"Permission, tenant, tool or independent-review denial"},"404":{"description":"Record not found within project scope"},"409":{"description":"Stale version or invalid lifecycle transition"},"422":{"description":"Invalid request or references"}},"summary":"GET /rest/v1.0/projects/{project_id}/purchase_requests","tags":["purchase_requests"],"x-os-idempotent":false,"x-os-module":"purchase_requests","x-os-paginated":true},"post":{"operationId":"createProjectPurchaseRequest","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/purchase_requests_RequestInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/purchase_requests_PurchaseRequest"}}},"description":"Success"},"403":{"description":"Permission, tenant, tool or independent-review denial"},"404":{"description":"Record not found within project scope"},"409":{"description":"Stale version or invalid lifecycle transition"},"422":{"description":"Invalid request or references"}},"summary":"POST /rest/v1.0/projects/{project_id}/purchase_requests","tags":["purchase_requests"],"x-os-idempotent":true,"x-os-module":"purchase_requests","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/purchase_requests/{id}":{"get":{"operationId":"getProjectPurchaseRequest","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/purchase_requests_PurchaseRequest"}}},"description":"Success"},"403":{"description":"Permission, tenant, tool or independent-review denial"},"404":{"description":"Record not found within project scope"},"409":{"description":"Stale version or invalid lifecycle transition"},"422":{"description":"Invalid request or references"}},"summary":"GET /rest/v1.0/projects/{project_id}/purchase_requests/{id}","tags":["purchase_requests"],"x-os-idempotent":false,"x-os-module":"purchase_requests","x-os-paginated":false},"patch":{"operationId":"updateProjectPurchaseRequest","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/purchase_requests_EditInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/purchase_requests_PurchaseRequest"}}},"description":"Success"},"403":{"description":"Permission, tenant, tool or independent-review denial"},"404":{"description":"Record not found within project scope"},"409":{"description":"Stale version or invalid lifecycle transition"},"422":{"description":"Invalid request or references"}},"summary":"PATCH /rest/v1.0/projects/{project_id}/purchase_requests/{id}","tags":["purchase_requests"],"x-os-idempotent":true,"x-os-module":"purchase_requests","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/purchase_requests/{id}/budget_context":{"get":{"description":"Requires purchase_requests:read and budget:read plus both live project view grants and tool enablement. Facts are advisory existing Budget aggregates, not reserved funds. No currency or after-request projection is inferred. Converted requests are never added again to budget exposure.","operationId":"listProjectPurchaseRequestBudgetContext","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"expected_version","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"basis":{"enum":["existing_project_budget"],"type":"string"},"calculated_at":{"format":"date-time","type":"string"},"converted":{"type":"boolean"},"currency":{"description":"No currency is inferred from untyped request and budget amounts.","enum":[null],"nullable":true,"type":"string"},"projection":{"enum":["not_calculated"],"type":"string"},"request_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"request_revision":{"maximum":2147483647,"minimum":1,"type":"integer"},"request_status":{"enum":["draft","submitted","returned","rejected","approved","converted"],"type":"string"},"request_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"rows":{"items":{"additionalProperties":false,"properties":{"availability":{"enum":["budgeted","unbudgeted","not_in_budget_model"],"type":"string"},"budget_line_count":{"minimum":0,"type":"integer"},"cost_code_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"cost_code_label":{"type":"string"},"facts":{"additionalProperties":false,"nullable":true,"properties":{"committed_costs":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"direct_costs":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"pending_cost_changes":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"projected_budget":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"projected_costs":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"projected_over_under":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"},"revised_budget":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"}},"required":["revised_budget","projected_budget","committed_costs","direct_costs","pending_cost_changes","projected_costs","projected_over_under"],"type":"object"},"requested_amount":{"pattern":"^-?[0-9]+\\.[0-9]{2}$","type":"string"}},"required":["cost_code_id","cost_code_label","requested_amount","availability","budget_line_count","facts"],"type":"object"},"maxItems":100,"type":"array"}},"required":["request_id","request_revision","request_version","request_status","calculated_at","converted","currency","projection","basis","rows"],"type":"object"}}},"description":"Current request revision and current canonical budget facts.","headers":{"Cache-Control":{"description":"private, no-store","schema":{"type":"string"}}}},"403":{"description":"Missing live request/budget authority, tool enablement or read scope."},"404":{"description":"Request not in the authorized project."},"409":{"description":"Expected version is stale, or the request changed during the budget read."},"422":{"description":"Invalid or missing version or out-of-range identifier."},"503":{"description":"Budget source or precision unavailable. No totals returned."}},"summary":"Read current budget facts for the request's cost codes","tags":["purchase_requests"],"x-os-idempotent":false,"x-os-module":"purchase_requests","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/purchase_requests/{id}/transitions":{"post":{"description":"Requires purchase_requests:write scope. Conversion additionally requires commitments:write. Standard users submit their own drafts. Administrators independently approve, return or reject. Conversion requires both module admin and commitment creation authority. A conversion retry returns the original result, regardless of the old version, after rechecking authority.","operationId":"createProjectPurchaseRequestTransition","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/purchase_requests_TransitionInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/purchase_requests_PurchaseRequest"}}},"description":"Success"},"403":{"description":"Permission, tenant, tool or independent-review denial"},"404":{"description":"Record not found within project scope"},"409":{"description":"Stale version or invalid lifecycle transition"},"422":{"description":"Invalid request or references"}},"summary":"POST /rest/v1.0/projects/{project_id}/purchase_requests/{id}/transitions","tags":["purchase_requests"],"x-os-idempotent":true,"x-os-module":"purchase_requests","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/quantity_logs":{"get":{"operationId":"listProjectQuantityLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[location_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"quantity":{"type":"integer"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Quantity Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectQuantityLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"quantity_log":{"allOf":[{"properties":{"cost_code_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"quantity":{"type":"integer"},"unit":{"type":"string"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["quantity_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"quantity_log":{"properties":{"cost_code_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"quantity":{"type":"integer"},"unit":{"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["quantity_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"quantity":{"type":"integer"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Quantity Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/quantity_logs/{id}":{"delete":{"operationId":"deleteProjectQuantityLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Quantity Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectQuantityLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"quantity":{"type":"integer"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Quantity Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectQuantityLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"quantity_log":{"allOf":[{"properties":{"cost_code_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"quantity":{"type":"integer"},"unit":{"type":"string"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["quantity_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"quantity_log":{"properties":{"cost_code_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"location_id":{"type":"integer"},"mt_location":{"items":{"type":"string"},"type":"array"},"quantity":{"type":"integer"},"unit":{"type":"string"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["quantity_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"quantity":{"type":"integer"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Quantity Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/recycle_bin/correspondence/items":{"get":{"operationId":"listProjectRecycleBinCorrespondenceItems","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"assignee":{"nullable":true,"properties":{"company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"assignees":{"items":{"nullable":true,"properties":{"company":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"closed_at":{"nullable":true,"type":"string"},"cost_code":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"type":"object"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"nullable":true,"type":"string"},"generic_tool":{"properties":{"abbreviation":{"nullable":true,"type":"string"},"fields":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"private_by_default":{"type":"boolean"},"title":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"issued_at":{"nullable":true,"type":"string"},"location":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"}},"type":"object"},"number":{"type":"string"},"position":{"type":"string"},"private":{"type":"boolean"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"schedule_impact":{"nullable":true,"type":"string"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"},"status":{"type":"string"},"status_type":{"type":"string"},"title":{"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","number","title","status","generic_tool"],"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}}},"summary":"Recycle Bin","tags":["correspondence"],"x-os-idempotent":false,"x-os-module":"correspondence","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/recycle_bin/correspondence/items/{id}/restore":{"patch":{"operationId":"restoreProjectRecycleBinCorrespondenceItem","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Restore correspondence from the recycle bin","tags":["correspondence"],"x-os-idempotent":false,"x-os-module":"correspondence","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/recycle_bin/forms":{"get":{"operationId":"listProjectRecycleBinForms","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachment":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted":{"type":"boolean"},"download_all_uuid":{"additionalProperties":true,"nullable":true,"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"form_template_id":{"type":"integer"},"form_template_name":{"type":"string"},"holder_class":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"permissions":{"properties":{"can_destroy":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_email":{"type":"boolean"},"can_view_change_history":{"type":"boolean"},"can_view_download_log":{"type":"boolean"}},"type":"object"},"private":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"viewable":{"type":"boolean"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Recycled Project Forms","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/recycle_bin/forms/{id}":{"get":{"operationId":"getProjectRecycleBinForm","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachment":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted":{"type":"boolean"},"download_all_uuid":{"additionalProperties":true,"nullable":true,"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"form_template_id":{"type":"integer"},"form_template_name":{"type":"string"},"holder_class":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"permissions":{"properties":{"can_destroy":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_email":{"type":"boolean"},"can_view_change_history":{"type":"boolean"},"can_view_download_log":{"type":"boolean"}},"type":"object"},"private":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"viewable":{"type":"boolean"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Recycled Project Form","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/recycle_bin/forms/{id}/restore":{"patch":{"operationId":"restoreProjectRecycleBinForm","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachment":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted":{"type":"boolean"},"download_all_uuid":{"additionalProperties":true,"nullable":true,"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"form_template_id":{"type":"integer"},"form_template_name":{"type":"string"},"holder_class":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"permissions":{"properties":{"can_destroy":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_email":{"type":"boolean"},"can_view_change_history":{"type":"boolean"},"can_view_download_log":{"type":"boolean"}},"type":"object"},"private":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"viewable":{"type":"boolean"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Restore Project Form","tags":["forms"],"x-os-idempotent":true,"x-os-module":"forms","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/recycle_bin/incidents":{"get":{"description":"Requires the `view` permission on the project's incidents tool. A scoped API token needs `incidents:read`.","operationId":"listProjectRecycleBinIncidents","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Page number, starting at 1.","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Records per page.","in":"query","name":"per_page","schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"List recycled incidents","tags":["correspondence"],"x-os-idempotent":false,"x-os-module":"correspondence","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/recycle_bin/incidents/{id}/restore":{"patch":{"operationId":"restoreProjectRecycleBinIncident","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Restore incident from the recycle bin","tags":["correspondence"],"x-os-idempotent":false,"x-os-module":"correspondence","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/recycle_bin/observations/items":{"get":{"operationId":"listProjectRecycleBinObservationsItems","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[type_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[trade_ids]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[assignee_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[status]","schema":{"items":{"enum":[0,1,2,3,4],"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[priority]","schema":{"items":{"enum":["Low","Medium","High","Urgent"],"type":"string"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[location_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[assignee_company_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"assignee":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"title":"Observation Item Assignee","type":"object"},"assignees":{"items":{"properties":{"current":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"category":{"nullable":true,"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"name":{"type":"string"}},"type":"object"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_notified":{"format":"date","nullable":true,"type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_rich_text":{"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"number":{"type":"string"},"origin":{"nullable":true,"properties":{"payload":{"properties":{"bim_model_id":{"type":"integer"},"bim_model_name":{"type":"string"},"checklist_item_id":{"type":"integer"},"checklist_list_id":{"type":"integer"},"coordination_issue_id":{"type":"integer"},"coordination_issue_number":{"type":"integer"},"incident_action_id":{"type":"integer"},"incident_id":{"type":"integer"}},"title":"Origin Payload","type":"object"},"type":{"enum":["incident","bim_model","inspection","coordination_issue"],"type":"string"}},"title":"Observation origin","type":"object"},"permissions":{"nullable":true,"properties":{"can_edit":{"type":"boolean"}},"type":"object"},"personal":{"type":"boolean"},"priority":{"enum":["Low","Medium","High","Urgent"],"type":"string"},"specification_section":{"nullable":true,"properties":{"current_revision_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"number":{"type":"string"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"type":{"properties":{"active":{"type":"boolean"},"category":{"type":"string"},"category_id":{"deprecated":true,"type":"integer"},"category_key":{"type":"string"},"company_active":{"type":"boolean"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"kind":{"enum":["company","project"],"type":"string"},"localized_name":{"type":"string"},"name":{"type":"string"},"name_translations":{"additionalProperties":{"type":"string"},"nullable":true,"properties":{"en":{"type":"string"},"en-AU":{"type":"string"},"es":{"type":"string"},"fr-CA":{"type":"string"}},"type":"object"},"observations_category":{"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"parent_inactive":{"type":"boolean"}},"required":["id","category","name"],"title":"Observation Type","type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"Observation Item","type":"object"},"title":"Array of Recycled Observation Items","type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Recycled Observation Items","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/recycle_bin/observations/items/{id}":{"get":{"operationId":"getProjectRecycleBinObservationsItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Assignee's Company","type":"object"}},"title":"Observation Item assignee","type":"object"},"assignees":{"items":{"properties":{"current":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"category":{"nullable":true,"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"name":{"type":"string"}},"type":"object"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"contributing_behavior":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Contributing Behavior","type":"object"},"contributing_condition":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Contributing Condition","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Creator's Company","type":"object"}},"title":"Observation Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_notified":{"format":"date","nullable":true,"type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_rich_text":{"type":"string"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revisions":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"hazard":{"deprecated":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Hazard","type":"object"},"hazard_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"location_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"number":{"type":"string"},"origin":{"properties":{"payload":{"properties":{"bim_model_id":{"type":"integer"},"bim_model_name":{"type":"string"},"checklist_item_id":{"type":"integer"},"checklist_list_id":{"type":"integer"},"coordination_issue_id":{"type":"integer"},"coordination_issue_number":{"type":"integer"},"incident_action_id":{"type":"integer"},"incident_id":{"type":"integer"}},"title":"Origin Payload","type":"object"},"type":{"type":"string"}},"title":"Observation origin","type":"object"},"overdue":{"type":"boolean"},"permissions":{"nullable":true,"properties":{"can_edit":{"type":"boolean"}},"type":"object"},"personal":{"type":"boolean"},"priority":{"enum":["Low","Medium","High","Urgent",null],"nullable":true,"type":"string"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"number":{"type":"string"},"section":{"type":"string"}},"type":"object"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"},"trade":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"trade_id":{"nullable":true,"type":"integer"},"type":{"properties":{"active":{"type":"boolean"},"category":{"type":"string"},"category_id":{"deprecated":true,"type":"integer"},"category_key":{"type":"string"},"company_active":{"type":"boolean"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"kind":{"enum":["company","project"],"type":"string"},"localized_name":{"type":"string"},"name":{"type":"string"},"name_translations":{"additionalProperties":{"type":"string"},"nullable":true,"properties":{"en":{"type":"string"},"en-AU":{"type":"string"},"es":{"type":"string"},"fr-CA":{"type":"string"}},"type":"object"},"observations_category":{"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"parent_inactive":{"type":"boolean"}},"required":["id","category","name"],"title":"Observation Type","type":"object"},"updated_at":{"format":"date-time","type":"string"},"viewpoint":{"nullable":true,"properties":{"bim_file_id":{"type":"integer"},"camera_data":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"redlines_data":{"additionalProperties":true,"type":"object"},"sections_data":{"additionalProperties":true,"type":"object"}},"title":"BIM Viewpoint","type":"object"}},"title":"Observation Item","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Recycled Observation","tags":["observations"],"x-os-idempotent":false,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/recycle_bin/observations/items/{id}/restore":{"patch":{"operationId":"restoreProjectRecycleBinObservationsItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Assignee's Company","type":"object"}},"title":"Observation Item assignee","type":"object"},"assignees":{"items":{"properties":{"current":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"category":{"nullable":true,"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"name":{"type":"string"}},"type":"object"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"contributing_behavior":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Contributing Behavior","type":"object"},"contributing_condition":{"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Contributing Condition","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Observation Item Creator's Company","type":"object"}},"title":"Observation Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"date_notified":{"format":"date","nullable":true,"type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"description_rich_text":{"type":"string"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revisions":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"hazard":{"deprecated":true,"properties":{"active":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"global":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Hazard","type":"object"},"hazard_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"location_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"number":{"type":"string"},"origin":{"properties":{"payload":{"properties":{"bim_model_id":{"type":"integer"},"bim_model_name":{"type":"string"},"checklist_item_id":{"type":"integer"},"checklist_list_id":{"type":"integer"},"coordination_issue_id":{"type":"integer"},"coordination_issue_number":{"type":"integer"},"incident_action_id":{"type":"integer"},"incident_id":{"type":"integer"}},"title":"Origin Payload","type":"object"},"type":{"type":"string"}},"title":"Observation origin","type":"object"},"overdue":{"type":"boolean"},"permissions":{"nullable":true,"properties":{"can_edit":{"type":"boolean"}},"type":"object"},"personal":{"type":"boolean"},"priority":{"enum":["Low","Medium","High","Urgent",null],"nullable":true,"type":"string"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"latest_revision_url":{"nullable":true,"type":"string"},"number":{"type":"string"},"section":{"type":"string"}},"type":"object"},"status":{"enum":["initiated","ready_for_review","not_accepted","closed","draft"],"type":"string"},"trade":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"trade_id":{"nullable":true,"type":"integer"},"type":{"properties":{"active":{"type":"boolean"},"category":{"type":"string"},"category_id":{"deprecated":true,"type":"integer"},"category_key":{"type":"string"},"company_active":{"type":"boolean"},"id":{"type":"integer"},"in_use":{"type":"boolean"},"kind":{"enum":["company","project"],"type":"string"},"localized_name":{"type":"string"},"name":{"type":"string"},"name_translations":{"additionalProperties":{"type":"string"},"nullable":true,"properties":{"en":{"type":"string"},"en-AU":{"type":"string"},"es":{"type":"string"},"fr-CA":{"type":"string"}},"type":"object"},"observations_category":{"properties":{"grouping":{"enum":["quality","safety"],"nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"parent_inactive":{"type":"boolean"}},"required":["id","category","name"],"title":"Observation Type","type":"object"},"updated_at":{"format":"date-time","type":"string"},"viewpoint":{"nullable":true,"properties":{"bim_file_id":{"type":"integer"},"camera_data":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"redlines_data":{"additionalProperties":true,"type":"object"},"sections_data":{"additionalProperties":true,"type":"object"}},"title":"BIM Viewpoint","type":"object"}},"title":"Observation Item","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Retrieve Recycled Observation","tags":["observations"],"x-os-idempotent":true,"x-os-module":"observations","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/reports":{"get":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"listProjectReports","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"category":{"type":"string"},"data_source":{"type":"string"},"id":{"type":["integer","null"]},"key":{"type":"string"},"name":{"type":"string"},"type":{"enum":["built_in","saved"],"type":"string"}},"required":["id","key","name","description","category","data_source","type"],"type":"object"},"type":"array"}}}}},"summary":"List built-in and saved reports for a project","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false},"post":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"createProjectReport","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reporting_SavedReport"}}}}},"summary":"Create a saved (custom) report","tags":["reporting"],"x-os-idempotent":true,"x-os-module":"reporting","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/reports/{id}":{"delete":{"operationId":"deleteProjectReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Recycle a saved report","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false},"get":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"getProjectReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reporting_ComputedReport"}}}}},"summary":"Get a computed report (built-in key or saved-<id>)","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false},"patch":{"operationId":"updateProjectReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Update report","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis":{"get":{"operationId":"listProjectRfis","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"},{"items":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"}]},"type":"array"}]},"style":"form"},{"explode":false,"in":"query","name":"filters[status]","schema":{"oneOf":[{"enum":["open","closed","draft","closed_with_revision","closed_draft"],"type":"string"},{"items":{"enum":["open","closed","draft","closed_with_revision","closed_draft"],"type":"string"},"type":"array"}]},"style":"form"},{"explode":false,"in":"query","name":"filters[assigned_id]","required":false,"schema":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"},{"items":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"}]},"type":"array"}]},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[responsible_contractor_id]","required":false,"schema":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"},{"items":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"}]},"type":"array"}]},"style":"form"},{"explode":false,"in":"query","name":"filters[cost_code_id]","required":false,"schema":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"},{"items":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"}]},"type":"array"}]},"style":"form"},{"explode":false,"in":"query","name":"filters[received_from_login_information_id]","schema":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"},{"items":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"}]},"type":"array"}]},"style":"form"},{"explode":false,"in":"query","name":"filters[ball_in_court_id]","required":false,"schema":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"},{"items":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"}]},"type":"array"}]},"style":"form"},{"explode":false,"in":"query","name":"filters[location_id]","required":false,"schema":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"},{"items":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"}]},"type":"array"}]},"style":"form"},{"explode":false,"in":"query","name":"filters[for_location_id_with_sublocations]","required":false,"schema":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"},{"items":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"}]},"type":"array"}]},"style":"form"},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[initiated_at]","required":false,"schema":{"title":"range","type":"string"}},{"explode":false,"in":"query","name":"filters[rfi_manager_id]","schema":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"},{"items":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"}]},"type":"array"}]},"style":"form"},{"explode":false,"in":"query","name":"filters[number]","required":false,"schema":{"oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"style":"form"},{"explode":false,"in":"query","name":"filters[prefix_stage_id]","schema":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"},{"items":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"}]},"type":"array"}]},"style":"form"},{"explode":false,"in":"query","name":"filters[current_revision]","required":false,"schema":{"oneOf":[{"type":"boolean"},{"items":{"type":"boolean"},"type":"array"}]},"style":"form"},{"explode":false,"in":"query","name":"filters[sub_job_id]","required":false,"schema":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"},{"items":{"oneOf":[{"type":"integer"},{"format":"integer","type":"string"}]},"type":"array"}]},"style":"form"},{"explode":false,"in":"query","name":"filters[priority]","required":false,"schema":{"oneOf":[{"enum":["low","medium","high","urgent"],"type":"string"},{"enum":[0,1,2,3],"type":"integer"},{"enum":["0","1","2","3"],"type":"string"},{"items":{"oneOf":[{"enum":["low","medium","high","urgent"],"type":"string"},{"enum":[0,1,2,3],"type":"integer"},{"enum":["0","1","2","3"],"type":"string"}]},"type":"array"}]},"style":"form"},{"in":"query","name":"filters[linked_to_connected_rfis]","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"filters[linked_to_external_rfis]","required":false,"schema":{"type":"boolean"}},{"explode":false,"in":"query","name":"filters[overdue]","required":false,"schema":{"oneOf":[{"type":"boolean"},{"items":{"type":"boolean"},"type":"array"}]},"style":"form"},{"in":"query","name":"serializer_view","required":false,"schema":{"enum":["ids_only","base_web_index","web_index","flatten_v0"],"type":"string"}},{"in":"query","name":"as_datetimes","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"q","schema":{"type":"string"}},{"in":"query","name":"sort[attribute]","schema":{"enum":["assigned_id","ball_in_court_id","cost_code_id","cost_impact","created_by_id","date_created","drawing_number","due_date","due_date_variance","initiated_at","location_id","number","position","priority","received_from_login_information_id","reference","responsible_contractor_id","schedule_impact","specification_section_id","status","subject","time_resolved","rfi_manager_id"],"type":"string"}},{"in":"query","name":"sort[direction]","schema":{"enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"items":{"type":"integer"},"title":"ids_only","type":"array"},{"items":{"allOf":[{"properties":{"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"link":{"format":"url","type":"string"},"location_id":{"type":"integer"},"questions":{"items":{"properties":{"body":{"type":"string"},"errors":{"items":{"properties":{"errors":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"}},"type":"object"},"type":"array"},"specification_section_id":{"type":"integer"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"},"response_required":{"type":"boolean"}},"type":"object"}]},"type":"array"},"ball_in_court":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"ball_in_courts":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"connect_export_origin":{"nullable":true,"properties":{"rfi_number":{"type":"string"},"source_provider_name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"format":"float","type":"number"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"current_revision":{"type":"boolean"},"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"full_number":{"type":"string"},"has_revisions":{"type":"boolean"},"id":{"type":"integer"},"initiated_at":{"format":"date-time","type":"string"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"prefix":{"type":"string"},"private":{"type":"boolean"},"project_stage":{"properties":{"default_stage":{"type":"boolean"},"dependent_projects":{"type":"integer"},"formatted_name":{"type":"string"},"formatted_parent_name":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"type":"integer"},"source_category":{"type":"boolean"}},"type":"object"},"received_from":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"reference":{"type":"string"},"responsible_contractor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"revision":{"type":"string"},"rfi_manager":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"schedule_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"type":"integer"}},"type":"object"},"source_rfi_header_id":{"type":"integer"},"status":{"enum":["open","closed","draft","closed_with_revision","closed_draft"],"type":"string"},"sub_job":{"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"subject":{"type":"string"},"time_resolved":{"format":"date-time","type":"string"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}]},"title":"default","type":"array"},{"items":{"properties":{"id":{"type":"integer"},"rfi_full_number":{"nullable":true,"type":"string"},"rfi_subject":{"type":"string"}},"title":"base_web_index","type":"object"},"title":"base_web_index","type":"array"},{"items":{"properties":{"assignees":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"response_required":{"type":"boolean"}},"type":"object"},"type":"array"},"ball_in_courts":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"},"connect_export_origin":{"nullable":true,"properties":{"rfi_number":{"type":"string"},"source_provider_name":{"type":"string"}},"type":"object"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"properties":{"status":{"nullable":true,"type":"string"},"value":{"nullable":true,"type":"number"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_revision":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"distribution_list":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"nullable":true,"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"full_number":{"nullable":true,"type":"string"},"has_revisions":{"type":"boolean"},"id":{"type":"integer"},"initiated_at":{"format":"date-time","nullable":true,"type":"string"},"link":{"format":"url","type":"string"},"linked_external_rfis":{"items":{"properties":{"connection_status":{"enum":["connected","disconnected"],"type":"string"},"formatted_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"origin_rfi_url":{"format":"url","nullable":true,"type":"string"},"project_connection":{"nullable":true,"properties":{"upstream_company_id":{"type":"integer"},"upstream_company_name":{"type":"string"},"upstream_project_id":{"type":"integer"},"upstream_project_name":{"type":"string"}},"type":"object"},"status":{"enum":["open","open_recycled","draft","draft_recycled","closed","closed_recycled","closed_with_revision","closed_with_revision_recycled","closed_draft","closed_draft_recycled"],"type":"string"},"sync_status":{"enum":["in_sync","upstream_private"],"type":"string"},"upstream_company_name":{"type":"string"}},"type":"object"},"type":"array"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"nullable":true,"type":"string"},"permissions":{"properties":{"can_edit_distribution_list":{"type":"boolean"},"can_edit_due_date":{"type":"boolean"},"can_edit_project_stage":{"type":"boolean"},"can_edit_subject":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"prefix":{"nullable":true,"type":"string"},"priority":{"properties":{"name":{"nullable":true,"type":"string"},"value":{"nullable":true,"type":"string"}},"type":"object"},"private":{"type":"boolean"},"project_stage":{"nullable":true,"properties":{"default_stage":{"type":"boolean"},"dependent_projects":{"type":"integer"},"formatted_name":{"type":"string"},"formatted_parent_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"is_concept_stage":{"type":"boolean"},"name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"source_category":{"type":"boolean"}},"type":"object"},"proposed_solution":{"nullable":true,"type":"string"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"revision":{"type":"string"},"rfi_manager":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"schedule_impact":{"properties":{"status":{"nullable":true,"type":"string"},"value":{"nullable":true,"type":"integer"}},"type":"object"},"source_rfi_header_id":{"nullable":true,"type":"integer"},"status":{"type":"string"},"sub_job":{"nullable":true,"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"subject":{"type":"string"},"time_resolved":{"format":"date-time","nullable":true,"type":"string"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"web_index","type":"object"},"title":"web_index","type":"array"},{"items":{"properties":{"assignees":{"items":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"},"response_required":{"type":"boolean"}},"type":"object"},"type":"array"},"ball_in_courts":{"items":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"connect_export_origin":{"nullable":true,"properties":{"rfi_number":{"type":"string"},"source_provider_name":{"type":"string"}},"type":"object"},"connect_exported_project_ids":{"items":{"type":"integer"},"type":"array"},"cost_code_id":{"nullable":true,"type":"integer"},"cost_impact":{"properties":{"status":{"nullable":true,"type":"string"},"value":{"nullable":true,"type":"number"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["id","login","name"],"type":"object"},"current_revision":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"distribution_list":{"items":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"draft":{"type":"boolean"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"drawing_number":{"nullable":true,"type":"string"},"due_date":{"nullable":true,"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"full_number":{"nullable":true,"type":"string"},"has_revisions":{"type":"boolean"},"id":{"type":"integer"},"initiated_at":{"format":"date-time","nullable":true,"type":"string"},"linked_external_rfis":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"connection_status":{"type":"string"},"cover_sheet":{"nullable":true,"properties":{"attachment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"id":{"type":"integer"}},"type":"object"},"created_at":{"nullable":true,"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"due_date":{"nullable":true,"type":"string"},"formatted_name":{"nullable":true,"type":"string"},"full_position":{"nullable":true,"type":"string"},"id":{"oneOf":[{"type":"integer"},{"type":"string"}]},"initiated_at":{"nullable":true,"type":"string"},"last_updated_at":{"nullable":true,"type":"string"},"linked_drawings":{"items":{"properties":{"attachment":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"id":{"type":"integer"}},"type":"object"},"type":"array"},"project_connection":{"nullable":true,"properties":{"upstream_company_id":{"type":"integer"},"upstream_company_name":{"type":"string"},"upstream_project_id":{"type":"integer"},"upstream_project_name":{"type":"string"}},"type":"object"},"proposed_solution":{"nullable":true,"type":"string"},"question":{"nullable":true,"type":"string"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"responses":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"body":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"download_all_attachments_url":{"format":"url","type":"string"},"id":{"type":"integer"},"official":{"type":"boolean"}},"type":"object"},"type":"array"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"rfi_manager":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"status":{"enum":["open","open_recycled","draft","draft_recycled","closed","closed_recycled","closed_with_revision","closed_with_revision_recycled","closed_draft","closed_draft_recycled"],"nullable":true,"type":"string"},"subject":{"nullable":true,"type":"string"},"sync_status":{"enum":["in_sync","private"],"type":"string"},"time_resolved":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"location_id":{"nullable":true,"type":"integer"},"number":{"nullable":true,"type":"string"},"prefix":{"nullable":true,"type":"string"},"priority":{"properties":{"name":{"nullable":true,"type":"string"},"value":{"nullable":true,"type":"string"}},"type":"object"},"private":{"type":"boolean"},"project_stage_id":{"nullable":true,"type":"integer"},"proposed_solution":{"nullable":true,"type":"string"},"questions":{"items":{"properties":{"answers":{"items":{"properties":{"answer_date":{"format":"date-time","type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"official":{"type":"boolean"},"plain_text_body":{"type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"attached_to_item_id":{"nullable":true,"type":"string"},"attached_to_item_type":{"nullable":true,"type":"string"},"can_be_viewed":{"type":"boolean"},"filename":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"id":{"type":"integer"},"plain_text_body":{"type":"string"},"question_date":{"format":"date-time","type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"reference":{"nullable":true,"type":"string"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"revision":{"type":"string"},"rfi_manager":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"schedule_impact":{"properties":{"status":{"nullable":true,"type":"string"},"value":{"nullable":true,"type":"integer"}},"type":"object"},"source_rfi_header_id":{"nullable":true,"type":"integer"},"specification_section_id":{"nullable":true,"type":"integer"},"status":{"type":"string"},"sub_job_id":{"nullable":true,"type":"integer"},"subject":{"type":"string"},"time_resolved":{"format":"date-time","nullable":true,"type":"string"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"flatten_v0","type":"object"},"title":"flatten_v0","type":"array"}]}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List RFIs","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":true},"patch":{"description":"Update up to 100 RFIs in one request. Each item in `data` carries the RFI `id` and the fields to change; assignees and distribution change through add/remove lists. Items run in order through the same checks as PATCH …/rfis/{id}. A failing item does not roll back the others: `results` reports each item's status. With Idempotency-Key, a retried batch replays the first response.","operationId":"updateProjectRfis","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"add_assignee_ids":{"items":{"type":"integer"},"type":"array"},"add_distribution_ids":{"items":{"type":"integer"},"type":"array"},"add_required_assignee_ids":{"items":{"type":"integer"},"type":"array"},"cost_code_id":{"type":"integer"},"cost_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"format":"float","type":"number"}},"type":"object"},"drawing_number":{"type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"string"},"location_id":{"type":"integer"},"private":{"default":false,"type":"boolean"},"received_from_login_information_id":{"type":"integer"},"reference":{"type":"string"},"remove_assignee_ids":{"items":{"type":"integer"},"type":"array"},"remove_distribution_ids":{"items":{"type":"integer"},"type":"array"},"responsible_contractor_id":{"type":"integer"},"rfi_manager_id":{"type":"integer"},"schedule_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"type":"integer"}},"type":"object"},"specification_section_id":{"type":"integer"},"sub_job_id":{"type":"integer"},"subject":{"type":"string"}},"type":"object"},"type":"array"}},"required":["data"],"title":"RFI Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/rfis_Rfi"}],"description":"The record as the single-record route returns it (successful items only)."},"errors":{"description":"Failed items only: a message list or a field -> messages map (422).","oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]},"id":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]},"index":{"description":"Position of the item in the request array.","type":"integer"},"status":{"description":"HTTP-style status of this item: 200/201 on success, 4xx on failure.","type":"integer"}},"required":["index","status"],"type":"object"},"type":"array"},"summary":{"properties":{"failed":{"type":"integer"},"succeeded":{"type":"integer"},"total":{"type":"integer"}},"required":["total","succeeded","failed"],"type":"object"}},"required":["results","summary"],"type":"object"}}},"description":"Per-item results."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Malformed envelope."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"More than 100 items."}},"summary":"Batch Update RFIs","tags":["rfis"],"x-os-idempotent":true,"x-os-module":"rfis","x-os-paginated":false},"post":{"operationId":"createProjectRfi","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"rfi":{"properties":{"assignee_id":{"type":"integer"},"assignee_ids":{"items":{"type":"integer"},"type":"array"},"cost_code_id":{"type":"integer"},"cost_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"format":"float","type":"number"}},"type":"object"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_textfield_1":{"type":"string"},"custom_textfield_2":{"type":"string"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"draft":{"default":false,"type":"boolean"},"drawing_number":{"type":"string"},"due_date":{"format":"date","type":"string"},"location_id":{"type":"integer"},"number":{"type":"string"},"private":{"default":false,"type":"boolean"},"project_stage_id":{"type":"integer"},"question":{"properties":{"attachments":{"items":{"format":"binary","type":"string"},"type":"array"},"body":{"type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"required":["body"],"type":"object"},"received_from_login_information_id":{"type":"integer"},"reference":{"type":"string"},"required_assignee_ids":{"items":{"type":"integer"},"type":"array"},"responsible_contractor_id":{"type":"integer"},"revision":{"type":"string"},"rfi_manager_id":{"type":"integer"},"schedule_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"type":"integer"}},"type":"object"},"source_rfi_header_id":{"type":"integer"},"specification_section_id":{"type":"integer"},"subject":{"type":"string"}},"required":["subject","question","rfi_manager_id"],"type":"object"}},"required":["rfi"],"title":"RFI Body","type":"object"}},"multipart/form-data":{"schema":{"properties":{"rfi":{"properties":{"assignee_id":{"type":"integer"},"assignee_ids":{"items":{"type":"integer"},"type":"array"},"cost_code_id":{"type":"integer"},"cost_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"format":"float","type":"number"}},"type":"object"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_textfield_1":{"type":"string"},"custom_textfield_2":{"type":"string"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"draft":{"default":false,"type":"boolean"},"drawing_number":{"type":"string"},"due_date":{"format":"date","type":"string"},"location_id":{"type":"integer"},"number":{"type":"string"},"private":{"default":false,"type":"boolean"},"project_stage_id":{"type":"integer"},"question":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"body":{"type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"required":["body"],"type":"object"},"received_from_login_information_id":{"type":"integer"},"reference":{"type":"string"},"required_assignee_ids":{"items":{"type":"integer"},"type":"array"},"responsible_contractor_id":{"type":"integer"},"revision":{"type":"string"},"rfi_manager_id":{"type":"integer"},"schedule_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"type":"integer"}},"type":"object"},"source_rfi_header_id":{"type":"integer"},"specification_section_id":{"type":"integer"},"subject":{"type":"string"}},"required":["subject","question","rfi_manager_id"],"type":"object"}},"required":["rfi"],"title":"RFI Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"accepted":{"type":"boolean"},"ball_in_court_role":{"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["id","login","name"],"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_textfield_1":{"nullable":true,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"custom_textfield_2":{"nullable":true,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"distribution_list":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"draft":{"type":"boolean"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"drawing_number":{"nullable":true,"type":"string"},"questions":{"items":{"properties":{"answers":{"items":{"properties":{"answer_date":{"format":"date-time","type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"official":{"type":"boolean"},"plain_text_body":{"type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"id":{"type":"integer"},"plain_text_body":{"type":"string"},"question_date":{"format":"date-time","type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"ball_in_court":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"ball_in_courts":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"connect_export_origin":{"nullable":true,"properties":{"rfi_number":{"type":"string"},"source_provider_name":{"type":"string"}},"type":"object"},"connect_exported_project_ids":{"items":{"type":"integer"},"type":"array"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"nullable":true,"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"nullable":true,"type":"string"},"value":{"nullable":true,"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"current_revision":{"type":"boolean"},"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"full_number":{"type":"string"},"has_revisions":{"type":"boolean"},"id":{"type":"integer"},"initiated_at":{"format":"date-time","type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"prefix":{"nullable":true,"type":"string"},"private":{"type":"boolean"},"received_from":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}],"nullable":true},"reference":{"nullable":true,"type":"string"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"revision":{"type":"string"},"rfi_manager":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"schedule_impact":{"nullable":true,"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"nullable":true,"type":"string"},"value":{"nullable":true,"type":"integer"}},"type":"object"},"source_rfi_header_id":{"type":"integer"},"status":{"enum":["open","closed","draft","closed_with_revision","closed_draft"],"type":"string"},"subject":{"type":"string"},"time_resolved":{"format":"date-time","nullable":true,"type":"string"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create RFI","tags":["rfis"],"x-os-idempotent":true,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/bulk_create":{"post":{"description":"Create up to 100 RFIs. Each item is the body of POST …/rfis without the `rfi` wrapper. Items run in order; a failing item does not roll back the others. Successful items have status 201.","operationId":"createProjectRfisBulkCreate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"rfis":{"items":{"properties":{"assignee_id":{"type":"integer"},"assignee_ids":{"items":{"type":"integer"},"type":"array"},"cost_code_id":{"type":"integer"},"cost_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"format":"float","type":"number"}},"type":"object"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_textfield_1":{"type":"string"},"custom_textfield_2":{"type":"string"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"draft":{"default":false,"type":"boolean"},"drawing_number":{"type":"string"},"due_date":{"format":"date","type":"string"},"location_id":{"type":"integer"},"number":{"type":"string"},"private":{"default":false,"type":"boolean"},"project_stage_id":{"type":"integer"},"question":{"properties":{"attachments":{"items":{"format":"binary","type":"string"},"type":"array"},"body":{"type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"required":["body"],"type":"object"},"received_from_login_information_id":{"type":"integer"},"reference":{"type":"string"},"required_assignee_ids":{"items":{"type":"integer"},"type":"array"},"responsible_contractor_id":{"type":"integer"},"revision":{"type":"string"},"rfi_manager_id":{"type":"integer"},"schedule_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"type":"integer"}},"type":"object"},"source_rfi_header_id":{"type":"integer"},"specification_section_id":{"type":"integer"},"subject":{"type":"string"}},"required":["subject","question","rfi_manager_id"],"type":"object"},"maxItems":100,"minItems":1,"type":"array"}},"required":["rfis"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/rfis_Rfi"}],"description":"The record as the single-record route returns it (successful items only)."},"errors":{"description":"Failed items only: a message list or a field -> messages map (422).","oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]},"id":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]},"index":{"description":"Position of the item in the request array.","type":"integer"},"status":{"description":"HTTP-style status of this item: 200/201 on success, 4xx on failure.","type":"integer"}},"required":["index","status"],"type":"object"},"type":"array"},"summary":{"properties":{"failed":{"type":"integer"},"succeeded":{"type":"integer"},"total":{"type":"integer"}},"required":["total","succeeded","failed"],"type":"object"}},"required":["results","summary"],"type":"object"}}},"description":"Per-item results."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Malformed envelope."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"More than 100 items."}},"summary":"Bulk create RFIs","tags":["rfis"],"x-os-idempotent":true,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/default_distribution":{"get":{"operationId":"listProjectRfisDefaultDistribution","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"company_name":{"type":"string"},"locale":{"nullable":true,"type":"string"}},"type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List RFI Default Distribution","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/rfis/export":{"get":{"description":"Download the RFIs the caller can see as CSV (default) or PDF. Accepts the list filters (filters[...]) and filters[query] search. table_configuration_for_export is a JSON string; hidden columns are left out. At most 5,000 RFIs; larger matches return 422.","operationId":"listProjectRfisExport","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"export_format","schema":{"enum":["pdf","csv"],"type":"string"}},{"in":"query","name":"table_configuration_for_export","schema":{"description":"JSON: {\"columnState\":[{\"field\":\"subject\",\"hidden\":false}]}","type":"string"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"type":"string"}}},"description":"CSV or PDF document."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Download RFIs List","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/filter_options":{"get":{"description":"The filter keys the RFI list accepts (key = filters[<key>] parameter, value = label). Options per key: …/filter_options/{key}.","operationId":"listProjectRfisFilterOptions","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"oneOf":[{"type":"integer"},{"type":"string"}]},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}}},"description":"Filter keys with labels."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."}},"summary":"List available RFI filters","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/filter_options/assigned_id":{"get":{"description":"Options from the RFIs the caller can see, sorted by label. key is the id (or priority ordinal) to pass as the filter value.","operationId":"listProjectRfisFilterOptionsAssignedId","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"oneOf":[{"type":"integer"},{"type":"string"}]},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}}},"description":"Options."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."}},"summary":"List available RFI assigned_id filter options","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/filter_options/ball_in_court_id":{"get":{"description":"Options from the RFIs the caller can see, sorted by label. key is the id (or priority ordinal) to pass as the filter value.","operationId":"listProjectRfisFilterOptionsBallInCourtId","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"oneOf":[{"type":"integer"},{"type":"string"}]},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}}},"description":"Options."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."}},"summary":"List available RFI ball in court filter options","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/filter_options/cost_code_id":{"get":{"description":"Options from the RFIs the caller can see, sorted by label. key is the id (or priority ordinal) to pass as the filter value.","operationId":"listProjectRfisFilterOptionsCostCodeId","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"oneOf":[{"type":"integer"},{"type":"string"}]},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}}},"description":"Options."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."}},"summary":"List available RFI cost code options","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/filter_options/location_id":{"get":{"description":"Options from the RFIs the caller can see, sorted by label. key is the id (or priority ordinal) to pass as the filter value.","operationId":"listProjectRfisFilterOptionsLocationId","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"oneOf":[{"type":"integer"},{"type":"string"}]},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}}},"description":"Options."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."}},"summary":"List available RFIs locations","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/filter_options/prefix_stage_id":{"get":{"description":"Options from the RFIs the caller can see, sorted by label. key is the id (or priority ordinal) to pass as the filter value.","operationId":"listProjectRfisFilterOptionsPrefixStageId","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"oneOf":[{"type":"integer"},{"type":"string"}]},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}}},"description":"Options."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."}},"summary":"List available RFI Prefix Stage filter options","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/filter_options/priority":{"get":{"description":"Options from the RFIs the caller can see, sorted by label. key is the id (or priority ordinal) to pass as the filter value.","operationId":"listProjectRfisFilterOptionsPriority","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"oneOf":[{"type":"integer"},{"type":"string"}]},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}}},"description":"Options."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."}},"summary":"List available RFI Priority filter options","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/filter_options/received_from_login_information_id":{"get":{"description":"Options from the RFIs the caller can see, sorted by label. key is the id (or priority ordinal) to pass as the filter value.","operationId":"listProjectRfisFilterOptionsReceivedFromLoginInformationId","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"oneOf":[{"type":"integer"},{"type":"string"}]},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}}},"description":"Options."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."}},"summary":"List available RFI received from filter options","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/filter_options/responsible_contractor_id":{"get":{"description":"Options from the RFIs the caller can see, sorted by label. key is the id (or priority ordinal) to pass as the filter value.","operationId":"listProjectRfisFilterOptionsResponsibleContractorId","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"oneOf":[{"type":"integer"},{"type":"string"}]},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}}},"description":"Options."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."}},"summary":"List available RFI responsible contractor filter options","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/filter_options/rfi_manager_id":{"get":{"description":"Options from the RFIs the caller can see, sorted by label. key is the id (or priority ordinal) to pass as the filter value.","operationId":"listProjectRfisFilterOptionsRfiManagerId","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"oneOf":[{"type":"integer"},{"type":"string"}]},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}}},"description":"Options."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."}},"summary":"List available RFI RFI Manager filter options","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/filter_options/status":{"get":{"operationId":"listProjectRfisFilterOptionsStatus","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List available RFI status filter options","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/filter_options/sub_job_id":{"get":{"description":"Options from the RFIs the caller can see, sorted by label. key is the id (or priority ordinal) to pass as the filter value.","operationId":"listProjectRfisFilterOptionsSubJobId","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"oneOf":[{"type":"integer"},{"type":"string"}]},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}}},"description":"Options."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."}},"summary":"List available RFI Sub Job filter options","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/potential_assignees":{"get":{"operationId":"listProjectRfisPotentialAssignees","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"name":{"type":"string"}},"type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Get a list of possible assignees for an RFI","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/rfis/potential_rfi_managers":{"get":{"description":"Active project users who can act as RFI Manager: RFI admin level, or the act_as_rfi_manager granular permission.","operationId":"listProjectRfisPotentialRfiManagers","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"name":{"type":"string"}},"type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Get a list of possible RFI Managers for an RFI","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/rfis/recycle_bin":{"get":{"operationId":"listProjectRfisRecycleBin","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"link":{"format":"url","type":"string"},"location_id":{"type":"integer"},"questions":{"items":{"properties":{"body":{"type":"string"},"errors":{"items":{"properties":{"errors":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"}},"type":"object"},"type":"array"},"specification_section_id":{"type":"integer"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"},"response_required":{"type":"boolean"}},"type":"object"}]},"type":"array"},"ball_in_court":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"ball_in_courts":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"connect_export_origin":{"nullable":true,"properties":{"rfi_number":{"type":"string"},"source_provider_name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"format":"float","type":"number"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"current_revision":{"type":"boolean"},"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"full_number":{"type":"string"},"has_revisions":{"type":"boolean"},"id":{"type":"integer"},"initiated_at":{"format":"date-time","type":"string"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"prefix":{"type":"string"},"private":{"type":"boolean"},"project_stage":{"properties":{"default_stage":{"type":"boolean"},"dependent_projects":{"type":"integer"},"formatted_name":{"type":"string"},"formatted_parent_name":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"type":"integer"},"source_category":{"type":"boolean"}},"type":"object"},"received_from":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"reference":{"type":"string"},"responsible_contractor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"revision":{"type":"string"},"rfi_manager":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"schedule_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"type":"integer"}},"type":"object"},"source_rfi_header_id":{"type":"integer"},"status":{"enum":["open","closed","draft","closed_with_revision","closed_draft"],"type":"string"},"sub_job":{"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"subject":{"type":"string"},"time_resolved":{"format":"date-time","type":"string"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Recycled RFIs","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/rfis/{id}":{"get":{"operationId":"getProjectRfi","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"accepted":{"type":"boolean"},"ball_in_court_role":{"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["id","login","name"],"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_textfield_1":{"nullable":true,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"custom_textfield_2":{"nullable":true,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"distribution_list":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"draft":{"type":"boolean"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"drawing_number":{"nullable":true,"type":"string"},"questions":{"items":{"properties":{"answers":{"items":{"properties":{"answer_date":{"format":"date-time","type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"official":{"type":"boolean"},"plain_text_body":{"type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"id":{"type":"integer"},"plain_text_body":{"type":"string"},"question_date":{"format":"date-time","type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"ball_in_court":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"ball_in_courts":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"connect_export_origin":{"nullable":true,"properties":{"rfi_number":{"type":"string"},"source_provider_name":{"type":"string"}},"type":"object"},"connect_exported_project_ids":{"items":{"type":"integer"},"type":"array"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"nullable":true,"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"nullable":true,"type":"string"},"value":{"nullable":true,"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"current_revision":{"type":"boolean"},"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"full_number":{"type":"string"},"has_revisions":{"type":"boolean"},"id":{"type":"integer"},"initiated_at":{"format":"date-time","type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"prefix":{"nullable":true,"type":"string"},"private":{"type":"boolean"},"received_from":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}],"nullable":true},"reference":{"nullable":true,"type":"string"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"revision":{"type":"string"},"rfi_manager":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"schedule_impact":{"nullable":true,"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"nullable":true,"type":"string"},"value":{"nullable":true,"type":"integer"}},"type":"object"},"source_rfi_header_id":{"type":"integer"},"status":{"enum":["open","closed","draft","closed_with_revision","closed_draft"],"type":"string"},"subject":{"type":"string"},"time_resolved":{"format":"date-time","nullable":true,"type":"string"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show RFI","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false},"patch":{"operationId":"updateProjectRfi","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"rfi":{"properties":{"accepted":{"default":false,"type":"boolean"},"assignee_id":{"type":"integer"},"assignee_ids":{"items":{"type":"integer"},"type":"array"},"ball_in_court_id":{"type":"integer"},"cost_code_id":{"type":"integer"},"cost_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"format":"float","type":"number"}},"type":"object"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_textfield_1":{"type":"string"},"custom_textfield_2":{"type":"string"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"draft":{"default":false,"type":"boolean"},"drawing_number":{"type":"string"},"due_date":{"format":"date","type":"string"},"location_id":{"type":"integer"},"number":{"type":"string"},"private":{"default":false,"type":"boolean"},"project_stage_id":{"type":"integer"},"question":{"properties":{"body":{"type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"required":["body"],"type":"object"},"received_from_login_information_id":{"type":"integer"},"reference":{"type":"string"},"required_assignee_ids":{"items":{"type":"integer"},"type":"array"},"responsible_contractor_id":{"type":"integer"},"rfi_manager_id":{"type":"integer"},"schedule_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"type":"integer"}},"type":"object"},"specification_section_id":{"type":"integer"},"subject":{"type":"string"}},"type":"object"}},"required":["rfi"],"title":"RFI Update Body","type":"object"}},"multipart/form-data":{"schema":{"properties":{"rfi":{"properties":{"accepted":{"default":false,"type":"boolean"},"assignee_id":{"type":"integer"},"assignee_ids":{"items":{"type":"integer"},"type":"array"},"ball_in_court_id":{"type":"integer"},"cost_code_id":{"type":"integer"},"cost_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"format":"float","type":"number"}},"type":"object"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_textfield_1":{"type":"string"},"custom_textfield_2":{"type":"string"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"draft":{"default":false,"type":"boolean"},"drawing_number":{"type":"string"},"due_date":{"format":"date","type":"string"},"location_id":{"type":"integer"},"number":{"type":"string"},"private":{"default":false,"type":"boolean"},"project_stage_id":{"type":"integer"},"question":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"body":{"type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"required":["body"],"type":"object"},"received_from_login_information_id":{"type":"integer"},"reference":{"type":"string"},"required_assignee_ids":{"items":{"type":"integer"},"type":"array"},"responsible_contractor_id":{"type":"integer"},"rfi_manager_id":{"type":"integer"},"schedule_impact":{"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"value":{"type":"integer"}},"type":"object"},"specification_section_id":{"type":"integer"},"subject":{"type":"string"}},"type":"object"}},"required":["rfi"],"title":"RFI Update Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"accepted":{"type":"boolean"},"ball_in_court_role":{"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["id","login","name"],"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_textfield_1":{"nullable":true,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"custom_textfield_2":{"nullable":true,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"distribution_list":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"draft":{"type":"boolean"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"drawing_number":{"nullable":true,"type":"string"},"questions":{"items":{"properties":{"answers":{"items":{"properties":{"answer_date":{"format":"date-time","type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"official":{"type":"boolean"},"plain_text_body":{"type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"id":{"type":"integer"},"plain_text_body":{"type":"string"},"question_date":{"format":"date-time","type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"ball_in_court":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"ball_in_courts":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"connect_export_origin":{"nullable":true,"properties":{"rfi_number":{"type":"string"},"source_provider_name":{"type":"string"}},"type":"object"},"connect_exported_project_ids":{"items":{"type":"integer"},"type":"array"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"nullable":true,"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"nullable":true,"type":"string"},"value":{"nullable":true,"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"current_revision":{"type":"boolean"},"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"full_number":{"type":"string"},"has_revisions":{"type":"boolean"},"id":{"type":"integer"},"initiated_at":{"format":"date-time","type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"prefix":{"nullable":true,"type":"string"},"private":{"type":"boolean"},"received_from":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}],"nullable":true},"reference":{"nullable":true,"type":"string"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"revision":{"type":"string"},"rfi_manager":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"schedule_impact":{"nullable":true,"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"nullable":true,"type":"string"},"value":{"nullable":true,"type":"integer"}},"type":"object"},"source_rfi_header_id":{"type":"integer"},"status":{"enum":["open","closed","draft","closed_with_revision","closed_draft"],"type":"string"},"subject":{"type":"string"},"time_resolved":{"format":"date-time","nullable":true,"type":"string"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update RFI","tags":["rfis"],"x-os-idempotent":true,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/{id}/advance_ball_in_court":{"patch":{"operationId":"advanceBallInCourtProjectRfi","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"accepted":{"type":"boolean"},"ball_in_court_role":{"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["id","login","name"],"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_textfield_1":{"nullable":true,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"custom_textfield_2":{"nullable":true,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"distribution_list":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"draft":{"type":"boolean"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"drawing_number":{"nullable":true,"type":"string"},"questions":{"items":{"properties":{"answers":{"items":{"properties":{"answer_date":{"format":"date-time","type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"official":{"type":"boolean"},"plain_text_body":{"type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"id":{"type":"integer"},"plain_text_body":{"type":"string"},"question_date":{"format":"date-time","type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"ball_in_court":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"ball_in_courts":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"connect_export_origin":{"nullable":true,"properties":{"rfi_number":{"type":"string"},"source_provider_name":{"type":"string"}},"type":"object"},"connect_exported_project_ids":{"items":{"type":"integer"},"type":"array"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"nullable":true,"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"nullable":true,"type":"string"},"value":{"nullable":true,"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"current_revision":{"type":"boolean"},"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"full_number":{"type":"string"},"has_revisions":{"type":"boolean"},"id":{"type":"integer"},"initiated_at":{"format":"date-time","type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"prefix":{"nullable":true,"type":"string"},"private":{"type":"boolean"},"received_from":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}],"nullable":true},"reference":{"nullable":true,"type":"string"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"revision":{"type":"string"},"rfi_manager":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"schedule_impact":{"nullable":true,"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"nullable":true,"type":"string"},"value":{"nullable":true,"type":"integer"}},"type":"object"},"source_rfi_header_id":{"type":"integer"},"status":{"enum":["open","closed","draft","closed_with_revision","closed_draft"],"type":"string"},"subject":{"type":"string"},"time_resolved":{"format":"date-time","nullable":true,"type":"string"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Advance Ball in Court","tags":["rfis"],"x-os-idempotent":true,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/{id}/forward_for_review":{"patch":{"operationId":"forwardForReviewProjectRfi","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"rfi":{"properties":{"forwardee_ids":{"items":{"type":"integer"},"type":"array"}},"type":"object"}},"required":["rfi"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"accepted":{"type":"boolean"},"ball_in_court_role":{"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"login":{"type":"string"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"required":["id","login","name"],"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_textfield_1":{"nullable":true,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"custom_textfield_2":{"nullable":true,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"distribution_list":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"draft":{"type":"boolean"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"drawing_number":{"nullable":true,"type":"string"},"questions":{"items":{"properties":{"answers":{"items":{"properties":{"answer_date":{"format":"date-time","type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"official":{"type":"boolean"},"plain_text_body":{"type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"id":{"type":"integer"},"plain_text_body":{"type":"string"},"question_date":{"format":"date-time","type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"},"specification_section":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"ball_in_court":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"ball_in_courts":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"connect_export_origin":{"nullable":true,"properties":{"rfi_number":{"type":"string"},"source_provider_name":{"type":"string"}},"type":"object"},"connect_exported_project_ids":{"items":{"type":"integer"},"type":"array"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"nullable":true,"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"nullable":true,"type":"string"},"value":{"nullable":true,"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"current_revision":{"type":"boolean"},"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"full_number":{"type":"string"},"has_revisions":{"type":"boolean"},"id":{"type":"integer"},"initiated_at":{"format":"date-time","type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"prefix":{"nullable":true,"type":"string"},"private":{"type":"boolean"},"received_from":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}],"nullable":true},"reference":{"nullable":true,"type":"string"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"revision":{"type":"string"},"rfi_manager":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"schedule_impact":{"nullable":true,"properties":{"status":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"nullable":true,"type":"string"},"value":{"nullable":true,"type":"integer"}},"type":"object"},"source_rfi_header_id":{"type":"integer"},"status":{"enum":["open","closed","draft","closed_with_revision","closed_draft"],"type":"string"},"subject":{"type":"string"},"time_resolved":{"format":"date-time","nullable":true,"type":"string"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Forward For Review","tags":["rfis"],"x-os-idempotent":true,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/{id}/pdf":{"get":{"description":"The RFI as a PDF: general information, each question and its responses (official responses flagged). only_official=true keeps only official responses.","operationId":"listProjectRfiPdf","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"only_official","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"PDF document."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Download RFI as PDF","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/{id}/recycle":{"delete":{"operationId":"deleteRecycleProjectRfi","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Move RFI to the recycle bin","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false},"patch":{"operationId":"recycleProjectRfi","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Recycle RFI","tags":["rfis"],"x-os-idempotent":true,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/{id}/related_items":{"get":{"description":"Requires the `view` permission on the project's RFIs tool. A scoped API token needs `rfis:read`.","operationId":"listProjectRfiRelatedItems","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"related_item":{"properties":{"item_id":{"exclusiveMinimum":0,"type":"integer"},"item_type":{"enum":["rfis","submittals","drawings","change_events","photos"],"type":"string"}},"required":["item_type","item_id"],"type":"object"}},"required":["related_item"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"array"}}},"description":"Created."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"List RFI related items","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false},"post":{"operationId":"createProjectRfiRelatedItem","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create RFI related item","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/{id}/related_items/{related_item_id}":{"delete":{"operationId":"deleteProjectRfiRelatedItem","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"related_item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete RFI related item","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/{id}/retrieve":{"patch":{"description":"Restore an RFI from the Recycle Bin. Requires RFI delete permission.","operationId":"retrieveProjectRfi","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rfis_Rfi"}}},"description":"The restored RFI."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Retrieve Recycled RFI","tags":["rfis"],"x-os-idempotent":true,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/{rfi_id}/replies":{"get":{"operationId":"listProjectRfiReplies","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"rfi_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"answer_date":{"format":"date-time","type":"string"},"attachments":{"items":{"properties":{"filename":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"official":{"type":"boolean"},"plain_text_body":{"type":"string"},"rich_text_body":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List RFI Replies","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":true},"post":{"operationId":"createProjectRfiReply","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"rfi_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"reply":{"properties":{"body":{"type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"official":{"type":"boolean"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"required":["reply"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"answer_date":{"format":"date-time","type":"string"},"attachments":{"items":{"properties":{"filename":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"official":{"type":"boolean"},"plain_text_body":{"type":"string"},"rich_text_body":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create RFI Reply","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/rfis/{rfi_id}/replies/{id}":{"delete":{"description":"Delete a response on an open RFI. RFI admins may delete any response; others only their own response that is not official.","operationId":"deleteProjectRfiReply","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"rfi_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Delete an RFI Response","tags":["rfis"],"x-os-idempotent":true,"x-os-module":"rfis","x-os-paginated":false},"get":{"operationId":"getProjectRfiReply","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"rfi_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"answer_date":{"format":"date-time","type":"string"},"attachments":{"items":{"properties":{"filename":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"official":{"type":"boolean"},"plain_text_body":{"type":"string"},"rich_text_body":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show RFI Reply","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false},"patch":{"operationId":"updateProjectRfiReply","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"rfi_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reply":{"properties":{"official":{"type":"boolean"}},"type":"object"}},"required":["reply"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"answer_date":{"format":"date-time","type":"string"},"attachments":{"items":{"properties":{"filename":{"deprecated":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"type":"string"},"created_by_id":{"type":"integer"},"id":{"type":"integer"},"official":{"type":"boolean"},"plain_text_body":{"type":"string"},"rich_text_body":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update RFI Reply","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/safety_violation_logs":{"get":{"operationId":"listProjectSafetyViolationLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"compliance_due":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"issued_to":{"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"safety_notice":{"type":"string"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"subject":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Safety Violation Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectSafetyViolationLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"safety_violation_log":{"allOf":[{"properties":{"comments":{"type":"string"},"compliance_due":{"format":"date","type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"issued_to":{"type":"string"},"location_id":{"type":"integer"},"safety_notice":{"type":"string"},"subject":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"required":["time_hour","time_minute"],"type":"object"}},"required":["safety_violation_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"safety_violation_log":{"properties":{"comments":{"type":"string"},"compliance_due":{"format":"date","type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"issued_to":{"type":"string"},"location_id":{"type":"integer"},"safety_notice":{"type":"string"},"subject":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"vendor_id":{"type":"integer"}},"required":["time_hour","time_minute"],"type":"object"}},"required":["safety_violation_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"compliance_due":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"issued_to":{"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"safety_notice":{"type":"string"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"subject":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Safety Violation Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/safety_violation_logs/{id}":{"delete":{"operationId":"deleteProjectSafetyViolationLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Safety Violation Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectSafetyViolationLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"compliance_due":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"issued_to":{"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"safety_notice":{"type":"string"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"subject":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Safety Violation Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectSafetyViolationLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"safety_violation_log":{"allOf":[{"properties":{"comments":{"type":"string"},"compliance_due":{"format":"date","type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"issued_to":{"type":"string"},"location_id":{"type":"integer"},"safety_notice":{"type":"string"},"subject":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["safety_violation_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"safety_violation_log":{"properties":{"comments":{"type":"string"},"compliance_due":{"format":"date","type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"issued_to":{"type":"string"},"location_id":{"type":"integer"},"safety_notice":{"type":"string"},"subject":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["safety_violation_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"compliance_due":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"issued_to":{"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"safety_notice":{"type":"string"},"status":{"enum":["approved","pending","rejected"],"type":"string"},"subject":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Safety Violation Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/saved_views":{"get":{"description":"A scoped API token needs `saved_views:read`.","operationId":"listProjectSavedViews","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"tool","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"JSON request body.","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"description":"Created."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"List saved views","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false},"post":{"operationId":"createProjectSavedView","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create saved view","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/saved_views/{id}":{"delete":{"operationId":"deleteProjectSavedView","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete saved view","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false},"get":{"description":"A scoped API token needs `saved_views:read`.","operationId":"getProjectSavedView","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"No content."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Get saved view","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule":{"get":{"operationId":"listProjectSchedule","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"active_features":{"properties":{"schedule_activity_feed":{"type":"boolean"},"schedule_gantt_crud":{"type":"boolean"},"schedule_linked_items":{"type":"boolean"},"schedule_task_comments":{"type":"boolean"},"schedule_task_details":{"type":"boolean"}},"type":"object"},"data_date":{"format":"date-time","nullable":true,"type":"string"},"last_calendar_view":{"type":"string"},"lookahead_data_date":{"format":"date-time","nullable":true,"type":"string"},"number_of_pending_requested_changes":{"type":"number"},"office":{"properties":{"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"country_code":{"type":"string"},"division":{"nullable":true,"type":"string"},"fax":{"nullable":true,"type":"string"},"id":{"type":"integer"},"logo":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"name":{"type":"string"},"phone":{"nullable":true,"type":"string"},"state_code":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"title":"Office","type":"object"},"project":{"properties":{"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"country_code":{"type":"string"},"country_name":{"type":"string"},"county":{"nullable":true,"type":"string"},"fax":{"nullable":true,"type":"string"},"id":{"type":"integer"},"logo_url":{"type":"string"},"phone":{"nullable":true,"type":"string"},"state_code":{"nullable":true,"type":"string"},"state_name":{"nullable":true,"type":"string"},"time_zone":{"type":"string"},"time_zone_name":{"type":"string"},"zip":{"nullable":true,"type":"string"}},"title":"Project","type":"object"},"schedule_crud_beta_agreement":{"properties":{"signed":{"type":"boolean"},"version":{"type":"string"}},"type":"object"},"schedule_present":{"type":"boolean"},"schedule_processing":{"type":"boolean"},"schedule_tasks_edited_manually":{"type":"boolean"},"schedule_tasks_last_updated_at":{"format":"date-time","nullable":true,"type":"string"},"type":{"properties":{"key":{"enum":["Microsoft Project","Microsoft Project 2010","Microsoft Project Documents","Primavera P6",null],"nullable":true,"type":"string"},"p6_id":{"nullable":true,"type":"string"}},"type":"object"},"uploaded_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Get Schedule Metadata","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"patch":{"operationId":"scheduleProject","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"type":{"properties":{"key":{"enum":["Microsoft Project","Microsoft Project 2010","Microsoft Project Documents","Primavera P6"],"type":"string"},"p6_id":{"type":"string"}},"title":"Schedule Type","type":"object"}},"required":["project_id","type"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"active_features":{"properties":{"schedule_activity_feed":{"type":"boolean"},"schedule_gantt_crud":{"type":"boolean"},"schedule_linked_items":{"type":"boolean"},"schedule_task_comments":{"type":"boolean"},"schedule_task_details":{"type":"boolean"}},"type":"object"},"data_date":{"format":"date-time","nullable":true,"type":"string"},"last_calendar_view":{"type":"string"},"lookahead_data_date":{"format":"date-time","nullable":true,"type":"string"},"number_of_pending_requested_changes":{"type":"number"},"office":{"properties":{"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"country_code":{"type":"string"},"division":{"nullable":true,"type":"string"},"fax":{"nullable":true,"type":"string"},"id":{"type":"integer"},"logo":{"nullable":true,"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"name":{"type":"string"},"phone":{"nullable":true,"type":"string"},"state_code":{"nullable":true,"type":"string"},"zip":{"nullable":true,"type":"string"}},"title":"Office","type":"object"},"project":{"properties":{"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"country_code":{"type":"string"},"country_name":{"type":"string"},"county":{"nullable":true,"type":"string"},"fax":{"nullable":true,"type":"string"},"id":{"type":"integer"},"logo_url":{"type":"string"},"phone":{"nullable":true,"type":"string"},"state_code":{"nullable":true,"type":"string"},"state_name":{"nullable":true,"type":"string"},"time_zone":{"type":"string"},"time_zone_name":{"type":"string"},"zip":{"nullable":true,"type":"string"}},"title":"Project","type":"object"},"schedule_crud_beta_agreement":{"properties":{"signed":{"type":"boolean"},"version":{"type":"string"}},"type":"object"},"schedule_present":{"type":"boolean"},"schedule_processing":{"type":"boolean"},"schedule_tasks_edited_manually":{"type":"boolean"},"schedule_tasks_last_updated_at":{"format":"date-time","nullable":true,"type":"string"},"type":{"properties":{"key":{"enum":["Microsoft Project","Microsoft Project 2010","Microsoft Project Documents","Primavera P6",null],"nullable":true,"type":"string"},"p6_id":{"nullable":true,"type":"string"}},"type":"object"},"uploaded_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Schedule Metadata","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/activity-comments":{"get":{"description":"Requires schedule:read and live Schedule view access on the project. Non-admins only see discussion on activities bound to a field task they can see; private threads are visible to their author only. Threads (root comments with their replies) in order, with open/resolved/total counts.","operationId":"listProjectScheduleActivityComments","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"activity_id","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"default":"all","enum":["open","resolved","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleCommentList"}}},"description":"Threads"},"400":{"description":"Invalid query or body"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, tool enablement or token scope denied"},"404":{"description":"Activity not visible"},"422":{"description":"Invalid filter"}},"summary":"List activity discussion","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires schedule:write and live Schedule edit access on the project. Mentions notify (in-app and by preference email) only people who currently have Schedule access to the activity; a reply also notifies the thread's earlier participants. Audited without the text.","operationId":"createProjectScheduleActivityComment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleCommentCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"comment":{"$ref":"#/components/schemas/schedule_ScheduleActivityComment"}},"required":["comment"],"type":"object"}}},"description":"Created"},"400":{"description":"Invalid query or body"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, tool enablement or token scope denied"},"404":{"description":"Activity or thread not found"},"409":{"description":"The thread was deleted"},"413":{"description":"Body too large"},"415":{"description":"Not JSON"},"422":{"description":"Invalid comment"}},"summary":"Comment on an activity or reply","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/activity-comments/counts":{"get":{"description":"Requires schedule:read and live Schedule view access on the project. Non-admins only see discussion on activities bound to a field task they can see; private threads are visible to their author only. Open threads, resolved threads and live comments per canonical activity id (the planner's Open Comments / Comments columns).","operationId":"listProjectScheduleActivityCommentsCounts","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"counts":{"additionalProperties":{"additionalProperties":false,"properties":{"open":{"type":"integer"},"resolved":{"type":"integer"},"total":{"type":"integer"}},"required":["open","resolved","total"],"type":"object"},"type":"object"}},"required":["counts"],"type":"object"}}},"description":"Counts"},"400":{"description":"Invalid query or body"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, tool enablement or token scope denied"}},"summary":"Comment counts per activity","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/activity-comments/mentionable":{"get":{"description":"Requires schedule:read and live Schedule view access on the project. Active project users (and company admins) with Schedule access; with `activity_id`, only those who can see that activity.","operationId":"listProjectScheduleActivityCommentsMentionable","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"activity_id","required":false,"schema":{"maxLength":200,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"users":{"items":{"additionalProperties":false,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","name","login"],"type":"object"},"type":"array"}},"required":["users"],"type":"object"}}},"description":"People"},"400":{"description":"Invalid query or body"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, tool enablement or token scope denied"},"404":{"description":"Activity not visible"}},"summary":"People a mention can reach","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/activity-comments/{comment_id}":{"delete":{"description":"Requires schedule:write and live Schedule edit access on the project. Your own comments (Schedule admins: any). The comment keeps its place in the thread with no text. Audited.","operationId":"deleteProjectScheduleActivityComment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"comment_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"deleted":{"enum":[true],"type":"boolean"},"id":{"type":"integer"}},"required":["deleted","id"],"type":"object"}}},"description":"Deleted"},"400":{"description":"Invalid query or body"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, tool enablement or token scope denied"},"404":{"description":"Comment not found or not visible"}},"summary":"Delete a comment","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false},"patch":{"description":"Requires schedule:write and live Schedule edit access on the project. Edit your own comment's text (newly mentioned people are notified) or resolve / reopen a thread root. Audited.","operationId":"updateProjectScheduleActivityComment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"comment_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleCommentUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"comment":{"$ref":"#/components/schemas/schedule_ScheduleActivityComment"}},"required":["comment"],"type":"object"}}},"description":"Updated"},"400":{"description":"Invalid query or body"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, tool enablement or token scope denied"},"404":{"description":"Comment not found or not visible"},"409":{"description":"The comment was deleted or changed concurrently"},"422":{"description":"Invalid change"}},"summary":"Edit or resolve a comment","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/analysis-jobs":{"get":{"description":"Newest first. Requires live Schedule admin access and schedule:read token scope. Filters: `kind`, `active=true|false` (queued or running only), `scenario_id`, `before_id`, `page_size` (1-100, default 25). Private, no-store.","operationId":"listProjectScheduleAnalysisJobs","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"kind","required":false,"schema":{"enum":["calculation","forensic","scenario_calculate","scenario_compression","resource_report"],"type":"string"}},{"in":"query","name":"active","required":false,"schema":{"enum":["true","false"],"type":"string"}},{"in":"query","name":"scenario_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"jobs":{"items":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"},"type":"array"},"next_before_id":{"nullable":true,"type":"integer"}},"required":["jobs","next_before_id"],"type":"object"}}},"description":"Job page"},"400":{"description":"Invalid identifier or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Job not found in this project"}},"summary":"List background schedule analysis jobs","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/analysis-jobs/{job_id}":{"get":{"description":"Status, progress and, once completed, the retained resource. Requires live Schedule admin access and schedule:read token scope. Active jobs carry `Retry-After: 2`. No query parameters.","operationId":"getProjectScheduleAnalysisJob","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"job_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"}},"required":["job"],"type":"object"}}},"description":"Job"},"400":{"description":"Invalid identifier or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Job not found in this project"}},"summary":"Read a background schedule analysis job","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/analysis-jobs/{job_id}/cancel":{"post":{"description":"Cancels a queued job, or stops a running one and kills its engine child. Finished jobs are returned unchanged. A run whose result was being persisted at the moment of cancellation may still be retained. Requires live Schedule admin access and schedule:write token scope. No body or query parameters.","operationId":"cancelProjectScheduleAnalysisJob","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"job_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"}},"required":["job"],"type":"object"}}},"description":"Job after cancellation"},"400":{"description":"Invalid identifier or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Job not found in this project"}},"summary":"Cancel a background schedule analysis job","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/assistant":{"get":{"description":"Requires Schedule admin and the schedule:read token scope. enabled is true only when an AI provider key is configured, SCHEDULE_ASSISTANT_ENABLED=1, and the company has not turned AI off (ask_llm_enabled). No query parameters. Private, no-store.","operationId":"listProjectScheduleAssistant","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleAssistantStatus"}}},"description":"Availability"},"400":{"description":"Query parameters are not accepted"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"}},"summary":"Schedule assistant availability","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires live Schedule admin access (complete-network dates and float can disclose private activities) and the schedule:read token scope. Reads only retained evidence: the saved head version, its own retained schedule calculation (exact input, no data-date override), a named baseline's original calculation, and the latest retained health, resource histogram and cost dashboard. Never runs the engine and never writes. All responses are private, no-store. Builds a bounded list of numbered facts from persisted evidence (versions, version diff, retained schedule, compare, health and risk calculations, retained date traces, open scenarios, and cost-loaded EVM only with budget:read and live Budget view) and asks the configured Claude model to answer only from them. Citations that do not match a fact are removed; an answer that cites nothing is retried once and then returned with grounded=false. The assistant never edits the schedule: a suggested change is returned as a scenario proposal validated against the base version, which the user may save as an open what-if scenario (POST /schedule/scenarios) and adopt explicitly. Counts against a per-user hourly cap (SCHEDULE_ASSISTANT_HOURLY_LIMIT, default 30). No query parameters.","operationId":"createProjectScheduleAssistant","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleAssistantQuestion"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleAssistantAnswer"}}},"description":"Grounded answer"},"400":{"description":"Invalid or repeated query parameter, or no saved schedule"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"The assistant is not available for this workspace"},"408":{"description":"Request cancelled"},"409":{"description":"Stored schedule or baseline evidence failed its integrity check"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The AI provider declined the question"},"429":{"description":"Hourly assistant limit reached; retry after the indicated delay"},"502":{"description":"The answer could not be validated against the schedule facts"},"503":{"description":"The AI provider is unavailable"}},"summary":"Ask a grounded question about the schedule, or draft an update narrative","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/baseline-assignments":{"get":{"description":"Assign Baselines (P6). Requires live Schedule admin access on the project. The project baseline is shared by everyone on the project and every change to it is recorded in the project audit log. Primary, secondary and tertiary baselines are the caller's own and never affect other users; the primary slot falls back to the project baseline when the caller has not chosen one. Assignments are view choices: they never change a schedule or a baseline. All responses are private, no-store. No query parameters. Requires schedule:read.","operationId":"listProjectScheduleBaselineAssignments","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleBaselineAssignments"}}},"description":"Assignments in effect for the caller"},"400":{"description":"Invalid body, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or Schedule admin permission denied"},"404":{"description":"Project, or a baseline that is not one of this project's named baselines"}},"summary":"Get the project baseline and my baseline slots","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"put":{"description":"Assign Baselines (P6). Requires live Schedule admin access on the project. The project baseline is shared by everyone on the project and every change to it is recorded in the project audit log. Primary, secondary and tertiary baselines are the caller's own and never affect other users; the primary slot falls back to the project baseline when the caller has not chosen one. Assignments are view choices: they never change a schedule or a baseline. All responses are private, no-store. No query parameters. Requires schedule:write. Send only the fields to change; null clears a slot. Every baseline id must be a named baseline of this project.","operationId":"replaceProjectScheduleBaselineAssignments","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleBaselineAssignmentUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleBaselineAssignments"}}},"description":"Assignments after the change"},"400":{"description":"Invalid body, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or Schedule admin permission denied"},"404":{"description":"Project, or a baseline that is not one of this project's named baselines"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Body failed schema validation"}},"summary":"Assign the project baseline or my primary, secondary and tertiary baselines","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/baselines":{"get":{"description":"Schedule admin and schedule:read required. Newest first, cursor pagination, private/no-store. Baselines remain fixed to their selected versions as the head changes.","operationId":"listProjectScheduleBaselines","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"baselines":{"items":{"additionalProperties":false,"properties":{"company_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"kind":{"type":"string"},"name":{"type":"string"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"request_id":{"format":"uuid","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","company_id","project_id","version_id","name","kind","request_id","created_by_id","created_at"],"type":"object"},"type":"array"},"next_before_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["baselines","next_before_id"],"type":"object"}}},"description":"Success"},"400":{"description":"Invalid query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin permission and token scope required"},"404":{"description":"Project or version not found"},"409":{"description":"Request replay conflict or saved version integrity failure"},"422":{"description":"Invalid request"}},"summary":"List named schedule baselines","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Schedule admin and schedule:write required. Select an explicit saved version. Does not approve a version, calculate or publish field tasks. Persist a UUID request_id across retries: identical actor and normalized input replay the original record with 200; changed selection conflicts. New records and audit events commit atomically. All responses are private/no-store.","operationId":"createProjectScheduleBaseline","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"kind":{"default":"project","maxLength":64,"minLength":1,"type":"string"},"name":{"maxLength":255,"minLength":1,"type":"string"},"request_id":{"format":"uuid","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","name","request_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"baseline":{"additionalProperties":false,"properties":{"company_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"kind":{"type":"string"},"name":{"type":"string"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"request_id":{"format":"uuid","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","company_id","project_id","version_id","name","kind","request_id","created_by_id","created_at"],"type":"object"},"replayed":{"type":"boolean"}},"required":["baseline","replayed"],"type":"object"}}},"description":"Success"},"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"baseline":{"additionalProperties":false,"properties":{"company_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"kind":{"type":"string"},"name":{"type":"string"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"request_id":{"format":"uuid","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","company_id","project_id","version_id","name","kind","request_id","created_by_id","created_at"],"type":"object"},"replayed":{"type":"boolean"}},"required":["baseline","replayed"],"type":"object"}}},"description":"Success"},"400":{"description":"Invalid query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin permission and token scope required"},"404":{"description":"Project or version not found"},"409":{"description":"Request replay conflict or saved version integrity failure"},"422":{"description":"Invalid request"}},"summary":"Create an immutable named schedule baseline","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/baselines/{baseline_id}/timeline":{"get":{"description":"Returns the earliest exact-input schedule calculation retained no later than named baseline creation. Requires live project Schedule admin permission and schedule:read token scope. Responses are private, no-store. Does not recalculate, approve, publish or mutate a schedule. Activity dates are original engine wall-clock strings, or null when unavailable; do not reinterpret them as UTC instants. Includes calculation, engine and definition provenance. Rates, resources and unrelated result fields are excluded. No query parameters are accepted. Missing or inconsistent original evidence returns 409; responses exceeding 8 MiB return 413.","operationId":"listProjectScheduleBaselineTimeline","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"baseline_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"activities":{"items":{"additionalProperties":false,"properties":{"duration_days":{"description":"The baseline version's authored original duration (working days), when present.","nullable":true,"type":"number"},"finish":{"nullable":true,"type":"string"},"id":{"type":"string"},"kind":{"nullable":true,"type":"string"},"name":{"type":"string"},"planned":{"additionalProperties":false,"description":"The baseline version's planned (budgeted) costs and units of the activity by resource type: P6 BaselinePlannedTotalCost, BaselinePlannedLaborCost ... BaselinePlannedNonLaborUnits (Baseline1/2/3 when assigned to a slot). Null when the activity has no resource assignment or expense. The planner's Variance - BLn cost and units columns subtract the current at completion values from these.","nullable":true,"properties":{"expense_cost":{"nullable":true,"type":"number"},"labor_cost":{"nullable":true,"type":"number"},"labor_units":{"nullable":true,"type":"number"},"material_cost":{"nullable":true,"type":"number"},"nonlabor_cost":{"nullable":true,"type":"number"},"nonlabor_units":{"nullable":true,"type":"number"},"total_cost":{"nullable":true,"type":"number"}},"type":"object"},"start":{"nullable":true,"type":"string"}},"required":["id","name","kind","start","finish"],"type":"object"},"type":"array"},"baseline_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"baseline_name":{"type":"string"},"calculated_at":{"format":"date-time","type":"string"},"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"company_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"engine_revision":{"type":"string"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["company_id","project_id","baseline_id","version_id","version","calculation_id","baseline_name","definition_digest","engine_revision","calculated_at","activities"],"type":"object"}}},"description":"Original baseline dates and provenance","headers":{"Cache-Control":{"description":"private, no-store","schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"required":["errors"],"type":"object"}}},"description":"Query parameters are not supported."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"required":["errors"],"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"required":["errors"],"type":"object"}}},"description":"Schedule admin permission or schedule:read scope is missing, or the tool is disabled."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"required":["errors"],"type":"object"}}},"description":"Project or named baseline not found in scope."},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"required":["errors"],"type":"object"}}},"description":"Request cancelled."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"required":["errors"],"type":"object"}}},"description":"Original baseline calculation unavailable or failed integrity checks."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"required":["errors"],"type":"object"}}},"description":"Timeline response exceeds 8 MiB."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{}},"required":["errors"],"type":"object"}}},"description":"Baseline identifier exceeds the supported bounds."}},"summary":"Read original saved baseline timeline","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/budget-reports":{"get":{"description":"Requires schedule:read plus budget:read token scopes, live Schedule admin and Budget view permissions, and both tools enabled. Retains explicit activity/budget-line allocations and a point-in-time snapshot from the owning Budget service. Mapped plus unmapped totals reconcile exactly in cents. Currency is undeclared; these are not ledger actuals or an approved cost baseline. No budgets, forecasts, plan heads or field tasks are changed. Historical reports never refresh on read. Private, no-store. Metadata only, descending IDs; pass next_before_id as before_id. Optional version_id filter.","operationId":"listProjectScheduleBudgetReports","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"version_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_before_id":{"type":["integer","null"]},"reports":{"items":{"additionalProperties":false,"properties":{"analysis_revision":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","analysis_revision","input_digest","created_by_id","created_at"],"type":"object"},"type":"array"}},"required":["reports","next_before_id"],"type":"object"}}},"description":"Bounded assessment metadata page"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"408":{"description":"Assessment cancelled"},"422":{"description":"Invalid selection"}},"summary":"List retained Budget reconciliation history","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires schedule:write plus budget:read token scopes, live Schedule admin and Budget view permissions, and both tools enabled. Retains explicit activity/budget-line allocations and a point-in-time snapshot from the owning Budget service. Mapped plus unmapped totals reconcile exactly in cents. Currency is undeclared; these are not ledger actuals or an approved cost baseline. No budgets, forecasts, plan heads or field tasks are changed. Historical reports never refresh on read. Private, no-store.","operationId":"createProjectScheduleBudgetReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expected_source_digest":{"description":"Optional reviewed Budget snapshot digest. A changed source returns 409 instead of retaining a different snapshot.","pattern":"^[a-f0-9]{64}$","type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"activity_id":{"maxLength":512,"minLength":1,"type":"string"},"allocation_basis_points":{"maximum":10000,"minimum":1,"type":"integer"},"budget_line_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["activity_id","budget_line_id","allocation_basis_points"],"type":"object"},"maxItems":10000,"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","mappings"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"analysis_revision":{"description":"Version of the suite Budget allocation algorithm; not the CPM engine.","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"parameters":{"additionalProperties":false,"properties":{"expected_source_digest":{"description":"Optional reviewed Budget snapshot digest. A changed source returns 409 instead of retaining a different snapshot.","pattern":"^[a-f0-9]{64}$","type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"activity_id":{"maxLength":512,"minLength":1,"type":"string"},"allocation_basis_points":{"maximum":10000,"minimum":1,"type":"integer"},"budget_line_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["activity_id","budget_line_id","allocation_basis_points"],"type":"object"},"maxItems":10000,"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","mappings"],"type":"object"},"report":{"additionalProperties":false,"properties":{"allocations":{"items":{"additionalProperties":false,"properties":{"activity_id":{"type":["string","null"]},"allocation_basis_points":{"maximum":10000,"minimum":1,"type":"integer"},"amounts":{"additionalProperties":false,"properties":{"approved_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget_modifications":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"committed_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"direct_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"estimated_cost_at_completion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_to_complete":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"original_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_budget_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_cost_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"revised_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["original_budget","budget_modifications","approved_changes","revised_budget","pending_budget_changes","projected_budget","committed_costs","direct_costs","pending_cost_changes","projected_costs","forecast_to_complete","estimated_cost_at_completion"],"type":"object"},"budget_line_id":{"type":"integer"}},"required":["budget_line_id","activity_id","allocation_basis_points","amounts"],"type":"object"},"type":"array"},"coverage":{"items":{"additionalProperties":false,"properties":{"budget_line_id":{"type":"integer"},"mapped_basis_points":{"maximum":10000,"minimum":0,"type":"integer"},"synthetic":{"type":"boolean"}},"required":["budget_line_id","mapped_basis_points","synthetic"],"type":"object"},"type":"array"},"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mapped":{"additionalProperties":false,"properties":{"approved_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget_modifications":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"committed_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"direct_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"estimated_cost_at_completion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_to_complete":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"original_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_budget_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_cost_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"revised_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["original_budget","budget_modifications","approved_changes","revised_budget","pending_budget_changes","projected_budget","committed_costs","direct_costs","pending_cost_changes","projected_costs","forecast_to_complete","estimated_cost_at_completion"],"type":"object"},"mapping_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"activity_id":{"maxLength":512,"minLength":1,"type":"string"},"allocation_basis_points":{"maximum":10000,"minimum":1,"type":"integer"},"budget_line_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["activity_id","budget_line_id","allocation_basis_points"],"type":"object"},"maxItems":10000,"type":"array"},"rounding_policy":{"type":"string"},"source_basis":{"additionalProperties":false,"properties":{"currency":{"type":"null"},"currency_status":{"enum":["not_declared_by_budget_source"],"type":"string"},"isolation":{"enum":["repeatable_read"],"type":"string"},"ledger_actuals_verified":{"enum":[false],"type":"boolean"},"owner":{"enum":["budget"],"type":"string"},"qualification":{"type":"string"},"read_finished_at":{"format":"date-time","type":"string"},"read_started_at":{"format":"date-time","type":"string"},"view":{"enum":["current_computed_budget"],"type":"string"}},"required":["owner","view","isolation","read_started_at","read_finished_at","currency","currency_status","ledger_actuals_verified","qualification"],"type":"object"},"source_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"source_lines":{"items":{"additionalProperties":false,"properties":{"amounts":{"additionalProperties":false,"properties":{"approved_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget_modifications":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"committed_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"direct_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"estimated_cost_at_completion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_to_complete":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"original_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_budget_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_cost_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"revised_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["original_budget","budget_modifications","approved_changes","revised_budget","pending_budget_changes","projected_budget","committed_costs","direct_costs","pending_cost_changes","projected_costs","forecast_to_complete","estimated_cost_at_completion"],"type":"object"},"category_id":{"type":["integer","null"]},"cost_code":{"description":"Label captured with the Budget source; older reports may omit it.","type":["string","null"]},"cost_code_id":{"type":"integer"},"cost_code_name":{"description":"Label captured with the Budget source; older reports may omit it.","type":["string","null"]},"description":{"type":["string","null"]},"id":{"type":"integer"},"synthetic":{"type":"boolean"}},"required":["id","cost_code_id","category_id","description","synthetic","amounts"],"type":"object"},"type":"array"},"totals":{"additionalProperties":false,"properties":{"approved_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget_modifications":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"committed_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"direct_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"estimated_cost_at_completion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_to_complete":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"original_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_budget_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_cost_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"revised_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["original_budget","budget_modifications","approved_changes","revised_budget","pending_budget_changes","projected_budget","committed_costs","direct_costs","pending_cost_changes","projected_costs","forecast_to_complete","estimated_cost_at_completion"],"type":"object"},"unmapped":{"additionalProperties":false,"properties":{"approved_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget_modifications":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"committed_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"direct_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"estimated_cost_at_completion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_to_complete":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"original_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_budget_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_cost_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"revised_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["original_budget","budget_modifications","approved_changes","revised_budget","pending_budget_changes","projected_budget","committed_costs","direct_costs","pending_cost_changes","projected_costs","forecast_to_complete","estimated_cost_at_completion"],"type":"object"},"unmapped_activity_ids":{"items":{"type":"string"},"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","definition_digest","mapping_digest","source_digest","source_basis","source_lines","mappings","allocations","coverage","totals","mapped","unmapped","unmapped_activity_ids","rounding_policy"],"type":"object"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","analysis_revision","input_digest","parameters","report","created_by_id","created_at"],"type":"object"}}},"description":"Retained assessment and provenance"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"404":{"description":"Scoped version or assessment not found"},"408":{"description":"Assessment cancelled"},"409":{"description":"Saved definition integrity failure"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid selection"},"429":{"description":"Engine capacity busy; retry later"},"503":{"description":"Engine unavailable"}},"summary":"Retain schedule Budget reconciliation","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/budget-reports/{id}":{"get":{"description":"Requires schedule:read plus budget:read token scopes, live Schedule admin and Budget view permissions, and both tools enabled. Retains explicit activity/budget-line allocations and a point-in-time snapshot from the owning Budget service. Mapped plus unmapped totals reconcile exactly in cents. Currency is undeclared; these are not ledger actuals or an approved cost baseline. No budgets, forecasts, plan heads or field tasks are changed. Historical reports never refresh on read. Private, no-store.","operationId":"getProjectScheduleBudgetReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"analysis_revision":{"description":"Version of the suite Budget allocation algorithm; not the CPM engine.","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"parameters":{"additionalProperties":false,"properties":{"expected_source_digest":{"description":"Optional reviewed Budget snapshot digest. A changed source returns 409 instead of retaining a different snapshot.","pattern":"^[a-f0-9]{64}$","type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"activity_id":{"maxLength":512,"minLength":1,"type":"string"},"allocation_basis_points":{"maximum":10000,"minimum":1,"type":"integer"},"budget_line_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["activity_id","budget_line_id","allocation_basis_points"],"type":"object"},"maxItems":10000,"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","mappings"],"type":"object"},"report":{"additionalProperties":false,"properties":{"allocations":{"items":{"additionalProperties":false,"properties":{"activity_id":{"type":["string","null"]},"allocation_basis_points":{"maximum":10000,"minimum":1,"type":"integer"},"amounts":{"additionalProperties":false,"properties":{"approved_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget_modifications":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"committed_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"direct_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"estimated_cost_at_completion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_to_complete":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"original_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_budget_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_cost_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"revised_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["original_budget","budget_modifications","approved_changes","revised_budget","pending_budget_changes","projected_budget","committed_costs","direct_costs","pending_cost_changes","projected_costs","forecast_to_complete","estimated_cost_at_completion"],"type":"object"},"budget_line_id":{"type":"integer"}},"required":["budget_line_id","activity_id","allocation_basis_points","amounts"],"type":"object"},"type":"array"},"coverage":{"items":{"additionalProperties":false,"properties":{"budget_line_id":{"type":"integer"},"mapped_basis_points":{"maximum":10000,"minimum":0,"type":"integer"},"synthetic":{"type":"boolean"}},"required":["budget_line_id","mapped_basis_points","synthetic"],"type":"object"},"type":"array"},"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mapped":{"additionalProperties":false,"properties":{"approved_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget_modifications":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"committed_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"direct_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"estimated_cost_at_completion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_to_complete":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"original_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_budget_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_cost_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"revised_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["original_budget","budget_modifications","approved_changes","revised_budget","pending_budget_changes","projected_budget","committed_costs","direct_costs","pending_cost_changes","projected_costs","forecast_to_complete","estimated_cost_at_completion"],"type":"object"},"mapping_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"activity_id":{"maxLength":512,"minLength":1,"type":"string"},"allocation_basis_points":{"maximum":10000,"minimum":1,"type":"integer"},"budget_line_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["activity_id","budget_line_id","allocation_basis_points"],"type":"object"},"maxItems":10000,"type":"array"},"rounding_policy":{"type":"string"},"source_basis":{"additionalProperties":false,"properties":{"currency":{"type":"null"},"currency_status":{"enum":["not_declared_by_budget_source"],"type":"string"},"isolation":{"enum":["repeatable_read"],"type":"string"},"ledger_actuals_verified":{"enum":[false],"type":"boolean"},"owner":{"enum":["budget"],"type":"string"},"qualification":{"type":"string"},"read_finished_at":{"format":"date-time","type":"string"},"read_started_at":{"format":"date-time","type":"string"},"view":{"enum":["current_computed_budget"],"type":"string"}},"required":["owner","view","isolation","read_started_at","read_finished_at","currency","currency_status","ledger_actuals_verified","qualification"],"type":"object"},"source_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"source_lines":{"items":{"additionalProperties":false,"properties":{"amounts":{"additionalProperties":false,"properties":{"approved_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget_modifications":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"committed_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"direct_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"estimated_cost_at_completion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_to_complete":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"original_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_budget_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_cost_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"revised_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["original_budget","budget_modifications","approved_changes","revised_budget","pending_budget_changes","projected_budget","committed_costs","direct_costs","pending_cost_changes","projected_costs","forecast_to_complete","estimated_cost_at_completion"],"type":"object"},"category_id":{"type":["integer","null"]},"cost_code":{"description":"Label captured with the Budget source; older reports may omit it.","type":["string","null"]},"cost_code_id":{"type":"integer"},"cost_code_name":{"description":"Label captured with the Budget source; older reports may omit it.","type":["string","null"]},"description":{"type":["string","null"]},"id":{"type":"integer"},"synthetic":{"type":"boolean"}},"required":["id","cost_code_id","category_id","description","synthetic","amounts"],"type":"object"},"type":"array"},"totals":{"additionalProperties":false,"properties":{"approved_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget_modifications":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"committed_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"direct_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"estimated_cost_at_completion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_to_complete":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"original_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_budget_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_cost_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"revised_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["original_budget","budget_modifications","approved_changes","revised_budget","pending_budget_changes","projected_budget","committed_costs","direct_costs","pending_cost_changes","projected_costs","forecast_to_complete","estimated_cost_at_completion"],"type":"object"},"unmapped":{"additionalProperties":false,"properties":{"approved_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"budget_modifications":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"committed_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"direct_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"estimated_cost_at_completion":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"forecast_to_complete":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"original_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_budget_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"pending_cost_changes":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"projected_costs":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"},"revised_budget":{"pattern":"^-?\\d+\\.\\d{2}$","type":"string"}},"required":["original_budget","budget_modifications","approved_changes","revised_budget","pending_budget_changes","projected_budget","committed_costs","direct_costs","pending_cost_changes","projected_costs","forecast_to_complete","estimated_cost_at_completion"],"type":"object"},"unmapped_activity_ids":{"items":{"type":"string"},"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","definition_digest","mapping_digest","source_digest","source_basis","source_lines","mappings","allocations","coverage","totals","mapped","unmapped","unmapped_activity_ids","rounding_policy"],"type":"object"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","analysis_revision","input_digest","parameters","report","created_by_id","created_at"],"type":"object"}}},"description":"Retained assessment and provenance"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"404":{"description":"Scoped version or assessment not found"},"408":{"description":"Assessment cancelled"},"409":{"description":"Saved definition integrity failure"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid selection"},"429":{"description":"Engine capacity busy; retry later"},"503":{"description":"Engine unavailable"}},"summary":"Read retained Budget reconciliation","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/calculations":{"post":{"description":"Runs the P6-validated CPM engine against the project's current canonical schedule version and retains the result as an immutable calculation. Requires authenticated project schedule admin; scoped tokens need schedule:write. Full-network results may expose private activities. All responses use Cache-Control: private, no-store.\n\nOperations:\n• schedule: forward and backward pass. Early and late dates, total and free float, criticality, longest path, driving predecessors and per-activity date explanations.\n• health: DCMA 14-point assessment with a letter grade, per-check thresholds and their sources, and up to 20 offenders per check. The checks are screening indicators, not compliance criteria.\n• risk: Monte Carlo simulation (100 to 20,000 iterations, PERT or triangular, seeded by default) giving the P10 to P95 finish dates, an S-curve, a bounded histogram, the criticality index and sensitivity of each activity, and the activities that drive the finish. Durations come from the definition's `risk_model` three-point estimates where stated (the result's `estimates_source` says how many used the engine default instead); open risk events are simulated as duration impacts or fragnets, ranked by contribution, and compared pre- and post-mitigation; correlation groups are honoured; `provenance` records the estimates digest, iteration count and seed used.\n• earned: Earned Schedule of the current version measured against a baseline version: ES, AT, SPI(t) = ES / AT, SV(t) = ES - AT and IEAC(t) = PD / SPI(t).\n• compare: activity-by-activity changes between a baseline version and the current version, with criticality gained or lost and an explanation of the finish movement.\n\nRules: expected_version_id must equal the current head version, or the request fails with 409. compare and earned require baseline_version_id, a schedule definition version in this project; the other operations reject it. data_date overrides the stored data date and is rejected for compare. risk options are accepted only for the risk operation. The authority and head version are rechecked before the result is persisted. No client-supplied baseline definition is accepted.\n\nThe `result` shape depends on `operation`; see the schemas below. The Schedule Analysis workspace in the app reads the latest result of each analysis operation for the current version.","operationId":"createProjectScheduleCalculation","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"`1` always queues a background schedule analysis job (202); `0` forces the inline path (30 s engine limit). Omitted: inputs above the size threshold are queued automatically.","in":"query","name":"async","required":false,"schema":{"enum":["0","1"],"type":"string"}},{"description":"`respond-async` is equivalent to `async=1`; the 202 response then carries `Preference-Applied: respond-async`.","in":"header","name":"Prefer","required":false,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"compare":{"summary":"Compare the current version with a baseline version","value":{"baseline_version_id":17,"expected_version_id":42,"operation":"compare"}},"earned":{"summary":"Earned Schedule against a baseline version","value":{"baseline_version_id":17,"data_date":"2026-11-02","expected_version_id":42,"operation":"earned"}},"health":{"summary":"DCMA 14-point health assessment","value":{"expected_version_id":42,"operation":"health"}},"risk":{"summary":"Monte Carlo risk, 5,000 seeded PERT iterations","value":{"expected_version_id":42,"operation":"risk","risk":{"distribution":"pert","iterations":5000,"seed":12345}}},"schedule":{"summary":"CPM dates for the current version","value":{"expected_version_id":42,"operation":"schedule"}}},"schema":{"additionalProperties":false,"properties":{"baseline_version_id":{"description":"Required for compare and earned; forbidden otherwise. Must identify a version in this company and project.","maximum":2147483647,"minimum":1,"type":"integer"},"data_date":{"description":"Optional date override; forbidden for compare.","format":"date","type":"string"},"expected_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"operation":{"enum":["schedule","health","risk","compare","earned"],"type":"string"},"risk":{"additionalProperties":false,"description":"Accepted only for risk.","properties":{"distribution":{"default":"pert","enum":["pert","triangular"],"type":"string"},"iterations":{"default":2000,"maximum":20000,"minimum":100,"type":"integer"},"seed":{"default":12345,"maximum":9007199254740991,"minimum":-9007199254740991,"nullable":true,"type":"integer"}},"type":"object"}},"required":["expected_version_id","operation"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"examples":{"compare":{"summary":"compare (abridged to one activity)","value":{"calculation":{"company_id":1,"created_at":"2026-11-10T15:04:05.000Z","created_by_id":3,"engine_revision":"cpm-2026.11+worker-1","id":318,"input_digest":"sha256:6c1f…","operation":"compare","parameters":{"baseline_version_id":17,"data_date":null,"risk":null},"project_id":2,"result":{"activities":[{"baseline_finish":"2026-10-16","baseline_start":"2026-09-14","code":"A1040","current_finish":"2026-10-30","current_start":"2026-09-14","finish_delta_days":10,"float_delta_days":-10,"id":"A1040","name":"Foundation walls","start_delta_days":0,"status":"date_shifted, duration_changed"}],"ambiguous_matches":[],"baseline_finish":"2027-04-02","criticality_gained":["A2210"],"criticality_lost":["A2300"],"current_finish":"2027-04-16","finish_delta_days":14,"finish_move_explanation":"The finish moved 14 calendar days later; the driving change is on A1040.","match_key":"id"},"version_id":42}}},"earned":{"summary":"earned","value":{"calculation":{"company_id":1,"created_at":"2026-11-10T15:04:05.000Z","created_by_id":3,"engine_revision":"cpm-2026.11+worker-1","id":318,"input_digest":"sha256:6c1f…","operation":"earned","parameters":{"baseline_version_id":17,"data_date":"2026-11-02","risk":null},"project_id":2,"result":{"actual_time_days":175,"baseline_duration_days":283,"data_date":"2026-11-02","earned_days":162.5,"earned_duration_days":162.5,"earned_duration_per_actual_day":0.9286,"ieac_t_days":304.8,"planned_duration_days":283,"spi_t":0.9286,"spi_t_basis":"ES / AT (earned_days / actual_time_days)","sv_t_days":-12.5},"version_id":42}}},"health":{"summary":"health (abridged to two of fourteen checks)","value":{"calculation":{"company_id":1,"created_at":"2026-11-10T15:04:05.000Z","created_by_id":3,"engine_revision":"cpm-2026.11+worker-1","id":318,"input_digest":"sha256:6c1f…","operation":"health","parameters":{"baseline_version_id":null,"data_date":null,"risk":null},"project_id":2,"result":{"assessed":11,"basis":"The DCMA 14-point metrics are screening indicators, not compliance criteria, …","checks":[{"detail":"13 of 212 activities are dangling","name":"Logic","number":1,"offender_count":13,"offenders":["A3120","A3130"],"status":"fail","threshold":"<= 5% missing predecessor or successor","threshold_source":"PAM 200.1 §4.1 (5%); the two-open-ends exemption has no primary source","value":6.1},{"detail":"284 of 304 relationships are FS","name":"Relationship Types","number":4,"offender_count":20,"offenders":["A1040->A1050 (SS)"],"status":"pass","threshold":">= 90% Finish-to-Start","threshold_source":"PAM 200.1 §4.4 (90% FS, over logic links per the printed formula)","value":93.4}],"failed":2,"failures":2,"grade":"B","optimisable":true,"passed":9,"passes":9,"score":81.82,"skipped":3,"total_checks":14},"version_id":42}}},"risk":{"summary":"risk","value":{"calculation":{"company_id":1,"created_at":"2026-11-10T15:04:05.000Z","created_by_id":3,"engine_revision":"cpm-2026.11+worker-1","id":318,"input_digest":"sha256:6c1f…","operation":"risk","parameters":{"baseline_version_id":null,"data_date":null,"risk":{"distribution":"pert","iterations":5000,"seed":12345}},"project_id":2,"result":{"confidence_in_deterministic":0.2214,"deterministic_finish":"2027-04-16","distribution":"pert","drivers":[{"criticality_index":0.8712,"duration_sensitivity":0.6431,"id":"A2210","mean_duration":21.4,"name":"Structural steel erection"}],"iterations":5000,"percentiles":{"p10":"2027-04-09","p20":"2027-04-15","p50":"2027-04-28","p80":"2027-05-14","p90":"2027-05-24","p95":"2027-06-01"},"s_curve":[{"finish":"2027-04-05","p":5},{"finish":"2027-04-28","p":50},{"finish":"2027-06-01","p":95}],"seed":12345},"version_id":42}}},"schedule":{"summary":"schedule (abridged to one activity)","value":{"calculation":{"company_id":1,"created_at":"2026-11-10T15:04:05.000Z","created_by_id":3,"engine_revision":"cpm-2026.11+worker-1","id":318,"input_digest":"sha256:6c1f…","operation":"schedule","parameters":{"baseline_version_id":null,"data_date":null,"risk":null},"project_id":2,"result":{"activities":[{"activity_id":"A2210","constraint_satisfied":true,"duration_days":20,"early_finish":"2026-12-04","early_start":"2026-11-09","explainability":{"calendar_id":"CAL-5D","data_date":"2026-11-02","date_basis":"calculated_network","date_basis_detail":{"explanation":"Driving predecessor(s) A1040 govern the network forecast.","kind":"driving_predecessor"},"governing_predecessors":["A1040"]},"finish":"2026-12-04","free_float_days":0,"is_critical":true,"is_longest_path":true,"late_finish":"2026-12-04","late_start":"2026-11-09","remaining_days":20,"start":"2026-11-09","status":"not_started","total_float_days":0}],"driving_predecessors":{"A2210":["A1040"]},"driving_set":["A1000","A1040","A2210","A9990"],"driving_terminal":"A9990","excluded_relationships":[],"issues":[],"longest_path":["A1000","A1040","A2210","A9990"],"summary":{"activity_count":214,"critical_count":31,"data_date":"2026-11-02","duration_working_days":293,"issue_count":0,"longest_path":["A1000","A1040","A2210","A9990"],"options":{},"project_finish":"2027-04-16","project_start":"2026-03-02","violation_count":0},"violations":[]},"version_id":42}}}},"schema":{"additionalProperties":false,"properties":{"calculation":{"additionalProperties":false,"properties":{"company_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"operation":{"enum":["schedule","health","risk","compare","earned"],"type":"string"},"parameters":{"additionalProperties":true,"type":"object"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"result":{"anyOf":[{"$ref":"#/components/schemas/schedule_ScheduleCalculationScheduleResult"},{"$ref":"#/components/schemas/schedule_ScheduleHealthResult"},{"$ref":"#/components/schemas/schedule_ScheduleRiskResult"},{"$ref":"#/components/schemas/schedule_ScheduleEarnedResult"},{"$ref":"#/components/schemas/schedule_ScheduleCompareResult"}],"description":"Engine output for the requested operation. Additional keys may appear as the engine grows; ignore keys you do not use."},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","company_id","project_id","version_id","engine_revision","operation","parameters","input_digest","result","created_by_id","created_at"],"type":"object"}},"required":["calculation"],"type":"object"}}},"description":"Created calculation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"}},"required":["job"],"type":"object"}}},"description":"Queued as a durable background schedule analysis job (large input, `async=1` or `Prefer: respond-async`). Poll the job URL in `Location`; when it completes, `job.resource` names the retained record, identical to what the inline path returns.","headers":{"Location":{"description":"Job status URL","schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed JSON, invalid definition, invalid baseline or calculation parameters. Calculation rejects duplicate WBS identities, missing WBS parent/activity references and cycles before persistence; activity and WBS identities are separate namespaces."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule admin permission and token scope required."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project not found."},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Calculation cancelled before publication."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Head version changed or integrity verification failed."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request exceeds 2 MiB."},"415":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Content-Type must be application/json."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request field validation failed."},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Rate or calculation capacity limit; Retry-After may be returned."},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Calculation engine unavailable or timed out."}},"summary":"Calculate the current canonical schedule","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/calculations/{id}/log":{"get":{"description":"Requires schedule:read and live Schedule admin access (the log discloses the full network). Every Save and calculate stores its schedule log with the calculation: data date, options used, critical path definition, counts, open ends, constraints, out-of-sequence progress, started activities missing an actual start and actual dates after the data date. Entries agree with the DCMA Health checks 1, 5 and 9. format=text or format=csv downloads the log with planner deep links (?activity=).","operationId":"listProjectScheduleCalculationLog","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"format","required":false,"schema":{"default":"json","enum":["json","text","csv"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleCalculationLog"}},"text/csv":{"schema":{"type":"string"}},"text/plain":{"schema":{"type":"string"}}},"description":"Schedule log"},"400":{"description":"Unsupported query parameter or format"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Schedule calculation not found"},"409":{"description":"Stored schedule failed its integrity check"}},"summary":"Read the schedule log of a schedule calculation","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/calendar_items":{"get":{"operationId":"listProjectScheduleCalendarItems","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["ids_only","total_count_only"],"type":"string"}},{"in":"query","name":"start_date","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"finish_date","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[assigned_id]","schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"filters[date]","required":false,"schema":{"type":"string"}},{"in":"query","name":"sort","required":false,"schema":{"enum":["id","name","start_date","finish_date","percent"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"assigned":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"color":{"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"finish":{"format":"date","type":"string"},"full_outline_path":{"type":"string"},"id":{"type":"integer"},"milestone":{"type":"boolean"},"name":{"type":"string"},"percentage":{"type":"integer"},"private":{"type":"boolean"},"start":{"format":"date","type":"string"},"task_name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Calendar Items","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":true},"post":{"operationId":"createProjectScheduleCalendarItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"calendar_item":{"properties":{"assigned_id":{"type":"integer"},"color":{"type":"string"},"finish":{"format":"date","type":"string"},"name":{"type":"string"},"percentage":{"type":"integer"},"private":{"type":"boolean"},"start":{"format":"date","type":"string"}},"type":"object"}},"required":["calendar_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assigned":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"color":{"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"finish":{"format":"date","type":"string"},"full_outline_path":{"type":"string"},"id":{"type":"integer"},"milestone":{"type":"boolean"},"name":{"type":"string"},"percentage":{"type":"integer"},"private":{"type":"boolean"},"start":{"format":"date","type":"string"},"task_name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"201":{"content":{"application/json":{"schema":{"properties":{"assigned":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"color":{"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"finish":{"format":"date","type":"string"},"full_outline_path":{"type":"string"},"id":{"type":"integer"},"milestone":{"type":"boolean"},"name":{"type":"string"},"percentage":{"type":"integer"},"private":{"type":"boolean"},"start":{"format":"date","type":"string"},"task_name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Calendar Item","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/calendar_items/{id}":{"delete":{"operationId":"deleteProjectScheduleCalendarItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Calendar Item","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false},"get":{"operationId":"getProjectScheduleCalendarItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assigned":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"color":{"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"finish":{"format":"date","type":"string"},"full_outline_path":{"type":"string"},"id":{"type":"integer"},"milestone":{"type":"boolean"},"name":{"type":"string"},"percentage":{"type":"integer"},"private":{"type":"boolean"},"start":{"format":"date","type":"string"},"task_name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Calendar Item","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"patch":{"operationId":"updateProjectScheduleCalendarItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"calendar_item":{"properties":{"assigned_id":{"type":"integer"},"color":{"type":"string"},"finish":{"format":"date","type":"string"},"name":{"type":"string"},"percentage":{"type":"integer"},"private":{"type":"boolean"},"start":{"format":"date","type":"string"}},"type":"object"}},"required":["calendar_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assigned":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"color":{"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"finish":{"format":"date","type":"string"},"full_outline_path":{"type":"string"},"id":{"type":"integer"},"milestone":{"type":"boolean"},"name":{"type":"string"},"percentage":{"type":"integer"},"private":{"type":"boolean"},"start":{"format":"date","type":"string"},"task_name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Calendar Item","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/calendar_items/{id}/dependencies":{"get":{"operationId":"listProjectScheduleCalendarItemDependencies","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"criticality_source":{"description":"Verified reviewed Planner results, the existing visible-task calendar-day calculation, or unavailable when evidence cannot be verified or this task is outside calculated coverage. Native format-one results are verified against their own saved calculation and receipt history; unsupported imported/mixed format-one results never fall back to calendar-day calculations. A newer Planner head alone does not invalidate an unchanged published snapshot. Task detail uses current publication membership when applicable, otherwise its historical import context.","enum":["planner_projection","legacy_calendar_days","unavailable"],"type":"string"},"on_critical_path":{"description":"Null when publication evidence is unavailable or this task is outside verified calculated coverage, including retained/manual tasks. False means a covered task is known to be noncritical; true means it is critical under criticality_source.","nullable":true,"type":"boolean"},"predecessors":{"items":{"properties":{"active":{"type":"boolean"},"created_at":{"type":"string"},"from_activity":{"type":"integer"},"id":{"type":"integer"},"lag":{"type":"integer"},"lag_days":{"type":"integer"},"lag_display_unit":{"type":"string"},"lag_unit":{"type":"string"},"predecessor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"wbs_code":{"type":"string"}},"required":["id","name"],"type":"object"},"predecessor_id":{"type":"integer"},"project_id":{"type":"integer"},"relationship_type":{"enum":["FS","SS","FF","SF"],"type":"string"},"successor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"wbs_code":{"type":"string"}},"required":["id","name"],"type":"object"},"successor_id":{"type":"integer"},"to_activity":{"type":"integer"},"type":{"enum":["FS","SS","FF","SF"],"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","predecessor_id","successor_id","type","lag_days","created_at","updated_at","from_activity","to_activity","relationship_type","lag","lag_unit","lag_display_unit","active"],"type":"object"},"type":"array"},"successors":{"items":{"properties":{"active":{"type":"boolean"},"created_at":{"type":"string"},"from_activity":{"type":"integer"},"id":{"type":"integer"},"lag":{"type":"integer"},"lag_days":{"type":"integer"},"lag_display_unit":{"type":"string"},"lag_unit":{"type":"string"},"predecessor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"wbs_code":{"type":"string"}},"required":["id","name"],"type":"object"},"predecessor_id":{"type":"integer"},"project_id":{"type":"integer"},"relationship_type":{"enum":["FS","SS","FF","SF"],"type":"string"},"successor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"wbs_code":{"type":"string"}},"required":["id","name"],"type":"object"},"successor_id":{"type":"integer"},"to_activity":{"type":"integer"},"type":{"enum":["FS","SS","FF","SF"],"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","predecessor_id","successor_id","type","lag_days","created_at","updated_at","from_activity","to_activity","relationship_type","lag","lag_unit","lag_display_unit","active"],"type":"object"},"type":"array"},"task_id":{"type":"integer"}},"required":["task_id","on_critical_path","predecessors","successors","criticality_source"],"type":"object"}}}},"401":{},"404":{}},"summary":"List Calendar Item Dependencies","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"operationId":"createProjectScheduleCalendarItemDependency","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"dependency":{"properties":{"active":{"type":"boolean"},"from_activity":{"type":"integer"},"lag":{"type":"integer"},"lag_days":{"type":"integer"},"lag_unit":{"type":"string"},"predecessor_id":{"type":"integer"},"relationship_type":{"enum":["FS","SS","FF","SF"],"type":"string"},"type":{"enum":["FS","SS","FF","SF"],"type":"string"}},"type":"object"}},"required":["dependency"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"active":{"type":"boolean"},"created_at":{"type":"string"},"from_activity":{"type":"integer"},"id":{"type":"integer"},"lag":{"type":"integer"},"lag_days":{"type":"integer"},"lag_display_unit":{"type":"string"},"lag_unit":{"type":"string"},"predecessor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"wbs_code":{"type":"string"}},"required":["id","name"],"type":"object"},"predecessor_id":{"type":"integer"},"project_id":{"type":"integer"},"relationship_type":{"enum":["FS","SS","FF","SF"],"type":"string"},"successor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"wbs_code":{"type":"string"}},"required":["id","name"],"type":"object"},"successor_id":{"type":"integer"},"to_activity":{"type":"integer"},"type":{"enum":["FS","SS","FF","SF"],"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","predecessor_id","successor_id","type","lag_days","created_at","updated_at","from_activity","to_activity","relationship_type","lag","lag_unit","lag_display_unit","active"],"type":"object"}}}},"400":{},"401":{},"404":{},"422":{}},"summary":"Create Calendar Item Dependency","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/calendar_items/{id}/dependencies/{dependency_id}":{"delete":{"operationId":"deleteProjectScheduleCalendarItemDependency","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"dependency_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}}},"401":{},"404":{}},"summary":"Delete Calendar Item Dependency","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/change-impacts":{"get":{"description":"Authorization is two-sided and live: Schedule access (non-admins only see activities bound to a field task they can see) and the source tool's own visibility for the linked record. All responses are private, no-store. Requires schedule:read token scope. Calculated results (from the retained, digest-checked scenario comparison) are returned to Schedule admins only.","operationId":"listProjectScheduleChangeImpacts","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"change_event_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleChangeImpacts"}}},"description":"Impacts"},"400":{"description":"Invalid body or query, or a field that does not apply to the source type's workflow"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, the source tool's permission, or token scope denied"},"404":{"description":"Link, source record or activity not found or not visible to the caller"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version or preview, or a retained change-event impact link"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"}},"summary":"Time impacts modelled for a change event","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Authorization is two-sided and live: Schedule access (non-admins only see activities bound to a field task they can see) and the source tool's own visibility for the linked record. All responses are private, no-store. Requires schedule:write token scope, Change Events edit and Schedule admin. Creates a what-if scenario on the current schedule version with one delay-fragnet activity after predecessor_id (driving successor_id when given), pins it to the change event as retained forensic evidence, and calculates the comparison. Never changes the saved schedule. Idempotent by request_id (replays return 200). A calculation failure keeps the scenario and link and is reported in calculation_error. No query parameters.","operationId":"createProjectScheduleChangeImpact","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleChangeImpactCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleChangeImpactCreated"}}},"description":"Replayed"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleChangeImpactCreated"}}},"description":"Impact created"},"400":{"description":"Invalid body or query, or a field that does not apply to the source type's workflow"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, the source tool's permission, or token scope denied"},"404":{"description":"Link, source record or activity not found or not visible to the caller"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version or preview, or a retained change-event impact link"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The scheduling engine rejected the schedule"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Model a change event's time impact as a delay-fragnet scenario","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/conformance":{"get":{"description":"Requires schedule:read and live Schedule admin permission. Returns metadata only, newest ID first. Pass next_before_id as before_id for the next page. Optionally filter by version_id. Each page is independently authorized; no report or governing terms are loaded. Private, no-store.","operationId":"listProjectScheduleConformance","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"version_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"assessments":{"items":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","input_digest","created_by_id","created_at"],"type":"object"},"type":"array"},"next_before_id":{"type":["integer","null"]}},"required":["assessments","next_before_id"],"type":"object"}}},"description":"Bounded assessment metadata page"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"408":{"description":"Assessment cancelled"},"422":{"description":"Invalid selection"}},"summary":"List retained conformance assessment history","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires live Schedule admin permission because complete-network findings may disclose private activities. Uses the original conformance and forensic rule services. Missing evidence remains explicit: read coverage and inputs_required alongside the verdict. Contract terms and baseline designation are caller declarations, not proof of contract approval. All responses are private, no-store. Requires schedule:write token scope. The explicit version may be historical. Saves an immutable assessment after rechecking authorization; does not advance the plan or publish tasks. Repeated requests create separate assessments.","operationId":"createProjectScheduleConformance","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"conformance":{"additionalProperties":false,"properties":{"contract_names":{"items":{"maxLength":256,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"elected":{"items":{"maxLength":256,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"is_baseline":{"type":"boolean"},"jurisdiction":{"maxLength":128,"minLength":1,"type":"string"},"spec":{"maxLength":128,"minLength":1,"type":"string"},"terms":{"additionalProperties":true,"maxProperties":1000,"type":"object"}},"required":[],"type":"object"},"data_date":{"format":"date","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"parameters":{"additionalProperties":false,"properties":{"conformance":{"additionalProperties":false,"properties":{"contract_names":{"items":{"maxLength":256,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"elected":{"items":{"maxLength":256,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"is_baseline":{"type":"boolean"},"jurisdiction":{"maxLength":128,"minLength":1,"type":"string"},"spec":{"maxLength":128,"minLength":1,"type":"string"},"terms":{"additionalProperties":true,"maxProperties":1000,"type":"object"}},"required":[],"type":"object"},"data_date":{"format":"date","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id"],"type":"object"},"report":{"additionalProperties":false,"properties":{"dcma":{"additionalProperties":true,"type":"object"},"engine_version":{"type":"string"},"findings":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"governance":{"additionalProperties":true,"type":"object"},"inputs_required":{"items":{"type":"string"},"type":"array"},"spec":{"type":"string"},"summary":{"additionalProperties":false,"properties":{"basis":{"type":"string"},"blocking_failures":{"minimum":0,"type":"integer"},"coverage":{"type":["number","null"]},"failed":{"minimum":0,"type":"integer"},"inconclusive":{"minimum":0,"type":"integer"},"observations":{"minimum":0,"type":"integer"},"passed":{"minimum":0,"type":"integer"},"referred":{"minimum":0,"type":"integer"},"score":{"type":["number","null"]},"total_findings":{"minimum":0,"type":"integer"},"verdict":{"type":"string"}},"required":["total_findings","passed","failed","observations","referred","inconclusive","blocking_failures","verdict","score","coverage","basis"],"type":"object"},"verdict":{"enum":["pass","fail","pass_with_observations","inconclusive"],"type":"string"}},"required":["verdict","spec","engine_version","governance","summary","dcma","findings","inputs_required"],"type":"object"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","input_digest","parameters","report","created_by_id","created_at"],"type":"object"}}},"description":"Retained assessment and provenance"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"404":{"description":"Scoped version or assessment not found"},"408":{"description":"Assessment cancelled"},"409":{"description":"Saved definition integrity failure"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid selection"},"429":{"description":"Engine capacity busy; retry later"},"503":{"description":"Engine unavailable"}},"summary":"Create a retained conformance assessment for a saved version","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/conformance/{id}":{"get":{"description":"Requires live Schedule admin permission because complete-network findings may disclose private activities. Uses the original conformance and forensic rule services. Missing evidence remains explicit: read coverage and inputs_required alongside the verdict. Contract terms and baseline designation are caller declarations, not proof of contract approval. All responses are private, no-store. Requires schedule:read token scope. Returns the retained report without recalculation.","operationId":"getProjectScheduleConformance","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"parameters":{"additionalProperties":false,"properties":{"conformance":{"additionalProperties":false,"properties":{"contract_names":{"items":{"maxLength":256,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"elected":{"items":{"maxLength":256,"minLength":1,"type":"string"},"maxItems":64,"type":"array"},"is_baseline":{"type":"boolean"},"jurisdiction":{"maxLength":128,"minLength":1,"type":"string"},"spec":{"maxLength":128,"minLength":1,"type":"string"},"terms":{"additionalProperties":true,"maxProperties":1000,"type":"object"}},"required":[],"type":"object"},"data_date":{"format":"date","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id"],"type":"object"},"report":{"additionalProperties":false,"properties":{"dcma":{"additionalProperties":true,"type":"object"},"engine_version":{"type":"string"},"findings":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"governance":{"additionalProperties":true,"type":"object"},"inputs_required":{"items":{"type":"string"},"type":"array"},"spec":{"type":"string"},"summary":{"additionalProperties":false,"properties":{"basis":{"type":"string"},"blocking_failures":{"minimum":0,"type":"integer"},"coverage":{"type":["number","null"]},"failed":{"minimum":0,"type":"integer"},"inconclusive":{"minimum":0,"type":"integer"},"observations":{"minimum":0,"type":"integer"},"passed":{"minimum":0,"type":"integer"},"referred":{"minimum":0,"type":"integer"},"score":{"type":["number","null"]},"total_findings":{"minimum":0,"type":"integer"},"verdict":{"type":"string"}},"required":["total_findings","passed","failed","observations","referred","inconclusive","blocking_failures","verdict","score","coverage","basis"],"type":"object"},"verdict":{"enum":["pass","fail","pass_with_observations","inconclusive"],"type":"string"}},"required":["verdict","spec","engine_version","governance","summary","dcma","findings","inputs_required"],"type":"object"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","input_digest","parameters","report","created_by_id","created_at"],"type":"object"}}},"description":"Retained assessment and provenance"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"404":{"description":"Scoped version or assessment not found"},"408":{"description":"Assessment cancelled"},"409":{"description":"Saved definition integrity failure"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid selection"},"429":{"description":"Engine capacity busy; retry later"},"503":{"description":"Engine unavailable"}},"summary":"Read a retained conformance assessment","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/cost-account-mappings":{"get":{"description":"Requires schedule:read and budget:read, plus live Schedule admin and Budget view access. Returns the current mapping revision (or a retained one with `revision`), the P6 cost accounts the head version's expenses and resource assignments use with their schedule amounts, the project's cost codes and the revision history. Mappings classify schedule costs for Budget reconciliation; nothing is posted to the ledger.","operationId":"listProjectScheduleCostAccountMappings","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"revision","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleCostAccountMappingSet"}}},"description":"Cost account mappings"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin plus Budget view access, or token scope (budget:read) denied"},"404":{"description":"Revision not found"}},"summary":"Read cost account to cost code mappings","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"put":{"description":"Requires schedule:write and budget:read, plus live Schedule admin and Budget view access. Saves the complete set at `expected_revision` as the next revision; earlier revisions are retained and rows are immutable. Each save is audited with an added/removed/changed diff. An account without its own mapping inherits its nearest mapped parent account. Never writes Budget or the ledger.","operationId":"replaceProjectScheduleCostAccountMappings","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleCostAccountMappingInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleCostAccountMappingSet"}}},"description":"Saved; the new revision and its diff"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin plus Budget view access, or token scope (budget:read) denied"},"409":{"description":"The mappings changed since they were loaded"}},"summary":"Save cost account to cost code mappings","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/cost-dashboard":{"get":{"description":"Requires live Schedule admin access (full-network dates and float) and Budget view with the Budget tool enabled. All responses are private, no-store. Requires schedule:read and budget:read token scopes. Maps the Budget view's revised budget (BAC) onto activities through the saved cost mappings, phases it over the calculated (or baseline) working days, earns it by engine fraction complete, and allocates posted job cost (kind = actual) by commitment and cost-code mappings. Returns PV/EV/AC totals, CPI, SPI, CV, SV, EAC, ETC, VAC and TCPI, period series, a monthly or weekly cash-flow forecast of remaining mapped budget, and unmapped activity, budget, commitment and actual-cost exception lists. Optional sources follow live access and token scope: without commitments:read or Commitments visibility, commitments are reported unavailable; without accounting:read or an Accounting ledger-view grant (project/entity scoped), actual cost is an explicitly labelled earned-value proxy and CPI-based indices are withheld. Never posts, approves or writes any financial record.","operationId":"listProjectScheduleCostDashboard","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Named baseline whose retained calculation phases planned value. Omit to phase PV on the current calculated schedule.","in":"query","name":"baseline_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"bucket","schema":{"default":"month","enum":["month","week"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleCostDashboard"}}},"description":"Cost dashboard"},"400":{"description":"Invalid query or body, missing saved schedule, or a mapping that references an unknown activity, budget line or commitment"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, owning-tool permission (Budget view; Commitments for commitment mappings) or token scope denied"},"404":{"description":"Baseline or report not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, sources changed during assembly, or failed integrity check"},"503":{"description":"An owning source (Budget, Commitments, Accounting) could not be read"}},"summary":"Cost-loaded earned value, S-curves, cash-flow forecast and mapping exceptions","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/cost-dashboard/csv":{"get":{"description":"Requires live Schedule admin access (full-network dates and float) and Budget view with the Budget tool enabled. All responses are private, no-store. Requires schedule:read and budget:read token scopes. Same calculation and query as the JSON dashboard; sections for periods, activities, metrics (including withheld reasons) and basis. Cells beginning with formula characters are neutralized. Optional sources follow live access and token scope: without commitments:read or Commitments visibility, commitments are reported unavailable; without accounting:read or an Accounting ledger-view grant (project/entity scoped), actual cost is an explicitly labelled earned-value proxy and CPI-based indices are withheld. Never posts, approves or writes any financial record.","operationId":"listProjectScheduleCostDashboardCsv","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Named baseline whose retained calculation phases planned value. Omit to phase PV on the current calculated schedule.","in":"query","name":"baseline_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"bucket","schema":{"default":"month","enum":["month","week"],"type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"CSV attachment"},"400":{"description":"Invalid query or body, missing saved schedule, or a mapping that references an unknown activity, budget line or commitment"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, owning-tool permission (Budget view; Commitments for commitment mappings) or token scope denied"},"404":{"description":"Baseline or report not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, sources changed during assembly, or failed integrity check"},"503":{"description":"An owning source (Budget, Commitments, Accounting) could not be read"}},"summary":"Export the cost dashboard as CSV","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/cost-mappings":{"get":{"description":"Requires live Schedule admin access (full-network dates and float) and Budget view with the Budget tool enabled. All responses are private, no-store. Requires schedule:read and budget:read token scopes. Revision 0 means no mappings were saved yet. No query parameters.","operationId":"listProjectScheduleCostMappings","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleCostMappingSet"}}},"description":"Mapping set"},"400":{"description":"Invalid query or body, missing saved schedule, or a mapping that references an unknown activity, budget line or commitment"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, owning-tool permission (Budget view; Commitments for commitment mappings) or token scope denied"},"404":{"description":"Baseline or report not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, sources changed during assembly, or failed integrity check"},"503":{"description":"An owning source (Budget, Commitments, Accounting) could not be read"}},"summary":"Read the project's cost-loading mapping set","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"put":{"description":"Requires live Schedule admin access (full-network dates and float) and Budget view with the Budget tool enabled. All responses are private, no-store. Requires schedule:write and budget:read token scopes, plus commitments:read when any commitment is mapped. Activities must exist in the current saved version, budget lines on this project, commitments visible under Commitments privacy. Shares of one source may not exceed 10000 basis points; duplicates are rejected. The revision advances by one and an audit event records every added, removed and changed share. Mappings never write Budget, Commitments or the ledger. No query parameters.","operationId":"replaceProjectScheduleCostMappings","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleCostMappingSave"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleCostMappingSet"}}},"description":"Saved mapping set"},"400":{"description":"Invalid query or body, missing saved schedule, or a mapping that references an unknown activity, budget line or commitment"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, owning-tool permission (Budget view; Commitments for commitment mappings) or token scope denied"},"404":{"description":"Baseline or report not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, sources changed during assembly, or failed integrity check"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Body failed schema validation"},"503":{"description":"An owning source (Budget, Commitments, Accounting) could not be read"}},"summary":"Replace the cost-loading mapping set at the expected revision","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/cost-reports":{"get":{"description":"Requires schedule:read and live Schedule admin permission. Uses an explicit immutable schedule version. Results describe schedule inputs, not reconciled Accounting actuals or an approved cost baseline. Retains the original engine qualifications and provenance. No budgets, postings, definition heads or field tasks are changed. Private, no-store. Metadata only, newest ID first; pass next_before_id as before_id. Optional version_id filter.","operationId":"listProjectScheduleCostReports","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"version_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_before_id":{"type":["integer","null"]},"reports":{"items":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","input_digest","created_by_id","created_at"],"type":"object"},"type":"array"}},"required":["reports","next_before_id"],"type":"object"}}},"description":"Bounded assessment metadata page"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"408":{"description":"Assessment cancelled"},"422":{"description":"Invalid selection"}},"summary":"List saved cost report history","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires schedule:write and live Schedule admin permission. Uses an explicit immutable schedule version. Results describe schedule inputs, not reconciled Accounting actuals or an approved cost baseline. Retains the original engine qualifications and provenance. No budgets, postings, definition heads or field tasks are changed. Private, no-store.","operationId":"createProjectScheduleCostReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"costs":{"additionalProperties":false,"properties":{"bucket":{"default":"week","enum":["day","week","month"],"type":"string"}},"type":"object"},"data_date":{"format":"date","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"type":"string"},"engine_revision":{"type":"string"},"financial_basis":{"additionalProperties":false,"properties":{"approved_cost_baseline":{"enum":[false],"type":"boolean"},"ledger_actuals_verified":{"enum":[false],"type":"boolean"},"reconciliation_status":{"enum":["unreconciled"],"type":"string"},"source":{"enum":["schedule_definition"],"type":"string"}},"required":["source","reconciliation_status","approved_cost_baseline","ledger_actuals_verified"],"type":"object"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"parameters":{"additionalProperties":false,"properties":{"costs":{"additionalProperties":false,"properties":{"bucket":{"default":"week","enum":["day","week","month"],"type":"string"}},"type":"object"},"data_date":{"format":"date","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id"],"type":"object"},"report":{"additionalProperties":true,"description":"Unmodified source cost analysis. Retains actual_basis, actuals_complete, currency_status, monetary_totals_comparable, warnings, exact amounts and cost_model_limitations. Missing actuals may use an earned-value proxy; mixed currencies are not converted. p6_rollups adds the P6 labor / nonlabor / material / expense roll-ups, percents complete and variances.","properties":{"p6_rollups":{"additionalProperties":false,"description":"P6 activity and assignment roll-ups (services/scheduling/p6_cost_rollup.py), verified against values P6 stored by the cost oracle. Labor and nonlabor values sum the labor and nonlabor assignments; material carries cost only; at completion = actual + remaining.","properties":{"activities":{"additionalProperties":{"additionalProperties":true,"properties":{"expense":{"additionalProperties":true,"properties":{"actual_cost":{"nullable":true,"type":"number"},"actual_units":{"nullable":true,"type":"number"},"at_completion_cost":{"nullable":true,"type":"number"},"at_completion_units":{"nullable":true,"type":"number"},"cost_percent_complete":{"description":"Actual / at completion cost, a fraction 0-1 (P6 LaborCostPercentComplete ...).","type":"number"},"count":{"type":"integer"},"planned_cost":{"nullable":true,"type":"number"},"planned_units":{"nullable":true,"type":"number"},"remaining_cost":{"nullable":true,"type":"number"},"remaining_units":{"nullable":true,"type":"number"},"units_percent_complete":{"description":"Labor and nonlabor only: actual / at completion units, a fraction 0-1 (P6 LaborUnitsPercentComplete, NonLaborUnitsPercentComplete).","type":"number"}},"type":"object"},"labor":{"additionalProperties":true,"properties":{"actual_cost":{"nullable":true,"type":"number"},"actual_units":{"nullable":true,"type":"number"},"at_completion_cost":{"nullable":true,"type":"number"},"at_completion_units":{"nullable":true,"type":"number"},"cost_percent_complete":{"description":"Actual / at completion cost, a fraction 0-1 (P6 LaborCostPercentComplete ...).","type":"number"},"count":{"type":"integer"},"planned_cost":{"nullable":true,"type":"number"},"planned_units":{"nullable":true,"type":"number"},"remaining_cost":{"nullable":true,"type":"number"},"remaining_units":{"nullable":true,"type":"number"},"units_percent_complete":{"description":"Labor and nonlabor only: actual / at completion units, a fraction 0-1 (P6 LaborUnitsPercentComplete, NonLaborUnitsPercentComplete).","type":"number"}},"type":"object"},"material":{"additionalProperties":true,"properties":{"actual_cost":{"nullable":true,"type":"number"},"actual_units":{"nullable":true,"type":"number"},"at_completion_cost":{"nullable":true,"type":"number"},"at_completion_units":{"nullable":true,"type":"number"},"cost_percent_complete":{"description":"Actual / at completion cost, a fraction 0-1 (P6 LaborCostPercentComplete ...).","type":"number"},"count":{"type":"integer"},"planned_cost":{"nullable":true,"type":"number"},"planned_units":{"nullable":true,"type":"number"},"remaining_cost":{"nullable":true,"type":"number"},"remaining_units":{"nullable":true,"type":"number"},"units_percent_complete":{"description":"Labor and nonlabor only: actual / at completion units, a fraction 0-1 (P6 LaborUnitsPercentComplete, NonLaborUnitsPercentComplete).","type":"number"}},"type":"object"},"nonlabor":{"additionalProperties":true,"properties":{"actual_cost":{"nullable":true,"type":"number"},"actual_units":{"nullable":true,"type":"number"},"at_completion_cost":{"nullable":true,"type":"number"},"at_completion_units":{"nullable":true,"type":"number"},"cost_percent_complete":{"description":"Actual / at completion cost, a fraction 0-1 (P6 LaborCostPercentComplete ...).","type":"number"},"count":{"type":"integer"},"planned_cost":{"nullable":true,"type":"number"},"planned_units":{"nullable":true,"type":"number"},"remaining_cost":{"nullable":true,"type":"number"},"remaining_units":{"nullable":true,"type":"number"},"units_percent_complete":{"description":"Labor and nonlabor only: actual / at completion units, a fraction 0-1 (P6 LaborUnitsPercentComplete, NonLaborUnitsPercentComplete).","type":"number"}},"type":"object"},"total":{"additionalProperties":true,"description":"Labor + nonlabor + material + expense cost (P6 *TotalCost) and cost_percent_complete (P6 CostPercentComplete, a fraction).","properties":{"actual_cost":{"nullable":true,"type":"number"},"at_completion_cost":{"nullable":true,"type":"number"},"cost_percent_complete":{"type":"number"},"planned_cost":{"nullable":true,"type":"number"},"remaining_cost":{"nullable":true,"type":"number"}},"type":"object"},"units_percent_complete":{"description":"P6 UnitsPercentComplete over labor and nonlabor, a fraction 0-1.","type":"number"},"variances":{"additionalProperties":false,"description":"P6 TotalCostVariance ... NonLaborUnitsVariance with the activity as its own baseline (planned - at completion), as P6 shows without a project baseline.","properties":{"expense_cost_variance":{"nullable":true,"type":"number"},"labor_cost_variance":{"nullable":true,"type":"number"},"labor_units_variance":{"nullable":true,"type":"number"},"material_cost_variance":{"nullable":true,"type":"number"},"nonlabor_cost_variance":{"nullable":true,"type":"number"},"nonlabor_units_variance":{"nullable":true,"type":"number"},"total_cost_variance":{"nullable":true,"type":"number"}},"type":"object"}},"type":"object"},"description":"Per activity id.","type":"object"},"assignments":{"additionalProperties":{"additionalProperties":true,"type":"object"},"description":"Per assignment id: planned / actual / remaining / at completion units and cost and units_percent_complete (P6 ResourceAssignment values).","type":"object"}},"type":"object"}},"type":"object"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","input_digest","parameters","report","created_by_id","created_at","financial_basis"],"type":"object"}}},"description":"Retained assessment and provenance"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"404":{"description":"Scoped version or assessment not found"},"408":{"description":"Assessment cancelled"},"409":{"description":"Saved definition integrity failure"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid selection"},"429":{"description":"Engine capacity busy; retry later"},"503":{"description":"Engine unavailable"}},"summary":"Create saved-version cost report","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/cost-reports/{id}":{"get":{"description":"Requires schedule:read and live Schedule admin permission. Uses an explicit immutable schedule version. Results describe schedule inputs, not reconciled Accounting actuals or an approved cost baseline. Retains the original engine qualifications and provenance. No budgets, postings, definition heads or field tasks are changed. Private, no-store.","operationId":"getProjectScheduleCostReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"type":"string"},"engine_revision":{"type":"string"},"financial_basis":{"additionalProperties":false,"properties":{"approved_cost_baseline":{"enum":[false],"type":"boolean"},"ledger_actuals_verified":{"enum":[false],"type":"boolean"},"reconciliation_status":{"enum":["unreconciled"],"type":"string"},"source":{"enum":["schedule_definition"],"type":"string"}},"required":["source","reconciliation_status","approved_cost_baseline","ledger_actuals_verified"],"type":"object"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"parameters":{"additionalProperties":false,"properties":{"costs":{"additionalProperties":false,"properties":{"bucket":{"default":"week","enum":["day","week","month"],"type":"string"}},"type":"object"},"data_date":{"format":"date","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id"],"type":"object"},"report":{"additionalProperties":true,"description":"Unmodified source cost analysis. Retains actual_basis, actuals_complete, currency_status, monetary_totals_comparable, warnings, exact amounts and cost_model_limitations. Missing actuals may use an earned-value proxy; mixed currencies are not converted. p6_rollups adds the P6 labor / nonlabor / material / expense roll-ups, percents complete and variances.","properties":{"p6_rollups":{"additionalProperties":false,"description":"P6 activity and assignment roll-ups (services/scheduling/p6_cost_rollup.py), verified against values P6 stored by the cost oracle. Labor and nonlabor values sum the labor and nonlabor assignments; material carries cost only; at completion = actual + remaining.","properties":{"activities":{"additionalProperties":{"additionalProperties":true,"properties":{"expense":{"additionalProperties":true,"properties":{"actual_cost":{"nullable":true,"type":"number"},"actual_units":{"nullable":true,"type":"number"},"at_completion_cost":{"nullable":true,"type":"number"},"at_completion_units":{"nullable":true,"type":"number"},"cost_percent_complete":{"description":"Actual / at completion cost, a fraction 0-1 (P6 LaborCostPercentComplete ...).","type":"number"},"count":{"type":"integer"},"planned_cost":{"nullable":true,"type":"number"},"planned_units":{"nullable":true,"type":"number"},"remaining_cost":{"nullable":true,"type":"number"},"remaining_units":{"nullable":true,"type":"number"},"units_percent_complete":{"description":"Labor and nonlabor only: actual / at completion units, a fraction 0-1 (P6 LaborUnitsPercentComplete, NonLaborUnitsPercentComplete).","type":"number"}},"type":"object"},"labor":{"additionalProperties":true,"properties":{"actual_cost":{"nullable":true,"type":"number"},"actual_units":{"nullable":true,"type":"number"},"at_completion_cost":{"nullable":true,"type":"number"},"at_completion_units":{"nullable":true,"type":"number"},"cost_percent_complete":{"description":"Actual / at completion cost, a fraction 0-1 (P6 LaborCostPercentComplete ...).","type":"number"},"count":{"type":"integer"},"planned_cost":{"nullable":true,"type":"number"},"planned_units":{"nullable":true,"type":"number"},"remaining_cost":{"nullable":true,"type":"number"},"remaining_units":{"nullable":true,"type":"number"},"units_percent_complete":{"description":"Labor and nonlabor only: actual / at completion units, a fraction 0-1 (P6 LaborUnitsPercentComplete, NonLaborUnitsPercentComplete).","type":"number"}},"type":"object"},"material":{"additionalProperties":true,"properties":{"actual_cost":{"nullable":true,"type":"number"},"actual_units":{"nullable":true,"type":"number"},"at_completion_cost":{"nullable":true,"type":"number"},"at_completion_units":{"nullable":true,"type":"number"},"cost_percent_complete":{"description":"Actual / at completion cost, a fraction 0-1 (P6 LaborCostPercentComplete ...).","type":"number"},"count":{"type":"integer"},"planned_cost":{"nullable":true,"type":"number"},"planned_units":{"nullable":true,"type":"number"},"remaining_cost":{"nullable":true,"type":"number"},"remaining_units":{"nullable":true,"type":"number"},"units_percent_complete":{"description":"Labor and nonlabor only: actual / at completion units, a fraction 0-1 (P6 LaborUnitsPercentComplete, NonLaborUnitsPercentComplete).","type":"number"}},"type":"object"},"nonlabor":{"additionalProperties":true,"properties":{"actual_cost":{"nullable":true,"type":"number"},"actual_units":{"nullable":true,"type":"number"},"at_completion_cost":{"nullable":true,"type":"number"},"at_completion_units":{"nullable":true,"type":"number"},"cost_percent_complete":{"description":"Actual / at completion cost, a fraction 0-1 (P6 LaborCostPercentComplete ...).","type":"number"},"count":{"type":"integer"},"planned_cost":{"nullable":true,"type":"number"},"planned_units":{"nullable":true,"type":"number"},"remaining_cost":{"nullable":true,"type":"number"},"remaining_units":{"nullable":true,"type":"number"},"units_percent_complete":{"description":"Labor and nonlabor only: actual / at completion units, a fraction 0-1 (P6 LaborUnitsPercentComplete, NonLaborUnitsPercentComplete).","type":"number"}},"type":"object"},"total":{"additionalProperties":true,"description":"Labor + nonlabor + material + expense cost (P6 *TotalCost) and cost_percent_complete (P6 CostPercentComplete, a fraction).","properties":{"actual_cost":{"nullable":true,"type":"number"},"at_completion_cost":{"nullable":true,"type":"number"},"cost_percent_complete":{"type":"number"},"planned_cost":{"nullable":true,"type":"number"},"remaining_cost":{"nullable":true,"type":"number"}},"type":"object"},"units_percent_complete":{"description":"P6 UnitsPercentComplete over labor and nonlabor, a fraction 0-1.","type":"number"},"variances":{"additionalProperties":false,"description":"P6 TotalCostVariance ... NonLaborUnitsVariance with the activity as its own baseline (planned - at completion), as P6 shows without a project baseline.","properties":{"expense_cost_variance":{"nullable":true,"type":"number"},"labor_cost_variance":{"nullable":true,"type":"number"},"labor_units_variance":{"nullable":true,"type":"number"},"material_cost_variance":{"nullable":true,"type":"number"},"nonlabor_cost_variance":{"nullable":true,"type":"number"},"nonlabor_units_variance":{"nullable":true,"type":"number"},"total_cost_variance":{"nullable":true,"type":"number"}},"type":"object"}},"type":"object"},"description":"Per activity id.","type":"object"},"assignments":{"additionalProperties":{"additionalProperties":true,"type":"object"},"description":"Per assignment id: planned / actual / remaining / at completion units and cost and units_percent_complete (P6 ResourceAssignment values).","type":"object"}},"type":"object"}},"type":"object"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","input_digest","parameters","report","created_by_id","created_at","financial_basis"],"type":"object"}}},"description":"Retained assessment and provenance"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"404":{"description":"Scoped version or assessment not found"},"408":{"description":"Assessment cancelled"},"409":{"description":"Saved definition integrity failure"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid selection"},"429":{"description":"Engine capacity busy; retry later"},"503":{"description":"Engine unavailable"}},"summary":"Read saved cost report","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/date-traces":{"get":{"description":"Requires schedule:read and live Schedule admin. Newest first; metadata only.","operationId":"listProjectScheduleDateTraces","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"version_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleDateTraceHistory"}}},"description":"Date trace history"},"400":{"description":"The selected activity cannot be traced in this calculation context"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Version, activity or trace not found"},"409":{"description":"Stored evidence integrity check failed"},"422":{"description":"Invalid input"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"List retained activity date traces","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires schedule:write and live Schedule admin access to the full network. Uses an explicit immutable version and optional data-date override. Preserves original engine driver ties, calendars, constraints and actual-date qualifications. Does not change dates or approve delay claims. Each successful request creates a retained trace; check history after an uncertain response. No query parameters.","operationId":"createProjectScheduleDateTrace","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleDateTraceSelection"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleDateTrace"}}},"description":"Retained date trace"},"400":{"description":"The selected activity cannot be traced in this calculation context"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Version, activity or trace not found"},"409":{"description":"Stored evidence integrity check failed"},"422":{"description":"Invalid input"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Retain an activity date explanation","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/date-traces/{id}":{"get":{"description":"Requires schedule:read and live Schedule admin. Returns the saved evidence without recalculation. No query parameters.","operationId":"getProjectScheduleDateTrace","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleDateTrace"}}},"description":"Saved date trace"},"400":{"description":"The selected activity cannot be traced in this calculation context"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Version, activity or trace not found"},"409":{"description":"Stored evidence integrity check failed"},"422":{"description":"Invalid input"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Read original retained date trace evidence","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/definition":{"get":{"description":"Requires authenticated project schedule admin; scoped tokens need schedule:read for GET and schedule:write for POST. Full-network definitions and results may expose private activities. All responses use Cache-Control: private, no-store.","operationId":"listProjectScheduleDefinition","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"version":{"additionalProperties":false,"nullable":true,"properties":{"company_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition":{"additionalProperties":true,"type":"object"},"digest":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"provenance":{"additionalProperties":true,"type":"object"},"schema_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","company_id","project_id","version","schema_version","definition","digest","provenance","created_by_id","created_at"],"type":"object"}},"required":["version"],"type":"object"}}},"description":"Current version, or null before the first save.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule admin permission and token scope required."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project not found."},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Rate or calculation capacity limit; Retry-After may be returned."}},"summary":"Get current canonical schedule definition","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires authenticated project schedule admin; scoped tokens need schedule:read for GET and schedule:write for POST. Full-network definitions and results may expose private activities. All responses use Cache-Control: private, no-store. Creates an immutable version and schedule calculation atomically after successful validation and calculation. expected_version_id is the current version record ID, or null for first creation. This endpoint does not project canonical activities into legacy task rows.","operationId":"createProjectScheduleDefinition","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"definition":{"additionalProperties":true,"description":"Canonical definition, at most 64 nested object/array containers including the root. String values and keys must not contain NUL or unpaired Unicode surrogates.","type":"object"},"expected_version_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"}},"required":["expected_version_id","definition"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"calculation":{"additionalProperties":false,"properties":{"company_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"operation":{"enum":["schedule","health","risk","compare","earned"],"type":"string"},"parameters":{"additionalProperties":true,"type":"object"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"result":{"additionalProperties":true,"type":"object"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","company_id","project_id","version_id","engine_revision","operation","parameters","input_digest","result","created_by_id","created_at"],"type":"object"},"version":{"additionalProperties":false,"properties":{"company_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition":{"additionalProperties":true,"type":"object"},"digest":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"provenance":{"additionalProperties":true,"type":"object"},"schema_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","company_id","project_id","version","schema_version","definition","digest","provenance","created_by_id","created_at"],"type":"object"}},"required":["version","calculation"],"type":"object"}}},"description":"Created version and initial calculation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed JSON, invalid definition, invalid baseline or calculation parameters. Calculation rejects duplicate WBS identities, missing WBS parent/activity references and cycles before persistence; activity and WBS identities are separate namespaces."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule admin permission and token scope required."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project not found."},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Calculation cancelled before publication."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Head version changed or integrity verification failed."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request exceeds 2 MiB."},"415":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Content-Type must be application/json."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request field validation failed."},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Rate or calculation capacity limit; Retry-After may be returned."},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Calculation engine unavailable or timed out."}},"summary":"Save and calculate a canonical schedule version","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/earned-value":{"get":{"description":"Requires schedule:read (GET) or schedule:write and live Schedule admin access on the project. BAC, BCWS, BCWP, ACWP, CV, SV, CPI, SPI and EAC per activity of the saved head version from resource assignment costs, with the project baseline (Assign Baselines) as the planned value basis (the current schedule when none is assigned), plus the latest stored period's actual this period. These feed the planner's Earned Value columns.","operationId":"listProjectScheduleEarnedValue","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleEarnedValue"}}},"description":"Earned value"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, company admin (company-wide periods) or token scope denied"},"409":{"description":"The stored schedule or project baseline failed its integrity check"}},"summary":"Per-activity earned value","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/exports/{import_id}":{"get":{"description":"Requires Schedule admin permission and an enabled Schedule tool. Scoped tokens require schedule:read. Returns the retained source bytes after integrity verification, not an export of subsequent Planner or field edits. Download responses are private, no-store.","operationId":"getProjectScheduleExport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"import_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}},"application/xml":{"schema":{"format":"binary","type":"string"}}},"description":"Retained UTF-8 source download","headers":{"Cache-Control":{"schema":{"type":"string"}},"Content-Disposition":{"schema":{"type":"string"}},"X-Schedule-Import-ID":{"schema":{"type":"string"}},"X-Schedule-Source-SHA256":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request or source"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permission or token scope"},"404":{"description":"Project or import not found"},"409":{"description":"Source integrity or publication ownership conflict"}},"summary":"Export exact retained schedule source","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/feed":{"get":{"description":"Requires schedule:read and live Schedule view access on the project. Newest first: saved versions (who, with a change summary against the previous version, stored when the version is saved; older versions fill in on later reads), recalculations, baselines, update-cycle events, adopted scenarios, imports and discussion. Schedule admins see every kind; other viewers only discussion they may read. Page with `before` = the previous `next_cursor`.","operationId":"listProjectScheduleFeed","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before","required":false,"schema":{"maxLength":80,"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Comma-separated kinds","in":"query","name":"kinds","required":false,"schema":{"type":"string"}},{"description":"Discussion of one activity","in":"query","name":"activity_id","required":false,"schema":{"maxLength":200,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleFeed"}}},"description":"Feed page"},"400":{"description":"Invalid query or body"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, tool enablement or token scope denied"},"404":{"description":"Activity not visible"},"422":{"description":"Invalid cursor or kind"}},"summary":"Schedule change feed","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/feed/changes":{"get":{"description":"Requires schedule:read and live Schedule admin access on the project (it discloses the full network). Every activity entry of one version's change (feed and banner summaries name only the first 25): against its previous version, or against `against_version_id` (for example the version you last looked at). Added, then removed, then changed activities, with every changed field.","operationId":"listProjectScheduleFeedChanges","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"version_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"against_version_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"offset","required":false,"schema":{"default":0,"maximum":1000000,"minimum":0,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleVersionChangePage"}}},"description":"Change page"},"400":{"description":"Invalid query or body"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, tool enablement or token scope denied"},"404":{"description":"Version not found"},"422":{"description":"Invalid query, or a legacy version without unique activity ids"}},"summary":"Version change details, paged","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/feed/seen":{"post":{"description":"Requires schedule:read and live Schedule admin access on the project Sets your 'last looked' mark to a saved version of the project.","operationId":"createProjectScheduleFeedSeen","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"version_id":{"minimum":1,"type":"integer"}},"required":["version_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"last_seen":{"additionalProperties":false,"properties":{"seen_at":{"format":"date-time","type":"string"},"version":{"type":"integer"},"version_id":{"type":"integer"}},"required":["version_id","version","seen_at"],"type":"object"}},"required":["last_seen"],"type":"object"}}},"description":"Marked"},"400":{"description":"Invalid query or body"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, tool enablement or token scope denied"},"404":{"description":"Version not found"},"422":{"description":"Invalid version id"}},"summary":"Acknowledge a version","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/feed/since":{"get":{"description":"Requires schedule:read and live Schedule admin access on the project (it discloses the full network). Versions saved since the version you last acknowledged, a change summary from it to the head, and new comments by others. The first call sets your mark to the head and reports nothing.","operationId":"listProjectScheduleFeedSince","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleChangesSince"}}},"description":"Changes"},"400":{"description":"Invalid query or body"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, tool enablement or token scope denied"}},"summary":"What changed since I last looked","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/field-progress/apply":{"post":{"description":"Authorization is two-sided and live: Schedule access (non-admins only see activities bound to a field task they can see) and the source tool's own visibility for the linked record. All responses are private, no-store. Requires schedule:write token scope, Schedule admin and Daily Log view. Saves through the versioned definition path (expected-version check, calculation, history); the preview digest must still match. Field tasks are not written: publish progress afterwards with the progress preview/apply operations. Re-evaluates link alerts. No query parameters.","operationId":"createProjectScheduleFieldProgressApply","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleFieldProgressApplyRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleFieldProgressApplied"}}},"description":"New schedule version"},"400":{"description":"Invalid body or query, or a field that does not apply to the source type's workflow"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, the source tool's permission, or token scope denied"},"404":{"description":"Link, source record or activity not found or not visible to the caller"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version or preview, or a retained change-event impact link"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The scheduling engine rejected the schedule"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Record accepted progress suggestions as a new schedule version","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/field-progress/preview":{"post":{"description":"Authorization is two-sided and live: Schedule access (non-admins only see activities bound to a field task they can see) and the source tool's own visibility for the linked record. All responses are private, no-store. Requires schedule:write token scope, Schedule admin and Daily Log view. Approved entries on or before the status date (and the data date unless advance_data_date) suggest actual start, actual finish and physical percent complete. Recorded actuals are never cleared or moved and progress is never lowered. Returns a preview_digest that binds apply to this exact review. No query parameters.","operationId":"createProjectScheduleFieldProgressPreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleFieldProgressPreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleFieldProgressPreview"}}},"description":"Suggestions"},"400":{"description":"Invalid body or query, or a field that does not apply to the source type's workflow"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, the source tool's permission, or token scope denied"},"404":{"description":"Link, source record or activity not found or not visible to the caller"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version or preview, or a retained change-event impact link"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Body failed schema validation"}},"summary":"Preview progress suggested by linked daily-log entries","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/financial-periods":{"get":{"description":"Requires schedule:read (GET) or schedule:write and live Schedule admin access on the project. Returns company-wide periods and this project's periods in date order, each with this project's effective stored period performance run.","operationId":"listProjectScheduleFinancialPeriods","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleFinancialPeriodList"}}},"description":"Financial periods"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, company admin (company-wide periods) or token scope denied"}},"summary":"List financial periods","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires schedule:read (GET) or schedule:write and live Schedule admin access on the project. Creates one period, a batch (`periods`), or copies an Accounting fiscal year's periods as company-wide periods (`{source: \"accounting\", fiscal_year}`; adjusting period 13 is skipped; Accounting is read only and never posted to). Company-wide periods require a company admin. Periods of one scope cannot overlap and span at most a year. Every period created is audited.","operationId":"createProjectScheduleFinancialPeriod","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleFinancialPeriodInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleFinancialPeriodList"}}},"description":"Created; the updated period list"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, company admin (company-wide periods) or token scope denied"},"404":{"description":"Accounting fiscal year not found"},"409":{"description":"The fiscal year's periods already exist"}},"summary":"Create financial periods","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/financial-periods/{period_id}":{"delete":{"description":"Requires schedule:read (GET) or schedule:write and live Schedule admin access on the project. A period with stored period performance (in any project) is retained. Audited.","operationId":"deleteProjectScheduleFinancialPeriod","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"period_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleFinancialPeriodList"}}},"description":"Deleted"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, company admin (company-wide periods) or token scope denied"},"404":{"description":"Financial period not found"},"409":{"description":"The period has stored performance"}},"summary":"Delete a financial period","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false},"patch":{"description":"Requires schedule:read (GET) or schedule:write and live Schedule admin access on the project. Only the name can change; dates and scope are immutable (database trigger). Audited.","operationId":"updateProjectScheduleFinancialPeriod","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"period_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":80,"minLength":1,"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleFinancialPeriodList"}}},"description":"Renamed"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, company admin (company-wide periods) or token scope denied"},"404":{"description":"Financial period not found"}},"summary":"Rename a financial period","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/financial-periods/{period_id}/store-performance":{"post":{"description":"Requires schedule:read (GET) or schedule:write and live Schedule admin access on the project. Snapshots the actual-to-date units and cost of every activity and resource assignment of a saved version (default the current head; `update_period_id` stores an approved schedule update's accepted version) into a financial period that has ended at the version's data date. Activity rows also store earned value and planned value to date (project baseline as the PV basis). Actual this period = to date minus the previous stored period. Periods are stored in date order; earlier periods are frozen. Storing the latest period again needs `replace: true` and appends a superseding run; runs are immutable and audited. Sources are schedule resource actuals; the Accounting ledger is never read or written.","operationId":"storePerformanceProjectScheduleFinancialPeriod","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"period_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"note":{"maxLength":1000,"type":"string"},"replace":{"default":false,"type":"boolean"},"update_period_id":{"minimum":1,"type":"integer"},"version_id":{"minimum":1,"type":"integer"}},"type":"object"}}},"required":false},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"basis":{"enum":["project_baseline","current_schedule"],"type":"string"},"ledger_writes":{"enum":[false],"type":"boolean"},"run":{"$ref":"#/components/schemas/schedule_SchedulePeriodPerformanceRun"}},"required":["run","basis","ledger_writes"],"type":"object"}}},"description":"Stored run"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, company admin (company-wide periods) or token scope denied"},"404":{"description":"Financial period, version or update not found"},"409":{"description":"The period has not ended at the data date, an earlier period is frozen, the period is already stored (confirm with replace), the update is not accepted, or the stored schedule failed its integrity check"},"413":{"description":"Too many rows to store"}},"summary":"Store period performance","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/forensics":{"get":{"description":"Requires live Schedule admin access because complete-network forensic evidence may disclose private activities. Uses the original AACE RP 29R-03 forensic methods and concurrency assessment. Delay events, responsibility, concurrency facts and source documents are analyst statements; results do not establish causation, responsibility, entitlement or admissibility. All responses are private, no-store. Requires schedule:read token scope. Newest first; metadata and pinned inputs only.","operationId":"listProjectScheduleForensics","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"version_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"method","schema":{"enum":["contemporaneous_as_is","contemporaneous_split","as_planned_vs_as_built","as_planned_vs_as_built_periodic","impacted_as_planned","collapsed_as_built","impacted_multiple_base","collapsed_multiple_base","modified_or_recreated","prospective_tia","concurrency"],"type":"string"}},{"in":"query","name":"page_size","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleForensicHistory"}}},"description":"Forensic report history"},"400":{"description":"Invalid selection, roles or method options"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Version, baseline or report not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stored evidence integrity check failed"},"413":{"description":"Selected versions exceed the 3 MiB forensic input bound"},"422":{"description":"Invalid input, or the method refused inputs that fail its preconditions"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"List retained forensic delay analyses","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires live Schedule admin access because complete-network forensic evidence may disclose private activities. Uses the original AACE RP 29R-03 forensic methods and concurrency assessment. Delay events, responsibility, concurrency facts and source documents are analyst statements; results do not establish causation, responsibility, entitlement or admissibility. All responses are private, no-store. Requires schedule:write token scope. Inputs are explicit immutable versions or named baselines with method-specific roles; retained versions with data dates are supplied as metadata so a skipped update is named. Saves an immutable report with pinned input digests after rechecking authorization; never applies dates or advances the plan. Repeated requests create separate reports. No query parameters.","operationId":"createProjectScheduleForensic","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"`1` always queues a background schedule analysis job (202); `0` forces the inline path (30 s engine limit). Omitted: inputs above the size threshold are queued automatically.","in":"query","name":"async","required":false,"schema":{"enum":["0","1"],"type":"string"}},{"description":"`respond-async` is equivalent to `async=1`; the 202 response then carries `Preference-Applied: respond-async`.","in":"header","name":"Prefer","required":false,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleForensicSelection"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleForensicReport"}}},"description":"Retained forensic report"},"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"}},"required":["job"],"type":"object"}}},"description":"Queued as a durable background schedule analysis job (large input, `async=1` or `Prefer: respond-async`). Poll the job URL in `Location`; when it completes, `job.resource` names the retained record, identical to what the inline path returns.","headers":{"Location":{"description":"Job status URL","schema":{"type":"string"}}}},"400":{"description":"Invalid selection, roles or method options"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Version, baseline or report not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stored evidence integrity check failed"},"413":{"description":"Selected versions exceed the 3 MiB forensic input bound"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Invalid input, or the method refused inputs that fail its preconditions"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Create a retained forensic delay analysis","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/forensics/{id}":{"get":{"description":"Requires live Schedule admin access because complete-network forensic evidence may disclose private activities. Uses the original AACE RP 29R-03 forensic methods and concurrency assessment. Delay events, responsibility, concurrency facts and source documents are analyst statements; results do not establish causation, responsibility, entitlement or admissibility. All responses are private, no-store. Requires schedule:read token scope. Returns the retained report without recalculation after verifying its result digest; digest_current reports whether each pinned version still matches. No query parameters.","operationId":"getProjectScheduleForensic","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleForensicReport"}}},"description":"Retained forensic report"},"400":{"description":"Invalid selection, roles or method options"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Version, baseline or report not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stored evidence integrity check failed"},"413":{"description":"Selected versions exceed the 3 MiB forensic input bound"},"422":{"description":"Invalid input, or the method refused inputs that fail its preconditions"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Read a retained forensic delay analysis","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/gantt-print":{"get":{"description":"Requires live Schedule admin access (complete-network dates and float can disclose private activities) and the schedule:read token scope. Reads only retained evidence: the saved head version, its own retained schedule calculation (exact input, no data-date override), a named baseline's original calculation, and the latest retained health, resource histogram and cost dashboard. Never runs the engine and never writes. All responses are private, no-store. Page size and orientation, timescale, columns, legend and baseline bars are selectable. At actual scale the timeline tiles across pages and rows continue down; fit=width scales the timeline to one page width and fit=page also scales rows (down to a 2.5 pt legibility floor) to one page. Every page shows the project, version, data date, baseline and page position. Layouts above 400 pages are refused.","operationId":"listProjectScheduleGanttPrint","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"paper","schema":{"default":"tabloid","enum":["letter","legal","tabloid","a4","a3"],"type":"string"}},{"in":"query","name":"orientation","schema":{"default":"landscape","enum":["landscape","portrait"],"type":"string"}},{"in":"query","name":"timescale","schema":{"default":"week","enum":["day","week","month","quarter"],"type":"string"}},{"description":"Comma-separated, unique: id, name, start, finish, duration, total_float, percent.","in":"query","name":"columns","schema":{"default":"id,name,start,finish,total_float","type":"string"}},{"in":"query","name":"fit","schema":{"default":"none","enum":["none","width","page"],"type":"string"}},{"in":"query","name":"filter","schema":{"default":"all","enum":["all","critical","incomplete"],"type":"string"}},{"in":"query","name":"show_baseline","schema":{"default":"1","enum":["1","0","true","false"],"type":"string"}},{"in":"query","name":"show_legend","schema":{"default":"1","enum":["1","0","true","false"],"type":"string"}},{"in":"query","name":"from","schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"to","schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"title","schema":{"maxLength":120,"type":"string"}},{"description":"Planner layout whose Timescale, Bar Chart Options and Bars sections style the print (builtin:<id> or layout:<id>, a layout visible to the caller). Absent keeps the timescale and fixed bar colours above.","in":"query","name":"layout","schema":{"pattern":"^(?:builtin:[a-z0-9_-]{1,40}|layout:[1-9]\\d{0,9})$","type":"string"}},{"in":"query","name":"baseline_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"Gantt PDF attachment"},"400":{"description":"Invalid or repeated query parameter, or no saved schedule"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Unknown report or baseline"},"408":{"description":"Request cancelled"},"409":{"description":"Stored schedule or baseline evidence failed its integrity check"},"422":{"description":"The layout cannot be printed (no room for the timeline, no dates, or over 400 pages)"}},"summary":"Print the saved schedule as a Gantt PDF","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/hierarchy/apply":{"post":{"description":"Requires Schedule, Submittals and CRM admin permissions and enabled tools. Scoped tokens require schedule:write, submittals:read and crm:read. Responses are private, no-store. Strict snake_case JSON is bounded to 2 MiB and 20,000 explicit decisions. Identity namespaces distinguish activities from WBS nodes even when their opaque IDs match. Parent WBS identity and create privacy/assignment/baseline/unstarted-progress policies are explicit. Bind, move, restore, retain and retire require an exact existing task ID and row digest. Preview returns only existing task IDs and symbolic new parents; internal receipt and temporary planning IDs are excluded. Apply validates the reviewed digest, locks current authority and task rows, then atomically writes the hierarchy and receipt/head; identical current requests replay without new writes. Summaries are admin-only, private and unassigned. Progressed work, empty summaries and imported/mixed transitions require separate reconciliation. Canonical dependencies and resources are not projected by this endpoint.","operationId":"createProjectScheduleHierarchyApply","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyApplyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyApplication"}}},"description":"Publication result or matching current replay.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed request, invalid identifiers or unsupported query parameters.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule, Submittals and CRM admin permissions and enabled tools required; scoped tokens also require the operation scopes.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project or requested resource not found within authorized scope.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling verification was cancelled.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Saved version/calculation, reviewed state, row digest or publication authority changed; review again. Application also refuses unsupported origin or unresolved blockers.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request exceeds 2 MiB or 10,000 decisions, or inventory exceeds interactive limits.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Strict request schema validation failed.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine busy or request rate limited.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine unavailable or unable to verify the calculation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}}},"summary":"Apply a reviewed native hierarchy publication","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/hierarchy/inventory":{"get":{"description":"Requires Schedule, Submittals and CRM admin permissions and enabled tools, with schedule:read, submittals:read and crm:read token scopes. Responses are private, no-store. Supplies existing task IDs and exact row digests for reviewed decisions. Node, task and assignee pages are independent; active project members are the only assignment candidates; compare inventory_digest across every page to reject mixed snapshots. This inventory never authorizes apply: obtain a fresh hierarchy preview after composing decisions. Unknown or repeated query parameters are rejected. Summaries remain admin-only.","operationId":"listProjectScheduleHierarchyInventory","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"expected_version_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"calculation_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"node_page","required":false,"schema":{"default":1,"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"task_page","required":false,"schema":{"default":1,"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"assignee_page","required":false,"schema":{"default":1,"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyInventory"}}},"description":"Verified review, including any blockers; no task mutation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed request, invalid identifiers or unsupported query parameters.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule, Submittals and CRM admin permissions and enabled tools required; scoped tokens also require the operation scopes.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project or requested resource not found within authorized scope.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling verification was cancelled.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Saved version/calculation, reviewed state, row digest or publication authority changed; review again. Application also refuses unsupported origin or unresolved blockers.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request exceeds 2 MiB or 10,000 decisions, or inventory exceeds interactive limits.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Strict request schema validation failed.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine busy or request rate limited.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine unavailable or unable to verify the calculation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}}},"summary":"Read a paginated native hierarchy decision inventory","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/hierarchy/preview":{"post":{"description":"Requires Schedule, Submittals and CRM admin permissions and enabled tools. Scoped tokens require schedule:read, submittals:read and crm:read. Responses are private, no-store. Strict snake_case JSON is bounded to 2 MiB and 20,000 explicit decisions. Identity namespaces distinguish activities from WBS nodes even when their opaque IDs match. Parent WBS identity and create privacy/assignment/baseline/unstarted-progress policies are explicit. Bind, move, restore, retain and retire require an exact existing task ID and row digest. Preview returns only existing task IDs and symbolic new parents; internal receipt and temporary planning IDs are excluded. Apply validates the reviewed digest, locks current authority and task rows, then atomically writes the hierarchy and receipt/head; identical current requests replay without new writes. Summaries are admin-only, private and unassigned. Progressed work, empty summaries and imported/mixed transitions require separate reconciliation. Canonical dependencies and resources are not projected by this endpoint.","operationId":"createProjectScheduleHierarchyPreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyPreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleHierarchyPreview"}}},"description":"Verified review, including any blockers; no task mutation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed request, invalid identifiers or unsupported query parameters.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule, Submittals and CRM admin permissions and enabled tools required; scoped tokens also require the operation scopes.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project or requested resource not found within authorized scope.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling verification was cancelled.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Saved version/calculation, reviewed state, row digest or publication authority changed; review again. Application also refuses unsupported origin or unresolved blockers.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request exceeds 2 MiB or 10,000 decisions, or inventory exceeds interactive limits.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Strict request schema validation failed.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine busy or request rate limited.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine unavailable or unable to verify the calculation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}}},"summary":"Preview a reviewed native hierarchy publication","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/imports":{"get":{"description":"Requires Schedule admin permission and an enabled Schedule tool. Scoped tokens require schedule:read. Returns the newest 50 imports ordered by descending ID. Does not return retained source contents.","operationId":"listProjectScheduleImports","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"appliedAt":{"format":"date-time","nullable":true,"type":"string"},"createdAt":{"format":"date-time","type":"string"},"fileName":{"type":"string"},"id":{"type":"integer"},"result":{"nullable":true,"properties":{"assignmentCount":{"type":"integer"},"dependencyCount":{"type":"integer"},"resourceCount":{"type":"integer"},"taskCount":{"type":"integer"}},"required":["taskCount","resourceCount","assignmentCount","dependencyCount"],"type":"object"},"sourceProjectId":{"type":"string"}},"required":["id","fileName","sourceProjectId","createdAt","appliedAt","result"],"type":"object"},"type":"array"}}},"description":"Success"},"400":{"description":"Invalid request or source"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permission or token scope"},"404":{"description":"Project or import not found"},"409":{"description":"Source integrity or publication ownership conflict"}},"summary":"List retained schedule imports","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires Schedule admin permission and an enabled Schedule tool. Scoped tokens require schedule:write. Upload UTF-8 XER or project XML, at most 2 MiB, with a plain matching .xer or .xml filename of at most 255 characters. Stores a digest-deduplicated retained source and preview; does not commit field tasks or initialize a Planner version. The source field is an alias for file.","operationId":"createProjectScheduleImport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"anyOf":[{"required":["file"]},{"required":["source"]}],"properties":{"file":{"format":"binary","type":"string"},"source":{"format":"binary","type":"string"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"applied":{"type":"boolean"},"assignments":{"items":{"properties":{"reimportSourceUid":{"type":"string"},"taskSourceUid":{"type":"string"}},"required":["taskSourceUid","reimportSourceUid"],"type":"object"},"type":"array"},"dataDate":{"format":"date","nullable":true,"type":"string"},"dependencies":{"items":{"properties":{"lagHours":{"type":"number"},"predecessorSourceUid":{"type":"string"},"successorSourceUid":{"type":"string"},"type":{"enum":["FS","SS","FF","SF"],"type":"string"}},"required":["predecessorSourceUid","successorSourceUid","type","lagHours"],"type":"object"},"type":"array"},"fileName":{"type":"string"},"format":{"enum":["xer","mspxml"],"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"resources":{"items":{"properties":{"name":{"type":"string"},"sourceUid":{"type":"string"}},"required":["sourceUid","name"],"type":"object"},"type":"array"},"sourceProjectId":{"type":"string"},"tasks":{"items":{"properties":{"actualFinish":{"format":"date","nullable":true,"type":"string"},"actualStart":{"format":"date","nullable":true,"type":"string"},"finish":{"format":"date","type":"string"},"milestone":{"type":"boolean"},"name":{"type":"string"},"parentSourceUid":{"nullable":true,"type":"string"},"percentComplete":{"type":"number"},"sourceUid":{"type":"string"},"start":{"format":"date","type":"string"},"wbsCode":{"nullable":true,"type":"string"}},"required":["sourceUid","name","parentSourceUid","start","finish","percentComplete","milestone","wbsCode","actualStart","actualFinish"],"type":"object"},"type":"array"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["id","fileName","applied","format","sourceProjectId","name","dataDate","tasks","resources","assignments","dependencies","warnings"],"type":"object"}}},"description":"Success"},"400":{"description":"Invalid request or source"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permission or token scope"},"404":{"description":"Project or import not found"},"409":{"description":"Source integrity or publication ownership conflict"}},"summary":"Preview a schedule source upload","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/imports/{import_id}":{"get":{"description":"Requires Schedule admin permission and an enabled Schedule tool. Scoped tokens require schedule:read. Verifies retained source integrity before parsing the preview.","operationId":"getProjectScheduleImport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"import_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"applied":{"type":"boolean"},"assignments":{"items":{"properties":{"reimportSourceUid":{"type":"string"},"taskSourceUid":{"type":"string"}},"required":["taskSourceUid","reimportSourceUid"],"type":"object"},"type":"array"},"dataDate":{"format":"date","nullable":true,"type":"string"},"dependencies":{"items":{"properties":{"lagHours":{"type":"number"},"predecessorSourceUid":{"type":"string"},"successorSourceUid":{"type":"string"},"type":{"enum":["FS","SS","FF","SF"],"type":"string"}},"required":["predecessorSourceUid","successorSourceUid","type","lagHours"],"type":"object"},"type":"array"},"fileName":{"type":"string"},"format":{"enum":["xer","mspxml"],"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"resources":{"items":{"properties":{"name":{"type":"string"},"sourceUid":{"type":"string"}},"required":["sourceUid","name"],"type":"object"},"type":"array"},"sourceProjectId":{"type":"string"},"tasks":{"items":{"properties":{"actualFinish":{"format":"date","nullable":true,"type":"string"},"actualStart":{"format":"date","nullable":true,"type":"string"},"finish":{"format":"date","type":"string"},"milestone":{"type":"boolean"},"name":{"type":"string"},"parentSourceUid":{"nullable":true,"type":"string"},"percentComplete":{"type":"number"},"sourceUid":{"type":"string"},"start":{"format":"date","type":"string"},"wbsCode":{"nullable":true,"type":"string"}},"required":["sourceUid","name","parentSourceUid","start","finish","percentComplete","milestone","wbsCode","actualStart","actualFinish"],"type":"object"},"type":"array"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["id","fileName","applied","format","sourceProjectId","name","dataDate","tasks","resources","assignments","dependencies","warnings"],"type":"object"}}},"description":"Success"},"400":{"description":"Invalid request or source"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permission or token scope"},"404":{"description":"Project or import not found"},"409":{"description":"Source integrity or publication ownership conflict"}},"summary":"Read a retained schedule import preview","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/imports/{import_id}/commit":{"post":{"description":"Requires Schedule admin permission and an enabled Schedule tool. Scoped tokens require schedule:write. Creates field tasks, resources, assignments and dependencies atomically. A repeat of an applied import returns the recorded result with retried=true. A reviewed publication or ambiguous legacy source ownership blocks a new commit. This does not initialize or adopt a Planner definition.","operationId":"commitProjectScheduleImport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"import_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"appliedAt":{"format":"date-time","type":"string"},"assignmentCount":{"type":"integer"},"dependencyCount":{"type":"integer"},"id":{"type":"integer"},"resourceCount":{"type":"integer"},"retried":{"type":"boolean"},"taskCount":{"type":"integer"}},"required":["id","appliedAt","taskCount","resourceCount","assignmentCount","dependencyCount","retried"],"type":"object"}}},"description":"Success"},"400":{"description":"Invalid request or source"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permission or token scope"},"404":{"description":"Project or import not found"},"409":{"description":"Source integrity or publication ownership conflict"}},"summary":"Commit a retained schedule import","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/imports/{import_id}/conversion":{"get":{"description":"Read-only full-project inventory. Requires Schedule, Submittals and CRM admin privileges; scoped Bearer tokens must grant schedule:read, submittals:read and crm:read. Returns the imported canonical definition plus exact identity candidates, ambiguities, private/current metadata and historical references. Never matches names or modifies tasks, bindings or versions. All responses use private, no-store.","operationId":"listProjectScheduleImportConversion","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"import_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"adoption_blockers":{"description":"Reasons initial adoption is unavailable; resolve and refresh preview before adopting.","items":{"type":"string"},"type":"array"},"definition":{"additionalProperties":true,"type":"object"},"engine_revision":{"type":"string"},"import_issues":{"description":"The importer's issue log for this source project (deduplicated, at most 5,001 entries). Kept beside the definition and recorded in the adopted version's provenance; never part of the definition.","items":{"additionalProperties":true,"type":"object"},"type":"array"},"inventory":{"$ref":"#/components/schemas/schedule_ScheduleConversionInventory"},"preview_digest":{"description":"Digest of source, engine definition/revision and complete project conversion snapshot. Required unchanged for initial adoption.","pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["definition","engine_revision","inventory","preview_digest","adoption_blockers"],"type":"object"}}},"description":"Read-only canonical definition and exact source identity inventory. No records are converted.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed JSON, invalid definition, invalid baseline or calculation parameters. Calculation rejects duplicate WBS identities, missing WBS parent/activity references and cycles before persistence; activity and WBS identities are separate namespaces."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Requires admin permission and enabled schedule, submittals and crm tools. Scoped tokens require all three read scopes."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project or applied schedule import not found."},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Calculation cancelled before publication."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Retained source integrity, project identity or concurrent import verification failed."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"The combined task, binding and reference snapshot exceeds the 50,000-row interactive inventory limit."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request field validation failed."},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Rate or calculation capacity limit; Retry-After may be returned."},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Calculation engine unavailable or timed out."}},"summary":"Preview retained schedule conversion","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/imports/{import_id}/conversion/adopt":{"post":{"description":"Requires schedule admin/write scope plus submittals and crm admin/read scopes. The canonical head must be absent; expected_version_id must be null. Only current applied source imports without manual-task/edit or mapping blockers can be adopted. Revalidates preview digest and authority before atomic publication, preserves existing task IDs/privacy/references and records legacy task provenance. Does not project calculated dates into legacy rows. All responses use private, no-store.","operationId":"createProjectScheduleImportConversionAdopt","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"import_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expected_version_id":{"description":"Must be null; adoption cannot overwrite an existing canonical schedule.","enum":[null],"nullable":true,"type":"integer"},"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["preview_digest","expected_version_id"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"bindings_created":{"minimum":0,"type":"integer"},"calculation":{"additionalProperties":false,"properties":{"company_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"operation":{"enum":["schedule","health","risk","compare","earned"],"type":"string"},"parameters":{"additionalProperties":true,"type":"object"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"result":{"additionalProperties":true,"type":"object"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","company_id","project_id","version_id","engine_revision","operation","parameters","input_digest","result","created_by_id","created_at"],"type":"object"},"version":{"additionalProperties":false,"properties":{"company_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition":{"additionalProperties":true,"type":"object"},"digest":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"project_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"provenance":{"additionalProperties":true,"type":"object"},"schema_version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","company_id","project_id","version","schema_version","definition","digest","provenance","created_by_id","created_at"],"type":"object"}},"required":["version","calculation","bindings_created"],"type":"object"}}},"description":"Created initial canonical version, calculation and stable activity bindings. Legacy task rows and their cross-tool references remain unchanged.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed JSON, invalid definition, invalid baseline or calculation parameters. Calculation rejects duplicate WBS identities, missing WBS parent/activity references and cycles before persistence; activity and WBS identities are separate namespaces."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule/Submittals/CRM admin authority and enabled tools required. Scoped tokens require schedule:write, submittals:read and crm:read."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project or applied retained import not found."},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Calculation cancelled before publication."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Preview digest changed, adoption blockers remain, engine changed or a canonical head already exists. Refresh and reconcile; no partial version is published."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Body exceeds 2 MiB or combined conversion inventory exceeds 50,000 rows."},"415":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Content-Type must be application/json."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request field validation failed."},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Rate or calculation capacity limit; Retry-After may be returned."},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Calculation engine unavailable or timed out."}},"summary":"Adopt a reviewed retained source as the initial canonical schedule","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/imports/{import_id}/merge/apply":{"post":{"description":"P6 import options. The retained XER, P6 XML or MSPDI source of a schedule import (previewed or imported) is read by the scheduling engine and merged into the current canonical plan: Update existing (per object type actions), Replace, or Add into a WBS node. Activities match by retained P6 GUID, else by Activity ID; matched objects keep their local identities. Saves one new version through the versioned save path (expected version, calculation, audit event). The preview must still match preview_digest. Requires Schedule admin and schedule:write. No query parameters.","operationId":"createProjectScheduleImportMergeApply","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"import_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleImportMergeApply"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleImportMergeResult"}}},"description":"Saved version"},"400":{"description":"Invalid body, options or file, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Schedule import not found"},"408":{"description":"Request cancelled"},"409":{"description":"No current plan, the plan changed, the preview changed, or a retained source failed its integrity check"},"429":{"description":"Scheduling engine busy; retry after Retry-After"},"503":{"description":"Scheduling engine unavailable"}},"summary":"Apply a reviewed schedule import update","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/imports/{import_id}/merge/preview":{"post":{"description":"P6 import options. The retained XER, P6 XML or MSPDI source of a schedule import (previewed or imported) is read by the scheduling engine and merged into the current canonical plan: Update existing (per object type actions), Replace, or Add into a WBS node. Activities match by retained P6 GUID, else by Activity ID; matched objects keep their local identities. Read-only: returns counts per object type, a sample diff and preview_digest. Requires Schedule admin and schedule:write. No query parameters.","operationId":"createProjectScheduleImportMergePreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"import_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleImportMergeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleImportMergePreview"}}},"description":"Merge preview"},"400":{"description":"Invalid body, options or file, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Schedule import not found"},"408":{"description":"Request cancelled"},"409":{"description":"No current plan, the plan changed, the preview changed, or a retained source failed its integrity check"},"429":{"description":"Scheduling engine busy; retry after Retry-After"},"503":{"description":"Scheduling engine unavailable"}},"summary":"Review a retained schedule import as an update of the current plan","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/imports/{import_id}/source":{"get":{"description":"Requires Schedule admin permission and an enabled Schedule tool. Scoped tokens require schedule:read. Returns the retained source bytes after integrity verification, not an export of subsequent Planner or field edits. Download responses are private, no-store.","operationId":"listProjectScheduleImportSource","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"import_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}},"application/xml":{"schema":{"format":"binary","type":"string"}}},"description":"Retained UTF-8 source download","headers":{"Cache-Control":{"schema":{"type":"string"}},"Content-Disposition":{"schema":{"type":"string"}},"X-Schedule-Source-SHA256":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request or source"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permission or token scope"},"404":{"description":"Project or import not found"},"409":{"description":"Source integrity or publication ownership conflict"}},"summary":"Download retained schedule source","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/layout-defaults":{"put":{"description":"Planner layouts are view preferences and never change the schedule. Visible layouts: the caller's personal (user) layouts, this project's layouts and the company's shared layouts. Requires Schedule access on the project. Documents are versioned (planner/layout-schema.ts): every response carries the server-validated, migrated document; unknown feature sections are preserved. All responses are private, no-store. Requires schedule:write. target user sets the caller's own default on this project; target project needs Schedule admin and a layout everyone can see (built-in, project or shared). layout_ref null clears it. No query parameters.","operationId":"replaceProjectScheduleLayoutDefaults","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLayoutDefaultUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLayoutDefaultsEnvelope"}}},"description":"Defaults after the change"},"400":{"description":"Invalid body, name or layout reference, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Token scope, Schedule access or scope permission denied (Project needs Schedule admin; Shared needs company administrator and Schedule admin; personal layouts are owner-only). The message gives the reason."},"404":{"description":"Project, or a layout not visible to the caller (another user's personal layout, another project's layout)"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate name in the scope, stale revision, or scope limit (200) reached"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Body failed schema validation"}},"summary":"Set my default or the project default layout","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/layout-files":{"get":{"description":"A built-in or visible stored layout as a .json file ({format: \"os.construction layout\", version: 1, name, document}). Importing the file back is lossless. Requires schedule:read and Schedule access.","operationId":"listProjectScheduleLayoutFiles","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"layout_ref","required":true,"schema":{"pattern":"^(?:builtin:[a-z0-9_-]{1,40}|layout:[1-9]\\d{0,9})$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLayoutFile"}}},"description":"Layout file (attachment)"},"400":{"description":"Invalid body, options or file, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Layout not found"}},"summary":"Download a layout as an os.construction layout file","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Validates the file with the stored-layout readers (size-capped, unknown sections preserved) and saves it under the chosen scope with the same permissions as Save Layout As. P6 .plf layout files are refused with an explanation: their format is not publicly documented. Requires schedule:write. No query parameters.","operationId":"createProjectScheduleLayoutFile","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLayoutFileImport"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLayoutFileImportResult"}}},"description":"Created layout"},"400":{"description":"Invalid body, options or file, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"409":{"description":"Scope full"},"413":{"description":"Request larger than 2 MiB"},"415":{"description":"Content-Type must be application/json"}},"summary":"Import a layout file as a new layout","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/layout-imports":{"post":{"description":"Planner layouts are view preferences and never change the schedule. Visible layouts: the caller's personal (user) layouts, this project's layouts and the company's shared layouts. Requires Schedule access on the project. Documents are versioned (planner/layout-schema.ts): every response carries the server-validated, migrated document; unknown feature sections are preserved. All responses are private, no-store. Requires schedule:write. One-click migration of the version-1 browser (localStorage) layouts: each valid view becomes a personal layout with the same meaning. Names already used by the caller's personal layouts are skipped, so repeating the import is harmless. No query parameters.","operationId":"createProjectScheduleLayoutImport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLayoutImport"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLayoutImportResult"}}},"description":"Created and skipped layouts"},"400":{"description":"Invalid body, name or layout reference, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Token scope, Schedule access or scope permission denied (Project needs Schedule admin; Shared needs company administrator and Schedule admin; personal layouts are owner-only). The message gives the reason."},"404":{"description":"Project, or a layout not visible to the caller (another user's personal layout, another project's layout)"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate name in the scope, stale revision, or scope limit (200) reached"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Body failed schema validation"}},"summary":"Import browser layouts as personal layouts","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/layouts":{"get":{"description":"Planner layouts are view preferences and never change the schedule. Visible layouts: the caller's personal (user) layouts, this project's layouts and the company's shared layouts. Requires Schedule access on the project. Documents are versioned (planner/layout-schema.ts): every response carries the server-validated, migrated document; unknown feature sections are preserved. All responses are private, no-store. Requires schedule:read. Includes the read-only built-in (Global) layouts, the caller's and the project's default layout references, and per-scope save permissions with the reason when denied. No query parameters.","operationId":"listProjectScheduleLayouts","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLayoutList"}}},"description":"Layouts visible on this project"},"400":{"description":"Invalid body, name or layout reference, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Token scope, Schedule access or scope permission denied (Project needs Schedule admin; Shared needs company administrator and Schedule admin; personal layouts are owner-only). The message gives the reason."},"404":{"description":"Project, or a layout not visible to the caller (another user's personal layout, another project's layout)"},"408":{"description":"Request cancelled"}},"summary":"List Planner layouts, defaults and save permissions","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Planner layouts are view preferences and never change the schedule. Visible layouts: the caller's personal (user) layouts, this project's layouts and the company's shared layouts. Requires Schedule access on the project. Documents are versioned (planner/layout-schema.ts): every response carries the server-validated, migrated document; unknown feature sections are preserved. All responses are private, no-store. Requires schedule:write. Saving to project scope needs Schedule admin; shared scope needs company administrator and Schedule admin. Names are unique per scope container (case-insensitive). set_default also makes it the caller's default on this project. No query parameters.","operationId":"createProjectScheduleLayout","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLayoutCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLayoutEnvelope"}}},"description":"Created layout"},"400":{"description":"Invalid body, name or layout reference, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Token scope, Schedule access or scope permission denied (Project needs Schedule admin; Shared needs company administrator and Schedule admin; personal layouts are owner-only). The message gives the reason."},"404":{"description":"Project, or a layout not visible to the caller (another user's personal layout, another project's layout)"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate name in the scope, stale revision, or scope limit (200) reached"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Body failed schema validation"}},"summary":"Create a Planner layout","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/layouts/{layout_id}":{"delete":{"description":"Planner layouts are view preferences and never change the schedule. Visible layouts: the caller's personal (user) layouts, this project's layouts and the company's shared layouts. Requires Schedule access on the project. Documents are versioned (planner/layout-schema.ts): every response carries the server-validated, migrated document; unknown feature sections are preserved. All responses are private, no-store. Requires schedule:write and the same permission as saving to the layout's scope. Defaults that referenced it are removed and fall back (my default, then project default, then Classic Schedule). No query parameters.","operationId":"deleteProjectScheduleLayout","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"layout_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLayoutDeleted"}}},"description":"Deleted"},"400":{"description":"Invalid body, name or layout reference, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Token scope, Schedule access or scope permission denied (Project needs Schedule admin; Shared needs company administrator and Schedule admin; personal layouts are owner-only). The message gives the reason."},"404":{"description":"Project, or a layout not visible to the caller (another user's personal layout, another project's layout)"},"408":{"description":"Request cancelled"}},"summary":"Delete a Planner layout","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false},"patch":{"description":"Planner layouts are view preferences and never change the schedule. Visible layouts: the caller's personal (user) layouts, this project's layouts and the company's shared layouts. Requires Schedule access on the project. Documents are versioned (planner/layout-schema.ts): every response carries the server-validated, migrated document; unknown feature sections are preserved. All responses are private, no-store. Requires schedule:write. Optimistic concurrency: revision must equal the stored revision (409 otherwise); a successful update increments it. Scope and owner never change; copy with Save As (POST) instead. No query parameters.","operationId":"updateProjectScheduleLayout","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"layout_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLayoutUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLayoutEnvelope"}}},"description":"Updated layout"},"400":{"description":"Invalid body, name or layout reference, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Token scope, Schedule access or scope permission denied (Project needs Schedule admin; Shared needs company administrator and Schedule admin; personal layouts are owner-only). The message gives the reason."},"404":{"description":"Project, or a layout not visible to the caller (another user's personal layout, another project's layout)"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate name in the scope, stale revision, or scope limit (200) reached"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Body failed schema validation"}},"summary":"Rename or re-save a Planner layout","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/lessons-learned":{"get":{"description":"Groups completed activities by activity name, trade or an activity code value and compares actual working days (actual start to actual finish on the activity's calendar, exceptions honoured) with the planned duration. Reads only projects of the company where the caller is Schedule admin with the Schedule tool enabled, at most 200. scope completed_projects (default) uses only schedules whose every working activity has finished. Groups need min_samples (default 3). Requires schedule:read and Schedule access on this project. Private, no-store.","operationId":"listProjectScheduleLessonsLearned","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"group_by","required":false,"schema":{"default":"name","enum":["name","trade","code"],"type":"string"}},{"description":"Required when group_by=code","in":"query","name":"code_type","required":false,"schema":{"maxLength":256,"type":"string"}},{"in":"query","name":"scope","required":false,"schema":{"enum":["completed_projects","completed_activities"],"type":"string"}},{"in":"query","name":"min_samples","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLessonsLearned"}}},"description":"Lesson groups"},"400":{"description":"Invalid body or query parameters, or the template content cannot be used (the message says why)"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or Schedule access denied, or the caller may not manage this template (owner, or a company administrator for a company-shared template)"},"404":{"description":"Project, or a template not visible to the caller (another user's private template, another company's)"},"408":{"description":"Request cancelled"}},"summary":"Lessons learned: actual against planned durations across schedules","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/library/templates":{"get":{"description":"Templates are company-level and versioned: each save is an immutable version. Visible templates: company-shared ones and the caller's own private ones. Requires Schedule access on the project the request is made from. All responses are private, no-store. Requires schedule:read. Query: kind (plan | fragment), include_archived (true | false).","operationId":"listProjectScheduleLibraryTemplates","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"kind","required":false,"schema":{"enum":["plan","fragment"],"type":"string"}},{"in":"query","name":"include_archived","required":false,"schema":{"enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLibraryTemplateList"}}},"description":"Visible templates"},"400":{"description":"Invalid body or query parameters, or the template content cannot be used (the message says why)"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or Schedule access denied, or the caller may not manage this template (owner, or a company administrator for a company-shared template)"},"404":{"description":"Project, or a template not visible to the caller (another user's private template, another company's)"},"408":{"description":"Request cancelled"}},"summary":"List schedule library templates","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Templates are company-level and versioned: each save is an immutable version. Visible templates: company-shared ones and the caller's own private ones. Requires Schedule access on the project the request is made from. All responses are private, no-store. Requires schedule:write and Schedule admin on the project (the content is read from its current plan). A fragment is the chosen WBS subtrees and activities with the logic between them; progress, dates, constraints, resources and costs are not saved. No query parameters.","operationId":"createProjectScheduleLibraryTemplate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLibraryTemplateCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLibraryTemplateDetail"}}},"description":"Created template with version 1"},"400":{"description":"Invalid body or query parameters, or the template content cannot be used (the message says why)"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or Schedule access denied, or the caller may not manage this template (owner, or a company administrator for a company-shared template)"},"404":{"description":"Project, or a template not visible to the caller (another user's private template, another company's)"},"408":{"description":"Request cancelled"}},"summary":"Save this project's plan, or a fragment of it, as a library template","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/library/templates/{template_id}":{"get":{"description":"Templates are company-level and versioned: each save is an immutable version. Visible templates: company-shared ones and the caller's own private ones. Requires Schedule access on the project the request is made from. All responses are private, no-store. Requires schedule:read. Query: version (default the latest).","operationId":"getProjectScheduleLibraryTemplate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"template_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"version","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLibraryTemplateDetail"}}},"description":"Template, its versions and the chosen version's content"},"400":{"description":"Invalid body or query parameters, or the template content cannot be used (the message says why)"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or Schedule access denied, or the caller may not manage this template (owner, or a company administrator for a company-shared template)"},"404":{"description":"Project, or a template not visible to the caller (another user's private template, another company's)"},"408":{"description":"Request cancelled"}},"summary":"Get a library template with a version's content","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"patch":{"description":"Templates are company-level and versioned: each save is an immutable version. Visible templates: company-shared ones and the caller's own private ones. Requires Schedule access on the project the request is made from. All responses are private, no-store. Requires schedule:write. Only the owner, or a company administrator for a company-shared template, may change it; only the owner may make it private. No query parameters.","operationId":"updateProjectScheduleLibraryTemplate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"template_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLibraryTemplateUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLibraryTemplateDetail"}}},"description":"Updated template"},"400":{"description":"Invalid body or query parameters, or the template content cannot be used (the message says why)"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or Schedule access denied, or the caller may not manage this template (owner, or a company administrator for a company-shared template)"},"404":{"description":"Project, or a template not visible to the caller (another user's private template, another company's)"},"408":{"description":"Request cancelled"}},"summary":"Rename, share, unshare or archive a library template","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/library/templates/{template_id}/insert":{"post":{"description":"Templates are company-level and versioned: each save is an immutable version. Visible templates: company-shared ones and the caller's own private ones. Requires Schedule access on the project the request is made from. All responses are private, no-store. Requires schedule:write and Schedule admin on the project. Colliding activity ids, WBS ids and activity codes get the prefix; the fragment's open starts follow predecessor_id and its open ends drive successor_id (finish-to-start). Optional lessons scale durations by lessons learned. Saved and calculated like a planner save, with the expected-version check. No query parameters.","operationId":"insertProjectScheduleLibraryTemplate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"template_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLibraryInsert"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLibraryInsertResult"}}},"description":"New schedule version and what was added"},"400":{"description":"Invalid body or query parameters, or the template content cannot be used (the message says why)"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or Schedule access denied, or the caller may not manage this template (owner, or a company administrator for a company-shared template)"},"404":{"description":"Project, or a template not visible to the caller (another user's private template, another company's)"},"408":{"description":"Request cancelled"},"409":{"description":"The schedule changed since expected_version_id, or the template is archived"},"429":{"description":"Schedule calculation capacity is busy"},"503":{"description":"The scheduling engine is unavailable"}},"summary":"Insert a library template into this project's plan as a new version","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/library/templates/{template_id}/versions":{"post":{"description":"Templates are company-level and versioned: each save is an immutable version. Visible templates: company-shared ones and the caller's own private ones. Requires Schedule access on the project the request is made from. All responses are private, no-store. Requires schedule:write, Schedule admin on the project and the right to manage the template. The selection kind must match the template's kind. No query parameters.","operationId":"createProjectScheduleLibraryTemplateVersion","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"template_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLibraryVersionCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLibraryTemplateDetail"}}},"description":"Template with the new latest version"},"400":{"description":"Invalid body or query parameters, or the template content cannot be used (the message says why)"},"401":{"description":"Authentication required"},"403":{"description":"Token scope or Schedule access denied, or the caller may not manage this template (owner, or a company administrator for a company-shared template)"},"404":{"description":"Project, or a template not visible to the caller (another user's private template, another company's)"},"408":{"description":"Request cancelled"},"409":{"description":"The template is archived"}},"summary":"Save a new version of a library template from this project's plan","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/line-of-balance":{"get":{"description":"Requires schedule:read (GET) or schedule:write and live Schedule admin access on the project. The location breakdown (from an activity code type flagged as the Location code, the project's Locations, or the activity location text, as set in the definition's `location_breakdown`), the flowline of the saved head version's latest calculation (one line per trade across the locations, from calculated dates only), conflicts (two trades in one location at once), buffers between trades (`tight` when under `min_buffer_days`), crossings, and the adherence of every generated takt plan (planned vs actual zone completion). Read only.","operationId":"listProjectScheduleLineOfBalance","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Roll placements up to this hierarchy level (0 = top)","in":"query","name":"depth","required":false,"schema":{"maximum":20,"minimum":0,"type":"integer"}},{"in":"query","name":"min_buffer_days","required":false,"schema":{"maximum":365,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLineOfBalance"}}},"description":"Line of Balance"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"}},"summary":"Line of Balance (flowline) report","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/links":{"get":{"description":"Authorization is two-sided and live: Schedule access (non-admins only see activities bound to a field task they can see) and the source tool's own visibility for the linked record. All responses are private, no-store. Requires schedule:read token scope. Returns links whose source the caller can see, with the linked activity's calculated dates, float, critical flag and the workflow assessment (required-by for gating items, blocker state for blocking items).","operationId":"listProjectScheduleLinks","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"source_type","schema":{"enum":["submittal","purchase_order","material_delivery","rfi","inspection","punch_item","change_event","manpower_log","notes_log","quantity_log","document","drawing"],"type":"string"}},{"description":"Requires source_type.","in":"query","name":"source_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"activity_id","schema":{"maxLength":200,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleActivityLinkList"}}},"description":"Links"},"400":{"description":"Invalid body or query, or a field that does not apply to the source type's workflow"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, the source tool's permission, or token scope denied"},"404":{"description":"Link, source record or activity not found or not visible to the caller"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version or preview, or a retained change-event impact link"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Query failed schema validation"}},"summary":"List schedule activity links","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Authorization is two-sided and live: Schedule access (non-admins only see activities bound to a field task they can see) and the source tool's own visibility for the linked record. All responses are private, no-store. Requires schedule:write token scope and edit permission on the source tool (daily-log evidence: Daily Log view plus Schedule edit). The source type fixes the workflow: submittal / purchase_order / material_delivery gate the activity (lead_time_days, forecast_date); rfi / inspection / punch_item block it (forecast_date); manpower_log / notes_log / quantity_log are progress evidence (progress_event, progress_percent); document / drawing are WPs & Docs references that carry no workflow fields (Documents or Drawings view plus Schedule edit). Change-event links are created through change-impacts. No query parameters.","operationId":"createProjectScheduleLink","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleActivityLinkCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleActivityLinkEnvelope"}}},"description":"Created link"},"400":{"description":"Invalid body or query, or a field that does not apply to the source type's workflow"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, the source tool's permission, or token scope denied"},"404":{"description":"Link, source record or activity not found or not visible to the caller"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version or preview, or a retained change-event impact link"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Body failed schema validation"}},"summary":"Link a record from another tool to a schedule activity","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/links/alerts":{"post":{"description":"Authorization is two-sided and live: Schedule access (non-admins only see activities bound to a field task they can see) and the source tool's own visibility for the linked record. All responses are private, no-store. Requires schedule:write token scope and Schedule admin. Compares every link with the current calculation and sends in-app/email notifications on transitions only: a linked activity becoming critical, or a gating item's required-by date being breached or forecast to be missed. Idempotent. Notifications are delivered for submittal, RFI and punch-item links (inbox source types); other links are evaluated and recorded. No body or query parameters.","operationId":"createProjectScheduleLinksAlert","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleLinkAlerts"}}},"description":"Evaluation counts"},"400":{"description":"Invalid body or query, or a field that does not apply to the source type's workflow"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, the source tool's permission, or token scope denied"},"404":{"description":"Link, source record or activity not found or not visible to the caller"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version or preview, or a retained change-event impact link"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"}},"summary":"Evaluate schedule link alerts and notify","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/links/{link_id}":{"delete":{"description":"Authorization is two-sided and live: Schedule access (non-admins only see activities bound to a field task they can see) and the source tool's own visibility for the linked record. All responses are private, no-store. Requires schedule:write token scope. Change-event impact links pin a what-if scenario and are retained as forensic evidence (409). No query parameters.","operationId":"deleteProjectScheduleLink","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"link_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleActivityLinkDeleted"}}},"description":"Removed"},"400":{"description":"Invalid body or query, or a field that does not apply to the source type's workflow"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, the source tool's permission, or token scope denied"},"404":{"description":"Link, source record or activity not found or not visible to the caller"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version or preview, or a retained change-event impact link"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"}},"summary":"Remove a schedule link","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false},"patch":{"description":"Authorization is two-sided and live: Schedule access (non-admins only see activities bound to a field task they can see) and the source tool's own visibility for the linked record. All responses are private, no-store. Requires schedule:write token scope. Identity (source and activity) is immutable; re-point by deleting and creating. Change-event impact links accept only a note. No query parameters.","operationId":"updateProjectScheduleLink","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"link_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleActivityLinkUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleActivityLinkEnvelope"}}},"description":"Updated link"},"400":{"description":"Invalid body or query, or a field that does not apply to the source type's workflow"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, the source tool's permission, or token scope denied"},"404":{"description":"Link, source record or activity not found or not visible to the caller"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version or preview, or a retained change-event impact link"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Body failed schema validation"}},"summary":"Update a schedule link's lead time, forecast, progress evidence or note","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/lookahead":{"get":{"description":"Authorization is two-sided and live: Schedule access (non-admins only see activities bound to a field task they can see) and the source tool's own visibility for the linked record. All responses are private, no-store. Requires schedule:read token scope. Activities whose calculated window overlaps the next weeks (default 3) and are not complete, with their unresolved linked gating and blocking items. Activities with no open constraints are ready.","operationId":"listProjectScheduleLookahead","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Window start; default today (UTC).","in":"query","name":"from","schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"weeks","schema":{"default":3,"maximum":12,"minimum":1,"type":"integer"}},{"in":"query","name":"constrained_only","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleConstraintLookahead"}}},"description":"Lookahead"},"400":{"description":"Invalid body or query, or a field that does not apply to the source type's workflow"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, the source tool's permission, or token scope denied"},"404":{"description":"Link, source record or activity not found or not visible to the caller"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version or preview, or a retained change-event impact link"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Query failed schema validation"}},"summary":"Constraints lookahead (make-ready)","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/materialization/apply":{"post":{"description":"Requires Schedule, Submittals and CRM admin permissions and enabled tools. All responses use private, no-store. Only allowlisted response fields are exposed; raw source, linked-reference, calculation and receipt evidence is not returned. Scoped tokens require schedule:write, submittals:read and crm:read. Rechecks the exact decisions, saved version/calculation, preview digest, task state and publication authority, then atomically applies the supported operations and records publication evidence. Exact replay returns the existing receipt only while authoritative applied state remains current. Retired identities stay reserved; restore requires the exact original identity and current row digest. Existing task identity and unrelated fields are preserved according to the reviewed operation. Submittal due/procurement dates and CRM customer snapshots are not automatically rewritten. JSON is strict snake_case and limited to 2 MiB and 10,000 decisions. Native task publication supports flat task and start/finish milestone activities with date-only calculations and unstarted progress. Hierarchy/derived summaries, imported or mixed historical sources, progressed tasks and unresolved identities or linked-reference/resource constraints require reconciliation and can block application. This is separate from adopted-import task-date projection. ","operationId":"createProjectScheduleMaterializationApply","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationApplyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationApplication"}}},"description":"Publication result or matching current replay.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed request, invalid identifiers or unsupported query parameters.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule, Submittals and CRM admin permissions and enabled tools required; scoped tokens also require the operation scopes.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project or requested resource not found within authorized scope.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling verification was cancelled.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Saved version/calculation, reviewed state, row digest or publication authority changed; review again. Application also refuses unsupported origin or unresolved blockers.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request exceeds 2 MiB or 10,000 decisions, or inventory exceeds interactive limits.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Strict request schema validation failed.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine busy or request rate limited.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine unavailable or unable to verify the calculation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}}},"summary":"Apply a reviewed native field-task publication","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/materialization/inventory":{"get":{"description":"Requires Schedule, Submittals and CRM admin permissions and enabled tools. All responses use private, no-store. Only allowlisted response fields are exposed; raw source, linked-reference, calculation and receipt evidence is not returned. Scoped tokens require schedule:read, submittals:read and crm:read. Read-only candidate inventory; does not run the scheduling engine or write tasks. Select exact activity/task IDs and row digests, then submit those decisions to preview. Candidate actions do not guarantee that a selected pairing can be applied. Inventory is bounded to 50,000 aggregate state/label rows and 16 MiB; required decisions also remain within 10,000/2 MiB. No truncation or pagination. Native task publication supports flat task and start/finish milestone activities with date-only calculations and unstarted progress. Hierarchy/derived summaries, imported or mixed historical sources, progressed tasks and unresolved identities or linked-reference/resource constraints require reconciliation and can block application. This is separate from adopted-import task-date projection. ","operationId":"listProjectScheduleMaterializationInventory","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Positive decimal integer; unknown or repeated query keys are rejected.","in":"query","name":"expected_version_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Positive decimal integer; unknown or repeated query keys are rejected.","in":"query","name":"calculation_id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationInventory"}}},"description":"Authorized candidate inventory; a verified preview is still required.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed request, invalid identifiers or unsupported query parameters.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule, Submittals and CRM admin permissions and enabled tools required; scoped tokens also require the operation scopes.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project or requested resource not found within authorized scope.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling verification was cancelled.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Saved version/calculation, reviewed state, row digest or publication authority changed; review again. Application also refuses unsupported origin or unresolved blockers.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request exceeds 2 MiB or 10,000 decisions, or inventory exceeds interactive limits.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Strict request schema validation failed.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine busy or request rate limited.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine unavailable or unable to verify the calculation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}}},"summary":"List authorized native publication decision candidates","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/materialization/preview":{"post":{"description":"Requires Schedule, Submittals and CRM admin permissions and enabled tools. All responses use private, no-store. Only allowlisted response fields are exposed; raw source, linked-reference, calculation and receipt evidence is not returned. Scoped tokens require schedule:read, submittals:read and crm:read. Read-only POST: scoped tokens require schedule:read, not schedule:write. Runs engine verification, then rechecks state before returning a digest and allowlisted before/after rows. Does not create tasks, bindings or publication receipts. Successful responses may contain blockers. JSON is strict snake_case and limited to 2 MiB and 10,000 decisions. Native task publication supports flat task and start/finish milestone activities with date-only calculations and unstarted progress. Hierarchy/derived summaries, imported or mixed historical sources, progressed tasks and unresolved identities or linked-reference/resource constraints require reconciliation and can block application. This is separate from adopted-import task-date projection. ","operationId":"createProjectScheduleMaterializationPreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationPreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleMaterializationPreview"}}},"description":"Verified review, including any blockers; no task mutation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed request, invalid identifiers or unsupported query parameters.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule, Submittals and CRM admin permissions and enabled tools required; scoped tokens also require the operation scopes.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project or requested resource not found within authorized scope.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling verification was cancelled.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Saved version/calculation, reviewed state, row digest or publication authority changed; review again. Application also refuses unsupported origin or unresolved blockers.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request exceeds 2 MiB or 10,000 decisions, or inventory exceeds interactive limits.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Strict request schema validation failed.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine busy or request rate limited.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine unavailable or unable to verify the calculation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}}},"summary":"Preview explicit native field-task publication decisions","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/period-performance":{"get":{"description":"Requires schedule:read (GET) or schedule:write and live Schedule admin access on the project. Returns the effective (latest) run of every stored period in date order (the Cost & EVM period series) and, with `financial_period_id` or `run_id`, that run's activity and assignment rows (optionally filtered by `activity_id` and `subject`).","operationId":"listProjectSchedulePeriodPerformance","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"financial_period_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"run_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"activity_id","required":false,"schema":{"maxLength":512,"type":"string"}},{"in":"query","name":"subject","required":false,"schema":{"enum":["activity","assignment"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_SchedulePeriodPerformance"}}},"description":"Stored period performance"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, company admin (company-wide periods) or token scope denied"},"404":{"description":"Stored period or run not found"}},"summary":"Read stored period performance","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/ppc":{"get":{"description":"Requires schedule:read and live Schedule view access on the project. The PPC trend for every week of the window (weeks without a plan are listed with status `none`), the mean over measurable weeks only, PPC per trade, missed commitments by variance reason with the top three reasons, and issues about the measurement (unassessed weeks, unexplained misses). A week's PPC is null until every commitment is assessed.","operationId":"listProjectSchedulePpc","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"First week (snapped to its Monday)","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"Last week (snapped to its Monday); default the current week","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"Weeks to show when from is omitted","in":"query","name":"weeks","required":false,"schema":{"default":12,"maximum":104,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_SchedulePpcReport"}}},"description":"PPC report"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access or token scope denied"}},"summary":"Percent plan complete (PPC)","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/presence":{"delete":{"description":"Requires schedule:read and Schedule view. Forgets one of your sessions immediately.","operationId":"deleteProjectSchedulePresence","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"session_id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{8,64}$","type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"left":{"type":"boolean"}},"required":["left"],"type":"object"}}},"description":"Ended"},"400":{"description":"Invalid query or body"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, tool enablement or token scope denied"},"422":{"description":"Invalid session id"}},"summary":"End a planner session","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false},"get":{"description":"Requires schedule:read and live Schedule view access on the project. Everyone else with a live planner session on the project (seen within ttl_ms), one entry per person, with their selected activity and soft lock, plus the saved head.","operationId":"listProjectSchedulePresence","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_SchedulePresence"}}},"description":"Presence"},"400":{"description":"Invalid query or body"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, tool enablement or token scope denied"}},"summary":"Who has the planner open","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires schedule:read and Schedule view. Records this session's selected activity and whether it holds unsaved edits to it; poll about every 15 seconds. Advisory only: it never blocks a save. Returns the same body as GET.","operationId":"createProjectSchedulePresence","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"activity_id":{"maxLength":200,"nullable":true,"type":"string"},"editing":{"default":false,"type":"boolean"},"session_id":{"pattern":"^[A-Za-z0-9_-]{8,64}$","type":"string"},"version_id":{"minimum":1,"nullable":true,"type":"integer"}},"required":["session_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_SchedulePresence"}}},"description":"Presence"},"400":{"description":"Invalid query or body"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, tool enablement or token scope denied"},"422":{"description":"Invalid session or editing without an activity"}},"summary":"Planner presence heartbeat","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/progress/apply":{"post":{"description":"Requires Schedule, Submittals and CRM administrative access and the documented token scopes. Explicit progress policies select duration or physical percentage, integer rounding and literal local calendar dates. Summary progress is not inferred. Imported/mixed transitions and field-observation reconciliation are not supported. Responses are private, no-store.","operationId":"createProjectScheduleProgressApply","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgressApplyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgressApplication"}}},"description":"Publication result or matching current replay.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed request, invalid identifiers or unsupported query parameters.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule, Submittals and CRM admin permissions and enabled tools required; scoped tokens also require the operation scopes.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project or requested resource not found within authorized scope.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling verification was cancelled.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Saved version/calculation, reviewed state, row digest or publication authority changed; review again. Application also refuses unsupported origin or unresolved blockers.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request exceeds 2 MiB or 10,000 decisions, or inventory exceeds interactive limits.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Strict request schema validation failed.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine busy or request rate limited.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine unavailable or unable to verify the calculation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}}},"summary":"Apply explicitly reviewed native schedule progress","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/progress/inventory":{"get":{"description":"Administrative, paginated progress decision inventory. Returns both canonical measures with raw units, normalized fractions and local actual timestamps alongside current field values and exact row digests. Does not choose a percentage basis or rounding policy, run the engine, or grant publication authority. All pages share an inventory digest; do not combine different digests. A new preview is required before apply.","operationId":"listProjectScheduleProgressInventory","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"expected_version_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"calculation_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"node_page","required":false,"schema":{"default":1,"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"task_page","required":false,"schema":{"default":1,"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","required":false,"schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"assignee_page","required":false,"schema":{"default":1,"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgressInventory"}}},"description":"Verified review, including any blockers; no task mutation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed request, invalid identifiers or unsupported query parameters.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule, Submittals and CRM admin permissions and enabled tools required; scoped tokens also require the operation scopes.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project or requested resource not found within authorized scope.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling verification was cancelled.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Saved version/calculation, reviewed state, row digest or publication authority changed; review again. Application also refuses unsupported origin or unresolved blockers.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request exceeds 2 MiB or 10,000 decisions, or inventory exceeds interactive limits.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Strict request schema validation failed.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine busy or request rate limited.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine unavailable or unable to verify the calculation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}}},"summary":"Review canonical progress and current field values","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/progress/preview":{"post":{"description":"Requires Schedule, Submittals and CRM administrative access and the documented token scopes. Explicit progress policies select duration or physical percentage, integer rounding and literal local calendar dates. Summary progress is not inferred. Imported/mixed transitions and field-observation reconciliation are not supported. Responses are private, no-store.","operationId":"createProjectScheduleProgressPreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgressPreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProgressPreview"}}},"description":"Verified review, including any blockers; no task mutation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed request, invalid identifiers or unsupported query parameters.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule, Submittals and CRM admin permissions and enabled tools required; scoped tokens also require the operation scopes.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project or requested resource not found within authorized scope.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling verification was cancelled.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Saved version/calculation, reviewed state, row digest or publication authority changed; review again. Application also refuses unsupported origin or unresolved blockers.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request exceeds 2 MiB or 10,000 decisions, or inventory exceeds interactive limits.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Strict request schema validation failed.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine busy or request rate limited.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Scheduling engine unavailable or unable to verify the calculation.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}}},"summary":"Preview explicitly reviewed native schedule progress","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/projection":{"get":{"description":"Read-only full-network review. Requires Schedule, Submittals and CRM admin permissions and enabled tools; scoped tokens need schedule:read, submittals:read and crm:read. Validates the current canonical head, saved schedule calculation, adopted source and exact stable task bindings. Returns the digest, affected task dates and blockers without changing tasks, linked records or customer snapshots. Engine date-only values map to UTC dates without rounding timestamps. All responses use private, no-store.","operationId":"listProjectScheduleProjection","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"expected_version_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Saved schedule calculation for the current version; defaults to the latest eligible schedule calculation.","in":"query","name":"calculation_id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProjectionPreview"}}},"description":"Reviewed task date changes and blockers. No records were modified.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed request or invalid projection identifiers.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule/Submittals/CRM admin authority and enabled tools required. Scoped tokens need schedule:read, submittals:read and crm:read.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project not found in the authorized scope.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request cancelled before applying task changes.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Missing or stale canonical head, invalid or superseded schedule calculation, changed source/task snapshot/preview digest, unresolved projection blockers at apply, or a replay whose applied snapshot has changed. Review current task changes again.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request body or bounded projection inventory exceeds its limit.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request field validation failed.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Rate limit exceeded; respect Retry-After when supplied.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Required schedule calculation or service unavailable.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}}},"summary":"Preview calculated dates for existing linked schedule tasks","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/projection/apply":{"post":{"description":"Requires Schedule, Submittals and CRM admin permissions and enabled tools; scoped tokens need schedule:write, submittals:read and crm:read. Rechecks the reviewed digest, current version/calculation, source, task snapshot, mappings and authority under the project write lock. Applies only reviewed start/finish/critical changes and records a receipt atomically. Stable task IDs and unrelated fields remain unchanged. No-op receipts avoid task writes. An exact replay returns the existing receipt only while the applied snapshot remains current. Submittal linked-task displays reflect the new task dates; independent submittal due/procurement dates and CRM customer snapshots are not rewritten. JSON bodies are limited to 2 MiB. All responses use private, no-store.","operationId":"createProjectScheduleProjectionApply","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"calculation_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"expected_version_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"preview_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["expected_version_id","calculation_id","preview_digest"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleProjectionReceipt"}}},"description":"Task-date publication receipt, or the matching existing receipt for a valid replay.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Malformed request or invalid projection identifiers.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Authentication required.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Schedule/Submittals/CRM admin authority and enabled tools required. Scoped tokens need schedule:write, submittals:read and crm:read.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Project not found in the authorized scope.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"408":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request cancelled before applying task changes.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Missing or stale canonical head, invalid or superseded schedule calculation, changed source/task snapshot/preview digest, unresolved projection blockers at apply, or a replay whose applied snapshot has changed. Review current task changes again.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request body or bounded projection inventory exceeds its limit.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"415":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Content-Type must be application/json.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Request field validation failed.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Rate limit exceeded; respect Retry-After when supplied.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"required":["errors"],"type":"object"}}},"description":"Required schedule calculation or service unavailable.","headers":{"Cache-Control":{"schema":{"example":"private, no-store","type":"string"}}}}},"summary":"Apply reviewed Planner dates to existing linked schedule tasks","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/reports":{"get":{"description":"Static catalog of P6-style schedule reports with their export formats and whether they use a named baseline. Requires the schedule:read token scope. No query parameters. Private, no-store.","operationId":"listProjectScheduleReports","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleReportCatalog"}}},"description":"Report catalog"},"400":{"description":"Query parameters are not accepted"},"401":{"description":"Authentication required"},"403":{"description":"Token scope denied"}},"summary":"List the schedule report catalog","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/reports/{report_key}":{"get":{"description":"Requires live Schedule admin access (complete-network dates and float can disclose private activities) and the schedule:read token scope. Reads only retained evidence: the saved head version, its own retained schedule calculation (exact input, no data-date override), a named baseline's original calculation, and the latest retained health, resource histogram and cost dashboard. Never runs the engine and never writes. All responses are private, no-store. cost_evm additionally requires the budget:read token scope and live Budget view; commitments and posted job cost follow the commitments:read and accounting:read scopes and their owners' access, and are reported unavailable rather than inferred. Baseline reports (baseline_variance, milestones, period_progress) default to the latest named project baseline. Missing evidence returns available=false with a reason, never empty figures. CSV cells beginning with formula characters are neutralized. PDF pages carry the project, version and data date in the header and footer.","operationId":"getProjectScheduleReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"report_key","required":true,"schema":{"enum":["critical_path","total_float","lookahead","baseline_variance","milestones","period_progress","out_of_sequence","constraints","open_ends","resource_usage","cost_evm","dcma_health"],"type":"string"}},{"in":"query","name":"format","schema":{"default":"json","enum":["json","csv","xlsx","pdf"],"type":"string"}},{"description":"Look-ahead window (lookahead only).","in":"query","name":"weeks","schema":{"enum":[2,3,6],"type":"integer"}},{"description":"Look-ahead start (default the data date) or progress period start (default the previous version's data date).","in":"query","name":"from","schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"description":"Progress period end, exclusive (default the data date).","in":"query","name":"to","schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},{"in":"query","name":"baseline_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"paper","schema":{"default":"letter","enum":["letter","legal","tabloid","a4","a3"],"type":"string"}},{"in":"query","name":"orientation","schema":{"default":"landscape","enum":["landscape","portrait"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleReportResponse"}},"application/pdf":{"schema":{"format":"binary","type":"string"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"type":"string"}}},"description":"Report (JSON) or attachment"},"400":{"description":"Invalid or repeated query parameter, or no saved schedule"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Unknown report or baseline"},"408":{"description":"Request cancelled"},"409":{"description":"Stored schedule or baseline evidence failed its integrity check"},"503":{"description":"An owning cost source could not be read"}},"summary":"Build a schedule report (JSON, CSV, XLSX or PDF)","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/required-by":{"get":{"description":"Authorization is two-sided and live: Schedule access (non-admins only see activities bound to a field task they can see) and the source tool's own visibility for the linked record. All responses are private, no-store. Requires schedule:read token scope. Every submittal, purchase order and material delivery linked to an activity, ordered by required-by date (calculated early start minus lead time, calendar days), with forecast, slack and state (satisfied, activity_started, on_track, at_risk, breached, no_forecast, unscheduled). No query parameters.","operationId":"listProjectScheduleRequiredBy","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleRequiredByRegister"}}},"description":"Register"},"400":{"description":"Invalid body or query, or a field that does not apply to the source type's workflow"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access, the source tool's permission, or token scope denied"},"404":{"description":"Link, source record or activity not found or not visible to the caller"},"408":{"description":"Request cancelled"},"409":{"description":"Duplicate link, stale schedule version or preview, or a retained change-event impact link"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"}},"summary":"Required-by register for gating items","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/resource-inventory":{"get":{"description":"Requires schedule:read. Requires live Schedule admin and selected owning tool view/enabled access; company view is also required for people, crews and equipment. Scoped tokens additionally require workforce:read, equipment:read or materials:read for every returned source. Identity mapping is unapproved and does not certify unit conversion, availability, reservations, capacity, rates, payroll or ledger actuals. Private, no-store. Live owner pagination is not a multi-page snapshot. Inactive or unavailable sources remain visible with their current state.","operationId":"listProjectScheduleResourceInventory","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"source_type","required":true,"schema":{"enum":["person","crew","equipment","material"],"type":"string"}},{"in":"query","name":"search","required":false,"schema":{"maxLength":200,"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","required":false,"schema":{"default":25,"maximum":50,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"has_more":{"type":"boolean"},"items":{"items":{"additionalProperties":false,"properties":{"assignable":{"nullable":true,"type":"boolean"},"dispatch":{"nullable":true,"type":"string"},"name":{"type":"string"},"quantity_on_hand":{"nullable":true,"pattern":"^-?\\d+\\.\\d{3}$","type":"string"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["person","crew","equipment","material"],"type":"string"},"status":{"nullable":true,"type":"string"},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["source_type","source_id","name","unit","status","assignable","dispatch","quantity_on_hand","updated_at"],"type":"object"},"maxItems":50,"type":"array"},"next_page":{"maximum":10000,"minimum":1,"nullable":true,"type":"integer"},"page":{"maximum":10000,"minimum":1,"type":"integer"},"page_limit_reached":{"type":"boolean"},"page_size":{"maximum":50,"minimum":1,"type":"integer"},"source_basis":{"additionalProperties":false,"properties":{"capacity_verified":{"enum":[false],"type":"boolean"},"conversion_verified":{"enum":[false],"type":"boolean"},"isolation":{"enum":["owner_service_reads"],"type":"string"},"qualification":{"type":"string"},"read_finished_at":{"format":"date-time","type":"string"},"read_started_at":{"format":"date-time","type":"string"}},"required":["read_started_at","read_finished_at","isolation","capacity_verified","conversion_verified","qualification"],"type":"object"},"source_type":{"enum":["person","crew","equipment","material"],"type":"string"},"total":{"minimum":0,"type":"integer"}},"required":["source_type","items","total","page","page_size","has_more","page_limit_reached","next_page","source_basis"],"type":"object"}}},"description":"Resource mapping result"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"404":{"description":"Scoped version or assessment not found"},"408":{"description":"Assessment cancelled"},"409":{"description":"Saved definition integrity failure"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid selection"},"429":{"description":"Engine capacity busy; retry later"},"503":{"description":"Engine unavailable"}},"summary":"Find suite resource mapping candidates","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/resource-leveling/apply":{"post":{"description":"Requires live Schedule admin access and schedule:write token scope. The proposal must have been calculated for the current head and expected_version_id must equal it (checked again at publish). Each selected move becomes a Start-On-Or-After constraint at the proposed start; started activities and activities with another primary constraint are skipped, never overridden. Saves through the standard versioned definition path (engine recalculation, history) and records an audit event listing every constraint. Field tasks change only when published. No query parameters. All responses are private, no-store.","operationId":"createProjectScheduleResourceLevelingApply","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleResourceLevelingApply"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleResourceLevelingApplication"}}},"description":"New schedule version"},"400":{"description":"Invalid query or body, missing saved schedule, or a mapping that references an unknown activity, budget line or commitment"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, owning-tool permission (Budget view; Commitments for commitment mappings) or token scope denied"},"404":{"description":"Baseline or report not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, sources changed during assembly, or failed integrity check"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Body failed schema validation"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"An owning source (Budget, Commitments, Accounting) could not be read"}},"summary":"Apply a retained leveling proposal as a new schedule version","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/resource-mapping-reports":{"get":{"description":"Requires schedule:read. Requires live Schedule admin and selected owning tool view/enabled access; company view is also required for people, crews and equipment. Scoped tokens additionally require workforce:read, equipment:read or materials:read for every returned source. Identity mapping is unapproved and does not certify unit conversion, availability, reservations, capacity, rates, payroll or ledger actuals. Private, no-store. Every displayed report is checked against its selected owners. A denied report denies the page; history never silently omits unauthorized reports.","operationId":"listProjectScheduleResourceMappingReports","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"version_id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_before_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"reports":{"items":{"additionalProperties":false,"properties":{"analysis_revision":{"enum":["suite-resource-identity:1"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"version":{"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","analysis_revision","input_digest","created_by_id","created_at"],"type":"object"},"maxItems":100,"type":"array"}},"required":["reports","next_before_id"],"type":"object"}}},"description":"Resource mapping result"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"404":{"description":"Scoped version or assessment not found"},"408":{"description":"Assessment cancelled"},"409":{"description":"Saved definition integrity failure"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid selection"},"429":{"description":"Engine capacity busy; retry later"},"503":{"description":"Engine unavailable"}},"summary":"List retained resource mapping metadata","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires schedule:write. Requires live Schedule admin and selected owning tool view/enabled access; company view is also required for people, crews and equipment. Scoped tokens additionally require workforce:read, equipment:read or materials:read for every returned source. Identity mapping is unapproved and does not certify unit conversion, availability, reservations, capacity, rates, payroll or ledger actuals. Private, no-store. Both reviewed digests are required. Changed mapping or source facts return 409. No plan head, task, owner record or stock is changed.","operationId":"createProjectScheduleResourceMappingReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expected_mapping_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"expected_source_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"resource_id":{"maxLength":512,"minLength":1,"type":"string"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["person","crew","equipment","material"],"type":"string"}},"required":["resource_id","source_type","source_id"],"type":"object"},"maxItems":500,"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","mappings","expected_source_digest","expected_mapping_digest"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"analysis_revision":{"enum":["suite-resource-identity:1"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"parameters":{"additionalProperties":false,"properties":{"expected_mapping_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"expected_source_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"resource_id":{"maxLength":512,"minLength":1,"type":"string"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["person","crew","equipment","material"],"type":"string"}},"required":["resource_id","source_type","source_id"],"type":"object"},"maxItems":500,"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","mappings","expected_source_digest","expected_mapping_digest"],"type":"object"},"report":{"additionalProperties":false,"properties":{"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mapping_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mapping_status":{"enum":["retained_unapproved"],"type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"capacity_verified":{"enum":[false],"type":"boolean"},"conversion_verified":{"enum":[false],"type":"boolean"},"resource_id":{"maxLength":512,"minLength":1,"type":"string"},"schedule_name":{"type":"string"},"schedule_unit":{"nullable":true,"type":"string"},"source":{"additionalProperties":false,"properties":{"assignable":{"type":"boolean"},"dispatch":{"enum":["unassigned","this_project","another_project"],"type":"string"},"name":{"type":"string"},"owner":{"enum":["workforce","equipment","materials"],"type":"string"},"quantity_on_hand":{"pattern":"^-?\\d+\\.\\d{3}$","type":"string"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["person","crew","equipment","material"],"type":"string"},"status":{"type":"string"},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["owner","source_type","source_id","name","unit","updated_at"],"type":"object"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["person","crew","equipment","material"],"type":"string"},"unit_review":{"enum":["matching_label_only","conversion_required"],"type":"string"}},"required":["resource_id","source_type","source_id","schedule_name","schedule_unit","source","unit_review","capacity_verified","conversion_verified"],"type":"object"},"maxItems":500,"type":"array"},"shared_sources":{"items":{"additionalProperties":false,"properties":{"resource_ids":{"items":{"type":"string"},"type":"array"},"source_key":{"type":"string"}},"required":["source_key","resource_ids"],"type":"object"},"type":"array"},"source_basis":{"additionalProperties":false,"properties":{"capacity_verified":{"enum":[false],"type":"boolean"},"conversion_verified":{"enum":[false],"type":"boolean"},"isolation":{"enum":["owner_service_reads"],"type":"string"},"persisted":{"enum":[true],"type":"boolean"},"qualification":{"type":"string"},"read_finished_at":{"format":"date-time","type":"string"},"read_started_at":{"format":"date-time","type":"string"}},"required":["read_started_at","read_finished_at","isolation","capacity_verified","conversion_verified","qualification","persisted"],"type":"object"},"source_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"unmapped_resource_ids":{"items":{"type":"string"},"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","definition_digest","mapping_digest","source_digest","mappings","unmapped_resource_ids","shared_sources","source_basis","mapping_status"],"type":"object"},"version":{"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","analysis_revision","input_digest","created_by_id","created_at","parameters","report"],"type":"object"}}},"description":"Resource mapping result"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"404":{"description":"Scoped version or assessment not found"},"408":{"description":"Assessment cancelled"},"409":{"description":"Saved definition integrity failure"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid selection"},"429":{"description":"Engine capacity busy; retry later"},"503":{"description":"Engine unavailable"}},"summary":"Retain reviewed suite resource mappings","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/resource-mapping-reports/{id}":{"get":{"description":"Requires schedule:read. Requires live Schedule admin and selected owning tool view/enabled access; company view is also required for people, crews and equipment. Scoped tokens additionally require workforce:read, equipment:read or materials:read for every returned source. Identity mapping is unapproved and does not certify unit conversion, availability, reservations, capacity, rates, payroll or ledger actuals. Private, no-store. Returns immutable source facts from retention time without refreshing them; current owning permissions and scopes are still required.","operationId":"getProjectScheduleResourceMappingReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"analysis_revision":{"enum":["suite-resource-identity:1"],"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"parameters":{"additionalProperties":false,"properties":{"expected_mapping_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"expected_source_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"resource_id":{"maxLength":512,"minLength":1,"type":"string"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["person","crew","equipment","material"],"type":"string"}},"required":["resource_id","source_type","source_id"],"type":"object"},"maxItems":500,"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","mappings","expected_source_digest","expected_mapping_digest"],"type":"object"},"report":{"additionalProperties":false,"properties":{"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mapping_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mapping_status":{"enum":["retained_unapproved"],"type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"capacity_verified":{"enum":[false],"type":"boolean"},"conversion_verified":{"enum":[false],"type":"boolean"},"resource_id":{"maxLength":512,"minLength":1,"type":"string"},"schedule_name":{"type":"string"},"schedule_unit":{"nullable":true,"type":"string"},"source":{"additionalProperties":false,"properties":{"assignable":{"type":"boolean"},"dispatch":{"enum":["unassigned","this_project","another_project"],"type":"string"},"name":{"type":"string"},"owner":{"enum":["workforce","equipment","materials"],"type":"string"},"quantity_on_hand":{"pattern":"^-?\\d+\\.\\d{3}$","type":"string"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["person","crew","equipment","material"],"type":"string"},"status":{"type":"string"},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["owner","source_type","source_id","name","unit","updated_at"],"type":"object"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["person","crew","equipment","material"],"type":"string"},"unit_review":{"enum":["matching_label_only","conversion_required"],"type":"string"}},"required":["resource_id","source_type","source_id","schedule_name","schedule_unit","source","unit_review","capacity_verified","conversion_verified"],"type":"object"},"maxItems":500,"type":"array"},"shared_sources":{"items":{"additionalProperties":false,"properties":{"resource_ids":{"items":{"type":"string"},"type":"array"},"source_key":{"type":"string"}},"required":["source_key","resource_ids"],"type":"object"},"type":"array"},"source_basis":{"additionalProperties":false,"properties":{"capacity_verified":{"enum":[false],"type":"boolean"},"conversion_verified":{"enum":[false],"type":"boolean"},"isolation":{"enum":["owner_service_reads"],"type":"string"},"persisted":{"enum":[true],"type":"boolean"},"qualification":{"type":"string"},"read_finished_at":{"format":"date-time","type":"string"},"read_started_at":{"format":"date-time","type":"string"}},"required":["read_started_at","read_finished_at","isolation","capacity_verified","conversion_verified","qualification","persisted"],"type":"object"},"source_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"unmapped_resource_ids":{"items":{"type":"string"},"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","definition_digest","mapping_digest","source_digest","mappings","unmapped_resource_ids","shared_sources","source_basis","mapping_status"],"type":"object"},"version":{"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","analysis_revision","input_digest","created_by_id","created_at","parameters","report"],"type":"object"}}},"description":"Resource mapping result"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"404":{"description":"Scoped version or assessment not found"},"408":{"description":"Assessment cancelled"},"409":{"description":"Saved definition integrity failure"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid selection"},"429":{"description":"Engine capacity busy; retry later"},"503":{"description":"Engine unavailable"}},"summary":"Read retained suite resource mapping evidence","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/resource-mappings/preview":{"post":{"description":"Requires schedule:read. Requires live Schedule admin and selected owning tool view/enabled access; company view is also required for people, crews and equipment. Scoped tokens additionally require workforce:read, equipment:read or materials:read for every returned source. Identity mapping is unapproved and does not certify unit conversion, availability, reservations, capacity, rates, payroll or ledger actuals. Private, no-store. No records are persisted. Each schedule resource maps to at most one explicit source. Multiple resources sharing a source are flagged for reconciliation.","operationId":"createProjectScheduleResourceMappingsPreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"mappings":{"items":{"additionalProperties":false,"properties":{"resource_id":{"maxLength":512,"minLength":1,"type":"string"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["person","crew","equipment","material"],"type":"string"}},"required":["resource_id","source_type","source_id"],"type":"object"},"maxItems":500,"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","mappings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mapping_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"capacity_verified":{"enum":[false],"type":"boolean"},"conversion_verified":{"enum":[false],"type":"boolean"},"resource_id":{"maxLength":512,"minLength":1,"type":"string"},"schedule_name":{"type":"string"},"schedule_unit":{"nullable":true,"type":"string"},"source":{"additionalProperties":false,"properties":{"assignable":{"type":"boolean"},"dispatch":{"enum":["unassigned","this_project","another_project"],"type":"string"},"name":{"type":"string"},"owner":{"enum":["workforce","equipment","materials"],"type":"string"},"quantity_on_hand":{"pattern":"^-?\\d+\\.\\d{3}$","type":"string"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["person","crew","equipment","material"],"type":"string"},"status":{"type":"string"},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["owner","source_type","source_id","name","unit","updated_at"],"type":"object"},"source_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"source_type":{"enum":["person","crew","equipment","material"],"type":"string"},"unit_review":{"enum":["matching_label_only","conversion_required"],"type":"string"}},"required":["resource_id","source_type","source_id","schedule_name","schedule_unit","source","unit_review","capacity_verified","conversion_verified"],"type":"object"},"maxItems":500,"type":"array"},"shared_sources":{"items":{"additionalProperties":false,"properties":{"resource_ids":{"items":{"type":"string"},"type":"array"},"source_key":{"type":"string"}},"required":["source_key","resource_ids"],"type":"object"},"type":"array"},"source_basis":{"additionalProperties":false,"properties":{"capacity_verified":{"enum":[false],"type":"boolean"},"conversion_verified":{"enum":[false],"type":"boolean"},"isolation":{"enum":["owner_service_reads"],"type":"string"},"persisted":{"enum":[false],"type":"boolean"},"qualification":{"type":"string"},"read_finished_at":{"format":"date-time","type":"string"},"read_started_at":{"format":"date-time","type":"string"}},"required":["read_started_at","read_finished_at","isolation","capacity_verified","conversion_verified","qualification","persisted"],"type":"object"},"source_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"unmapped_resource_ids":{"items":{"type":"string"},"type":"array"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","definition_digest","mapping_digest","source_digest","mappings","unmapped_resource_ids","shared_sources","source_basis"],"type":"object"}}},"description":"Resource mapping result"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"404":{"description":"Scoped version or assessment not found"},"408":{"description":"Assessment cancelled"},"409":{"description":"Saved definition integrity failure"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid selection"},"429":{"description":"Engine capacity busy; retry later"},"503":{"description":"Engine unavailable"}},"summary":"Preview explicit suite resource mappings","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/resource-reports":{"get":{"description":"Requires schedule:read token scope and live Schedule admin permission. Resource histograms and leveling proposals use explicitly selected immutable versions. Retains original engine qualifications and provenance. Capacity is from schedule inputs, not verified suite workforce availability. Applied mode includes proposed spans only. No definition heads, resource records or field dates are changed. Private, no-store.","operationId":"listProjectScheduleResourceReports","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"version_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_before_id":{"type":["integer","null"]},"reports":{"items":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"operation":{"enum":["resource_histogram","resource_level"],"type":"string"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","input_digest","created_by_id","created_at","operation"],"type":"object"},"type":"array"}},"required":["reports","next_before_id"],"type":"object"}}},"description":"Bounded assessment metadata page"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"408":{"description":"Assessment cancelled"},"422":{"description":"Invalid selection"}},"summary":"List saved resource report history","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires schedule:write token scope and live Schedule admin permission. Resource histograms and leveling proposals use explicitly selected immutable versions. Retains original engine qualifications and provenance. Capacity is from schedule inputs, not verified suite workforce availability. Applied mode includes proposed spans only. No definition heads, resource records or field dates are changed. Private, no-store.","operationId":"createProjectScheduleResourceReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"`1` always queues a background schedule analysis job (202); `0` forces the inline path (30 s engine limit). Omitted: inputs above the size threshold are queued automatically.","in":"query","name":"async","required":false,"schema":{"enum":["0","1"],"type":"string"}},{"description":"`respond-async` is equivalent to `async=1`; the 202 response then carries `Preference-Applied: respond-async`.","in":"header","name":"Prefer","required":false,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"analysis":{"description":"Omit for a weekly histogram. Applied leveling mode includes proposed spans only; it never changes schedule dates.","oneOf":[{"additionalProperties":false,"properties":{"bucket":{"default":"week","enum":["day","week","month"],"type":"string"},"kind":{"enum":["histogram"],"type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"horizon":{"default":"within_float","enum":["within_float","extend_finish"],"type":"string"},"kind":{"enum":["leveling"],"type":"string"},"mode":{"default":"advisory","enum":["advisory","applied"],"type":"string"}},"required":["kind"],"type":"object"}]},"data_date":{"format":"date","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"operation":{"enum":["resource_histogram","resource_level"],"type":"string"},"parameters":{"additionalProperties":false,"properties":{"analysis":{"description":"Omit for a weekly histogram. Applied leveling mode includes proposed spans only; it never changes schedule dates.","oneOf":[{"additionalProperties":false,"properties":{"bucket":{"default":"week","enum":["day","week","month"],"type":"string"},"kind":{"enum":["histogram"],"type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"horizon":{"default":"within_float","enum":["within_float","extend_finish"],"type":"string"},"kind":{"enum":["leveling"],"type":"string"},"mode":{"default":"advisory","enum":["advisory","applied"],"type":"string"}},"required":["kind"],"type":"object"}]},"data_date":{"format":"date","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id"],"type":"object"},"report":{"additionalProperties":true,"description":"Original resource demand/capacity analysis or deterministic leveling proposal, including coverage, warnings, capacity provenance, unresolved conflicts and proposed spans where requested. Missing capacity is unchecked. Suite workforce mappings are not verified. No dates are applied.","type":"object"},"resource_basis":{"additionalProperties":false,"properties":{"dates_applied":{"enum":[false],"type":"boolean"},"proposal_only":{"type":"boolean"},"source":{"enum":["schedule_definition"],"type":"string"},"suite_resource_mapping_verified":{"enum":[false],"type":"boolean"}},"required":["source","suite_resource_mapping_verified","dates_applied","proposal_only"],"type":"object"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","input_digest","parameters","report","created_by_id","created_at","resource_basis","operation"],"type":"object"}}},"description":"Retained assessment and provenance"},"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"}},"required":["job"],"type":"object"}}},"description":"Queued as a durable background schedule analysis job (large input, `async=1` or `Prefer: respond-async`). Poll the job URL in `Location`; when it completes, `job.resource` names the retained record, identical to what the inline path returns.","headers":{"Location":{"description":"Job status URL","schema":{"type":"string"}}}},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"404":{"description":"Scoped version or assessment not found"},"408":{"description":"Assessment cancelled"},"409":{"description":"Saved definition integrity failure"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid selection"},"429":{"description":"Engine capacity busy; retry later"},"503":{"description":"Engine unavailable"}},"summary":"Create saved-version resource report","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/resource-reports/{id}":{"get":{"description":"Requires schedule:read token scope and live Schedule admin permission. Resource histograms and leveling proposals use explicitly selected immutable versions. Retains original engine qualifications and provenance. Capacity is from schedule inputs, not verified suite workforce availability. Applied mode includes proposed spans only. No definition heads, resource records or field dates are changed. Private, no-store.","operationId":"getProjectScheduleResourceReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"definition_digest":{"type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"input_digest":{"type":"string"},"operation":{"enum":["resource_histogram","resource_level"],"type":"string"},"parameters":{"additionalProperties":false,"properties":{"analysis":{"description":"Omit for a weekly histogram. Applied leveling mode includes proposed spans only; it never changes schedule dates.","oneOf":[{"additionalProperties":false,"properties":{"bucket":{"default":"week","enum":["day","week","month"],"type":"string"},"kind":{"enum":["histogram"],"type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"horizon":{"default":"within_float","enum":["within_float","extend_finish"],"type":"string"},"kind":{"enum":["leveling"],"type":"string"},"mode":{"default":"advisory","enum":["advisory","applied"],"type":"string"}},"required":["kind"],"type":"object"}]},"data_date":{"format":"date","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id"],"type":"object"},"report":{"additionalProperties":true,"description":"Original resource demand/capacity analysis or deterministic leveling proposal, including coverage, warnings, capacity provenance, unresolved conflicts and proposed spans where requested. Missing capacity is unchecked. Suite workforce mappings are not verified. No dates are applied.","type":"object"},"resource_basis":{"additionalProperties":false,"properties":{"dates_applied":{"enum":[false],"type":"boolean"},"proposal_only":{"type":"boolean"},"source":{"enum":["schedule_definition"],"type":"string"},"suite_resource_mapping_verified":{"enum":[false],"type":"boolean"}},"required":["source","suite_resource_mapping_verified","dates_applied","proposal_only"],"type":"object"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","input_digest","parameters","report","created_by_id","created_at","resource_basis","operation"],"type":"object"}}},"description":"Retained assessment and provenance"},"400":{"description":"Invalid schedule or governing parameters"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live Schedule admin permission"},"404":{"description":"Scoped version or assessment not found"},"408":{"description":"Assessment cancelled"},"409":{"description":"Saved definition integrity failure"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"JSON content type required"},"422":{"description":"Invalid selection"},"429":{"description":"Engine capacity busy; retry later"},"503":{"description":"Engine unavailable"}},"summary":"Read saved resource report","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/resource-view":{"get":{"description":"Requires live Schedule admin access and schedule:read token scope. Shapes the latest retained resource histogram for the saved head (or report_id) into per-resource period series of total and peak-day demand, capacity recorded in the plan, engine-reported over-allocated days and, when a retained workforce capacity review is visible to the caller, recorded person availability converted by the stated minutes per unit. Includes the latest (or leveling_report_id) leveling proposal with per-move applicability. Read-only; calculate reports with POST /schedule/resource-reports. All responses are private, no-store.","operationId":"listProjectScheduleResourceView","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"report_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"leveling_report_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleResourceView"}}},"description":"Resource view"},"400":{"description":"Invalid query or body, missing saved schedule, or a mapping that references an unknown activity, budget line or commitment"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, owning-tool permission (Budget view; Commitments for commitment mappings) or token scope denied"},"404":{"description":"Baseline or report not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, sources changed during assembly, or failed integrity check"},"503":{"description":"An owning source (Budget, Commitments, Accounting) could not be read"}},"summary":"Resource demand against capacity, over-allocation and the latest leveling proposal","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/scenarios":{"get":{"description":"Requires live Schedule admin access because scenario results disclose the full network dates and float. All responses are private, no-store. Requires schedule:read token scope. Newest first; edits and status only, without engine results.","operationId":"listProjectScheduleScenarios","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"status","schema":{"enum":["open","adopted","discarded"],"type":"string"}},{"in":"query","name":"page_size","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioList"}}},"description":"Scenario page"},"400":{"description":"Invalid body, query or scenario edits (the message names the first edit that does not fit the base version)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Scenario not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed scenario, missing reviewed comparison, or failed integrity check"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The scheduling engine rejected the scenario schedule"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"List what-if schedule scenarios","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires live Schedule admin access because scenario results disclose the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. expected_version_id must be the current schedule head; initial edits must apply cleanly to it. Idempotent by request_id (replays return 200). Never changes the saved schedule. No query parameters.","operationId":"createProjectScheduleScenario","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioEnvelope"}}},"description":"Replayed scenario"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioEnvelope"}}},"description":"Created scenario"},"400":{"description":"Invalid body, query or scenario edits (the message names the first edit that does not fit the base version)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Scenario not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed scenario, missing reviewed comparison, or failed integrity check"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The scheduling engine rejected the scenario schedule"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Create a what-if scenario from the current saved version","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/scenarios/{scenario_id}":{"get":{"description":"Requires live Schedule admin access because scenario results disclose the full network dates and float. All responses are private, no-store. Requires schedule:read token scope. No query parameters.","operationId":"getProjectScheduleScenario","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"scenario_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioDetail"}}},"description":"Scenario detail"},"400":{"description":"Invalid body, query or scenario edits (the message names the first edit that does not fit the base version)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Scenario not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed scenario, missing reviewed comparison, or failed integrity check"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The scheduling engine rejected the scenario schedule"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Read a scenario with its latest comparison and compression evidence","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"patch":{"description":"Requires live Schedule admin access because scenario results disclose the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. expected_revision must match; each change advances the revision by one. Edits replace the full list and must apply cleanly to the pinned base version. No query parameters.","operationId":"updateProjectScheduleScenario","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"scenario_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioEnvelope"}}},"description":"Revised scenario"},"400":{"description":"Invalid body, query or scenario edits (the message names the first edit that does not fit the base version)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Scenario not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed scenario, missing reviewed comparison, or failed integrity check"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The scheduling engine rejected the scenario schedule"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Revise an open scenario's name, description or edits","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/scenarios/{scenario_id}/adopt":{"post":{"description":"Requires live Schedule admin access because scenario results disclose the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Saves through the versioned definition path with the same expected-version (stale-write) check, history and calculation; the scenario closes as adopted in the same transaction. Requires the scenario base to still be the current version and a retained comparison for the expected revision. No query parameters.","operationId":"adoptProjectScheduleScenario","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"scenario_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioAdopt"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioAdoption"}}},"description":"New schedule version"},"400":{"description":"Invalid body, query or scenario edits (the message names the first edit that does not fit the base version)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Scenario not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed scenario, missing reviewed comparison, or failed integrity check"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The scheduling engine rejected the scenario schedule"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Adopt a reviewed scenario as a new schedule version","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/scenarios/{scenario_id}/calculate":{"post":{"description":"Requires live Schedule admin access because scenario results disclose the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Calculates the pinned base and the edited scenario with the original CPM engine and retains an immutable comparison: finish delta, longest-path and criticality changes, float changes, per-activity date deltas, and cost impact when cost-loaded data exists (recorded budgets or priced resources, same currency). Acceleration premium is only what the edits state. No query parameters.","operationId":"calculateProjectScheduleScenario","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"scenario_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"`1` always queues a background schedule analysis job (202); `0` forces the inline path (30 s engine limit). Omitted: inputs above the size threshold are queued automatically.","in":"query","name":"async","required":false,"schema":{"enum":["0","1"],"type":"string"}},{"description":"`respond-async` is equivalent to `async=1`; the 202 response then carries `Preference-Applied: respond-async`.","in":"header","name":"Prefer","required":false,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioRevision"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioRun"}}},"description":"Retained comparison"},"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"}},"required":["job"],"type":"object"}}},"description":"Queued as a durable background schedule analysis job (large input, `async=1` or `Prefer: respond-async`). Poll the job URL in `Location`; when it completes, `job.resource` names the retained record, identical to what the inline path returns.","headers":{"Location":{"description":"Job status URL","schema":{"type":"string"}}}},"400":{"description":"Invalid body, query or scenario edits (the message names the first edit that does not fit the base version)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Scenario not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed scenario, missing reviewed comparison, or failed integrity check"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The scheduling engine rejected the scenario schedule"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Calculate a scenario and compare it with its base version","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/scenarios/{scenario_id}/compression":{"post":{"description":"Requires live Schedule admin access because scenario results disclose the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Ports the original greedy CPM crashing (shorten the cheapest longest-path activity one day at a time, rescheduling after every cut) and trials replacing each driving FS link with an overlapping SS link. Every gain is measured by a real reschedule. Without crash_options, costs are illustrative unit costs. Each proposal carries a suggested scenario edit. Proposals only; no query parameters.","operationId":"compressionProjectScheduleScenario","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"scenario_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"`1` always queues a background schedule analysis job (202); `0` forces the inline path (30 s engine limit). Omitted: inputs above the size threshold are queued automatically.","in":"query","name":"async","required":false,"schema":{"enum":["0","1"],"type":"string"}},{"description":"`respond-async` is equivalent to `async=1`; the 202 response then carries `Preference-Applied: respond-async`.","in":"header","name":"Prefer","required":false,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioCompression"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioRun"}}},"description":"Retained compression proposals"},"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"}},"required":["job"],"type":"object"}}},"description":"Queued as a durable background schedule analysis job (large input, `async=1` or `Prefer: respond-async`). Poll the job URL in `Location`; when it completes, `job.resource` names the retained record, identical to what the inline path returns.","headers":{"Location":{"description":"Job status URL","schema":{"type":"string"}}}},"400":{"description":"Invalid body, query or scenario edits (the message names the first edit that does not fit the base version)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Scenario not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed scenario, missing reviewed comparison, or failed integrity check"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The scheduling engine rejected the scenario schedule"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Propose crashing and fast-tracking for a scenario","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/scenarios/{scenario_id}/discard":{"post":{"description":"Requires live Schedule admin access because scenario results disclose the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Terminal; retained evidence is kept. No query parameters.","operationId":"discardProjectScheduleScenario","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"scenario_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioRevision"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleScenarioEnvelope"}}},"description":"Discarded scenario"},"400":{"description":"Invalid body, query or scenario edits (the message names the first edit that does not fit the base version)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Scenario not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed scenario, missing reviewed comparison, or failed integrity check"},"413":{"description":"Request exceeds 2 MiB"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The scheduling engine rejected the scenario schedule"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Discard an open scenario","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/spreadsheet":{"get":{"description":"One row per activity: Activity ID (the match key for re-import), Activity Name, then the layout's visible columns, codes and UDFs included. Editable cells hold the planner's draft text; calculated cells the grid's display text from the latest schedule calculation. A Columns sheet records each header's key and whether it is editable. Columns come from `columns` (comma-separated keys), else `layout_ref`, else the Classic Schedule layout. Requires Schedule admin.","operationId":"listProjectScheduleSpreadsheet","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"layout_ref","required":false,"schema":{"pattern":"^(?:builtin:[a-z0-9_-]{1,40}|layout:[1-9]\\d{0,9})$","type":"string"}},{"description":"Comma-separated column keys, e.g. duration,start,code:Area,udf:Inspector","in":"query","name":"columns","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}}},"description":"XLSX workbook","headers":{"X-Schedule-Version-ID":{"schema":{"type":"integer"}}}},"400":{"description":"Invalid body, options or file, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Layout not found"},"409":{"description":"No current plan or integrity check failed"}},"summary":"Export the current version's activities to XLSX","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/spreadsheet/apply":{"post":{"description":"P6 Import from spreadsheet. Rows match the current version's activities by Activity ID. Editable columns (name, durations, % complete, calendar, constraint, activity type, codes, UDFs) are validated exactly like inline grid edits; edited calculated columns are rejected and listed. Unknown Activity IDs are rejected or inserted (unknown_ids). Saves one new version with an audit event; the preview must still match preview_digest. Requires Schedule admin and schedule:write. No query parameters.","operationId":"createProjectScheduleSpreadsheetApply","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleSpreadsheetApply"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleSpreadsheetResult"}}},"description":"Saved version"},"400":{"description":"Invalid body, options or file, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"408":{"description":"Request cancelled"},"409":{"description":"No current plan, the plan changed or the preview changed"},"413":{"description":"Request larger than 2 MiB"},"415":{"description":"Content-Type must be application/json"},"429":{"description":"Scheduling engine busy; retry after Retry-After"},"503":{"description":"Scheduling engine unavailable"}},"summary":"Apply a reviewed activity spreadsheet","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/spreadsheet/preview":{"post":{"description":"P6 Import from spreadsheet. Rows match the current version's activities by Activity ID. Editable columns (name, durations, % complete, calendar, constraint, activity type, codes, UDFs) are validated exactly like inline grid edits; edited calculated columns are rejected and listed. Unknown Activity IDs are rejected or inserted (unknown_ids). Read-only. Requires Schedule admin and schedule:write. No query parameters.","operationId":"createProjectScheduleSpreadsheetPreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleSpreadsheetRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleSpreadsheetPreview"}}},"description":"Spreadsheet preview"},"400":{"description":"Invalid body, options or file, or query parameters supplied"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"408":{"description":"Request cancelled"},"409":{"description":"No current plan, the plan changed or the preview changed"},"413":{"description":"Request larger than 2 MiB"},"415":{"description":"Content-Type must be application/json"},"429":{"description":"Scheduling engine busy; retry after Retry-After"},"503":{"description":"Scheduling engine unavailable"}},"summary":"Review an edited activity spreadsheet","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/submittals":{"get":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:read token scope. Newest first, with generated document metadata.","operationId":"listProjectScheduleSubmittals","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"period_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleSubmittalList"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"}},"summary":"List schedule submittal packages","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Packages a submitted or accepted update round, or a baseline: P6 XER and/or P6 XML export, narrative, health/check report and compare report, pinned to one immutable version. Idempotent by request_id.","operationId":"createProjectScheduleSubmittal","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleSubmittalCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleSubmittalEnvelope"}}},"description":"Replayed package"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleSubmittalEnvelope"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The scheduling engine rejected a schedule"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Build a schedule submittal package","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/submittals/{submittal_id}":{"get":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:read token scope. No query parameters.","operationId":"getProjectScheduleSubmittal","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"submittal_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleSubmittalEnvelope"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"}},"summary":"Read a schedule submittal package","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/submittals/{submittal_id}/distribute":{"post":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Sends one Emails-tool communication (users and/or external addresses) back-linked to the package, with document links; recorded once.","operationId":"distributeProjectScheduleSubmittal","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"submittal_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleSubmittalDistribute"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleSubmittalEnvelope"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Email recipients must belong to the project's company"}},"summary":"Distribute a schedule submittal","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/submittals/{submittal_id}/files/{kind}":{"get":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:read token scope. The immutable generated file; X-Submittal-Document-SHA256 carries its digest.","operationId":"getProjectScheduleSubmittalFile","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"submittal_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"kind","required":true,"schema":{"enum":["xer","p6xml","narrative","health","compare"],"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}},"application/xml":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}},"text/markdown":{"schema":{"type":"string"}}},"description":"Document"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"}},"summary":"Download a submittal document","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/submittals/{submittal_id}/response":{"post":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Records the external response once, after distribution.","operationId":"responseProjectScheduleSubmittal","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"submittal_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleSubmittalResponse"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleSubmittalEnvelope"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"}},"summary":"Record the response to a schedule submittal","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/takt/preview":{"post":{"description":"Requires schedule:read (GET) or schedule:write and live Schedule admin access on the project. Runs the scheduling engine's takt module: every trade (wagon) occupies exactly one zone for exactly one takt; crews are derived from crew-days of work content up to each trade's ceiling; the plan is returned as slot dates on the given calendar plus an ordinary network (each trade's zone chain and the handover between trades, finish-to-start, every slot pinned start-on-or-after its takt). Overloaded trades, empty wagons and low utilisation are reported in `issues`. A proposal only: nothing is stored; the planner applies a reviewed preview to its draft.","operationId":"createProjectScheduleTaktPreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleTaktPreviewInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleTaktPreview"}}},"description":"Takt plan proposal"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"408":{"description":"Request cancelled"},"422":{"description":"The engine rejected the takt inputs"},"429":{"description":"Calculation capacity busy"},"503":{"description":"Engine unavailable"}},"summary":"Preview a takt plan","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/time-impact-analyses":{"get":{"description":"Prospective time impact analysis (AACE RP 52R-06). Requires live Schedule admin; a linked change event also needs change event edit access. Private, no-store. Newest first.","operationId":"listProjectScheduleTimeImpactAnalyses","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"change_event_id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"status","required":false,"schema":{"enum":["submitted","reviewed","accepted","rejected"],"type":"string"}},{"in":"query","name":"before_id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleTimeImpactAnalysisList"}}},"description":"Page"},"400":{"description":"Invalid input or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin required (rechecked live), token scope denied, or the review is by the submitter"},"404":{"description":"Not found in this project"},"409":{"description":"Changed concurrently, wrong workflow state, or integrity check failed"},"422":{"description":"RP 52R-06 precondition not met"}},"summary":"List time impact analyses","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Prospective time impact analysis (AACE RP 52R-06). Requires live Schedule admin; a linked change event also needs change event edit access. Private, no-store. The fragnet is fixed at submission against the update in effect: the last approved update period statused on or before delay_start (RP 52R-06 Step 2); 422 when none exists. Every impacted activity, extra-link end and the measured milestone must be in that update. Idempotent by request_id. No query parameters.","operationId":"createProjectScheduleTimeImpactAnalyse","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleTimeImpactAnalysisCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleTimeImpactAnalysis"}}},"description":"Replayed request"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleTimeImpactAnalysis"}}},"description":"Submitted"},"400":{"description":"Invalid input or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin required (rechecked live), token scope denied, or the review is by the submitter"},"404":{"description":"Not found in this project"},"409":{"description":"Changed concurrently, wrong workflow state, or integrity check failed"},"422":{"description":"RP 52R-06 precondition not met"}},"summary":"Submit a fragnet for owner review","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/time-impact-analyses/{id}":{"get":{"description":"Prospective time impact analysis (AACE RP 52R-06). Requires live Schedule admin; a linked change event also needs change event edit access. Private, no-store. Includes the review history and, once analysed, the report's time impact summary.","operationId":"getProjectScheduleTimeImpactAnalyse","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleTimeImpactAnalysis"}}},"description":"Time impact analysis"},"400":{"description":"Invalid input or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin required (rechecked live), token scope denied, or the review is by the submitter"},"404":{"description":"Not found in this project"},"409":{"description":"Changed concurrently, wrong workflow state, or integrity check failed"},"422":{"description":"RP 52R-06 precondition not met"}},"summary":"Read a time impact analysis","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/time-impact-analyses/{id}/analyze":{"post":{"description":"Prospective time impact analysis (AACE RP 52R-06). Requires live Schedule admin; a linked change event also needs change event edit access. Private, no-store. Only an accepted fragnet without a report. Retains an immutable forensic report (method prospective_tia, evidence manifest) and links it to the analysis once; inputs are the update in effect then later approved updates. A refusal by the standard (Step 2 selection, Step 3(a) zero-duration gate, Step 3(b)) is 422 and retains nothing. Same async negotiation as forensics.","operationId":"analyzeProjectScheduleTimeImpactAnalyse","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"`1` always queues a background schedule analysis job (202); `0` forces the inline path (30 s engine limit). Omitted: inputs above the size threshold are queued automatically.","in":"query","name":"async","required":false,"schema":{"enum":["0","1"],"type":"string"}},{"description":"`respond-async` is equivalent to `async=1`; the 202 response then carries `Preference-Applied: respond-async`.","in":"header","name":"Prefer","required":false,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleForensicReport"}}},"description":"Retained forensic report"},"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"job":{"$ref":"#/components/schemas/schedule_ScheduleAnalysisJob"}},"required":["job"],"type":"object"}}},"description":"Queued as a durable background schedule analysis job (large input, `async=1` or `Prefer: respond-async`). Poll the job URL in `Location`; when it completes, `job.resource` names the retained record, identical to what the inline path returns.","headers":{"Location":{"description":"Job status URL","schema":{"type":"string"}}}},"400":{"description":"Invalid selection, roles or method options"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access or token scope denied"},"404":{"description":"Version, baseline or report not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stored evidence integrity check failed"},"413":{"description":"Selected versions exceed the 3 MiB forensic input bound"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"Invalid input, or the method refused inputs that fail its preconditions"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Run RP 52R-06 Steps 2-8 on the accepted fragnet","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/time-impact-analyses/{id}/decision":{"post":{"description":"Prospective time impact analysis (AACE RP 52R-06). Requires live Schedule admin; a linked change event also needs change event edit access. Private, no-store. By someone other than the submitter; a rejection states why. Final once recorded; a rejected fragnet is resubmitted as a new analysis.","operationId":"decisionProjectScheduleTimeImpactAnalyse","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleTimeImpactAnalysisDecision"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleTimeImpactAnalysis"}}},"description":"Decided"},"400":{"description":"Invalid input or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin required (rechecked live), token scope denied, or the review is by the submitter"},"404":{"description":"Not found in this project"},"409":{"description":"Changed concurrently, wrong workflow state, or integrity check failed"},"422":{"description":"RP 52R-06 precondition not met"}},"summary":"Accept or reject the fragnet (reviewed -> accepted | rejected)","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/time-impact-analyses/{id}/review":{"post":{"description":"Prospective time impact analysis (AACE RP 52R-06). Requires live Schedule admin; a linked change event also needs change event edit access. Private, no-store. By someone other than the submitter; expected_revision guards concurrent edits. Final once recorded.","operationId":"reviewProjectScheduleTimeImpactAnalyse","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleTimeImpactAnalysisReview"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleTimeImpactAnalysis"}}},"description":"Reviewed"},"400":{"description":"Invalid input or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin required (rechecked live), token scope denied, or the review is by the submitter"},"404":{"description":"Not found in this project"},"409":{"description":"Changed concurrently, wrong workflow state, or integrity check failed"},"422":{"description":"RP 52R-06 precondition not met"}},"summary":"Record the owner's review (submitted -> reviewed)","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/updates":{"get":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:read token scope. Newest first: data date, forecast finish, longest path, health grade, approval state and ball in court. forensic_series lists accepted updates of record in data-date order for windows analysis.","operationId":"listProjectScheduleUpdates","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"status","schema":{"enum":["open","submitted","revision_requested","approved","withdrawn"],"type":"string"}},{"in":"query","name":"page_size","schema":{"default":50,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateList"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"}},"summary":"List schedule update periods (period history)","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Drafts from the current saved head (expected_version_id): when the data date changes, a new version is saved through the versioned definition path. One update in progress per project; the data date must follow the previous update. Idempotent by request_id (replays return 200).","operationId":"createProjectScheduleUpdate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateOpen"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateEnvelope"}}},"description":"Replayed update"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateEnvelope"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The scheduling engine rejected a schedule"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Open a schedule update for a new data date","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/updates/{update_id}":{"get":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:read token scope. Update, latest check evidence, narrative draft generated from the checks, submission rounds with reviewer steps, comments and ball in court.","operationId":"getProjectScheduleUpdate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"update_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateDetail"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"}},"summary":"Read a schedule update","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"patch":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Only while open or revision requested; advances the revision.","operationId":"updateProjectScheduleUpdate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"update_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdatePatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateEnvelope"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"}},"summary":"Edit a schedule update narrative or name","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/updates/{update_id}/checks":{"post":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Calculates the current head, the previous accepted update and the baseline with the original engine and retains immutable evidence: DCMA health, out-of-sequence progress, actuals after the data date, progress not reported, changes since the last accepted update, baseline slip, critical path change and float erosion.","operationId":"createProjectScheduleUpdateCheck","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"update_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateRevision"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateCheckEnvelope"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"},"422":{"description":"The scheduling engine rejected a schedule"},"429":{"description":"Calculation capacity busy; retry after the indicated delay"},"503":{"description":"Calculation runtime unavailable"}},"summary":"Run the update checks","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/updates/{update_id}/comments":{"post":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Optionally on one activity of the submitted version. Append-only.","operationId":"createProjectScheduleUpdateComment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"update_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateCommentCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateCommentEnvelope"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"}},"summary":"Comment on a submitted schedule update","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/updates/{update_id}/comments/{comment_id}/resolve":{"post":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Recorded once. No request body.","operationId":"resolveProjectScheduleUpdateComment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"update_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"comment_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateCommentEnvelope"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"}},"summary":"Resolve a review comment","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/updates/{update_id}/respond":{"post":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. A reviewer holding the ball approves, approves as noted, or requests a revision (comment required). The final approval records the submitted version as the immutable accepted update of record.","operationId":"respondProjectScheduleUpdate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"update_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateRespond"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateEnvelope"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"}},"summary":"Review a submitted schedule update","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/updates/{update_id}/review":{"get":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:read token scope. Flags logic, duration, constraint, calendar, progress and retroactive actual changes against the previous accepted update (or the baseline for the first update), with the round's check evidence and comments.","operationId":"listProjectScheduleUpdateReview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"update_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"submission_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateReview"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"}},"summary":"Compare a submission against the previous accepted update","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/updates/{update_id}/submit":{"post":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Freezes the checked head version, check evidence and complete narrative into a review round. Reviewer steps (explicit or from a ScheduleUpdate workflow template) are advanced by the shared workflow engine; reviewers need Schedule admin and cannot be the submitter. Failed checks require acknowledge_failures.","operationId":"submitProjectScheduleUpdate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"update_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateSubmit"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateEnvelope"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"}},"summary":"Submit a schedule update for review","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/updates/{update_id}/withdraw":{"post":{"description":"Requires live Schedule admin access because the update cycle discloses the full network dates and float. All responses are private, no-store. Requires schedule:write token scope. Closes an update in progress; pending reviewer steps are voided. Saved versions are retained.","operationId":"withdrawProjectScheduleUpdate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"update_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateWithdraw"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleUpdateEnvelope"}}},"description":"Success"},"400":{"description":"Invalid body, query or state precondition (the message names the problem)"},"401":{"description":"Authentication required"},"403":{"description":"Schedule admin access, token scope, or reviewer assignment denied"},"404":{"description":"Update, submittal, version or baseline not found"},"408":{"description":"Request cancelled"},"409":{"description":"Stale revision or schedule version, closed update, missing or stale checks, or failed integrity check"},"413":{"description":"Request or response exceeds its size bound"},"415":{"description":"Content-Type must be application/json"}},"summary":"Withdraw a schedule update","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/versions/diff":{"post":{"description":"Read-only authored-input comparison. Requires live Schedule admin permission and schedule:read token scope despite POST. Both immutable versions must belong to the current project and pass content integrity checks. Includes all activity fields, relationship multiset changes and changed project sections. Missing fields differ from explicit null. Does not calculate CPM, advance the head or publish field changes. All responses are private, no-store. Response limit is 16 MiB.","operationId":"createProjectScheduleVersionsDiff","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"version_a":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_b":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_a","version_b"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"activities":{"additionalProperties":false,"properties":{"added":{"items":{"additionalProperties":false,"properties":{"definition":{"additionalProperties":true,"type":"object"},"id":{"type":"string"},"name":{}},"required":["id","name","definition"],"type":"object"},"type":"array"},"changed":{"items":{"additionalProperties":false,"properties":{"changes":{"additionalProperties":{"additionalProperties":false,"properties":{"new":{},"new_present":{"type":"boolean"},"old":{},"old_present":{"type":"boolean"}},"required":["old","new"],"type":"object"},"type":"object"},"id":{"type":"string"},"name":{}},"required":["id","name","changes"],"type":"object"},"type":"array"},"removed":{"items":{"additionalProperties":false,"properties":{"definition":{"additionalProperties":true,"type":"object"},"id":{"type":"string"},"name":{}},"required":["id","name","definition"],"type":"object"},"type":"array"}},"required":["added","removed","changed"],"type":"object"},"relationships":{"additionalProperties":false,"properties":{"added":{"type":"integer"},"added_details":{"items":{},"type":"array"},"removed":{"type":"integer"},"removed_details":{"items":{},"type":"array"}},"required":["added","removed","added_details","removed_details"],"type":"object"},"sections":{"additionalProperties":{"additionalProperties":false,"properties":{"new":{},"new_present":{"type":"boolean"},"old":{},"old_present":{"type":"boolean"}},"required":["old","new"],"type":"object"},"type":"object"},"summary":{"additionalProperties":false,"properties":{"activities_in_a":{"type":"integer"},"activities_in_b":{"type":"integer"},"total_changed":{"type":"integer"},"total_changes":{"type":"integer"}},"required":["total_changed","total_changes","activities_in_a","activities_in_b"],"type":"object"},"version_a":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"digest":{"type":"string"},"id":{"type":"integer"},"version":{"type":"integer"}},"required":["id","version","digest","created_at"],"type":"object"},"version_b":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"digest":{"type":"string"},"id":{"type":"integer"},"version":{"type":"integer"}},"required":["id","version","digest","created_at"],"type":"object"}},"required":["version_a","version_b","activities","relationships","sections","summary"],"type":"object"}}},"description":"Exact authored-input comparison"},"400":{"description":"Invalid request"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permission or scope"},"404":{"description":"Version not found in this project"},"409":{"description":"Saved definition integrity or reconciliation failure"},"413":{"description":"Review limit exceeded"},"422":{"description":"Invalid version selection"}},"summary":"Compare two saved canonical schedule versions","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/versions/{version_id}/export":{"get":{"description":"Requires Schedule admin permission and an enabled Schedule tool. Recalculates the version with the scheduling engine and writes it in the requested format, including in-app edits. P6 fields the canonical model does not carry are restored from the version's retained source metadata (p6_retention). Field coverage and intentional differences: docs/SCHEDULE-P6-PARITY.md. Nothing is written. Download responses are private, no-store.","operationId":"listProjectScheduleVersionExport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Canonical schedule version id, or `current` for the head version.","in":"path","name":"version_id","required":true,"schema":{"oneOf":[{"minimum":1,"type":"integer"},{"enum":["current"],"type":"string"}]}},{"in":"query","name":"format","required":true,"schema":{"enum":["xer","p6xml","mspdi"],"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}},"application/xml":{"schema":{"format":"binary","type":"string"}}},"description":"Exported schedule download","headers":{"Cache-Control":{"schema":{"type":"string"}},"Content-Disposition":{"schema":{"type":"string"}},"X-Schedule-Export-Issues":{"description":"Count of exchange warnings the engine reported","schema":{"type":"string"}},"X-Schedule-Export-SHA256":{"schema":{"type":"string"}},"X-Schedule-Version-ID":{"schema":{"type":"string"}}}},"400":{"description":"Invalid format, version, or a definition the engine cannot export"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient permission or token scope"},"404":{"description":"Project or schedule version not found"},"408":{"description":"Export cancelled"},"429":{"description":"Scheduling engine busy; retry after the Retry-After interval"},"503":{"description":"Scheduling engine unavailable"}},"summary":"Export a canonical schedule version as Primavera P6 XER, P6 XML or MSPDI","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/weekly-plans":{"get":{"description":"Requires schedule:read and live Schedule view access on the project. Last Planner weekly work plans in a window of weeks, newest first, each with its commitments and week PPC.","operationId":"listProjectScheduleWeeklyPlans","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"First week (snapped to its Monday)","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"Last week (snapped to its Monday); default the current week","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"Weeks to show when from is omitted","in":"query","name":"weeks","required":false,"schema":{"default":12,"maximum":104,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleWeeklyPlanList"}}},"description":"Weekly work plans"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access or token scope denied"}},"summary":"List weekly work plans","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires schedule:write and live Schedule edit access on the project. Audited. Creates the draft plan for a Monday-starting week (one per week).","operationId":"createProjectScheduleWeeklyPlan","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"note":{"maxLength":2000,"type":"string"},"week_starting":{"description":"A Monday","format":"date","type":"string"}},"required":["week_starting"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleWeeklyPlanResult"}}},"description":"Created"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access or token scope denied"},"409":{"description":"A plan for the week already exists"}},"summary":"Start a weekly work plan","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/weekly-plans/{plan_id}":{"delete":{"description":"Requires schedule:write and live Schedule edit access on the project. Audited. A committed week is the record PPC is measured against and is retained (database trigger).","operationId":"deleteProjectScheduleWeeklyPlan","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"plan_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"deleted":{"type":"integer"}},"required":["deleted"],"type":"object"}}},"description":"Deleted"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access or token scope denied"},"404":{"description":"Weekly work plan not found"},"409":{"description":"The week is committed"}},"summary":"Delete a draft weekly work plan","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false},"get":{"description":"Requires schedule:read and live Schedule view access on the project. One plan with its commitments and week PPC.","operationId":"getProjectScheduleWeeklyPlan","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"plan_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleWeeklyPlanResult"}}},"description":"Weekly work plan"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access or token scope denied"},"404":{"description":"Weekly work plan not found"}},"summary":"Read a weekly work plan","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"patch":{"description":"Requires schedule:write and live Schedule edit access on the project. Audited. Only the note changes; the week is immutable.","operationId":"updateProjectScheduleWeeklyPlan","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"plan_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"note":{"maxLength":2000,"type":"string"}},"required":["note"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleWeeklyPlanResult"}}},"description":"Updated"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access or token scope denied"},"404":{"description":"Weekly work plan not found"}},"summary":"Edit a weekly work plan note","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/weekly-plans/{plan_id}/commit":{"post":{"description":"Requires schedule:write and live Schedule edit access on the project. Audited. Freezes the week's commitments (the PPC denominator): afterwards none can be added, removed or rewritten, only assessed. Refused while any commitment's activity has open constraints in the constraints lookahead for that week (not make-ready), unless `allow_constrained` is true, which is recorded on the plan and in the audit trail.","operationId":"commitProjectScheduleWeeklyPlan","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"plan_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"allow_constrained":{"default":false,"type":"boolean"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleWeeklyPlanResult"}}},"description":"Committed"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access or token scope denied"},"404":{"description":"Weekly work plan not found"},"409":{"description":"Already committed, no commitments, commitments not make-ready, or the week changed while committing"},"422":{"description":"Invalid body, or a commitment names an activity that is no longer in the schedule"}},"summary":"Commit a weekly work plan","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/weekly-plans/{plan_id}/commitments":{"post":{"description":"Requires schedule:write and live Schedule edit access on the project. Audited. Adds one commitment, or a batch (`commitments`, at most 200), to a draft week. Each names an activity, a description and the trade or crew making it. The activity must be in the project's current saved schedule and visible to you; a week that has ended may also name an activity of the schedule as it stood that week. An omitted trade is prefilled from the activity's trade field or trade activity code.","operationId":"createProjectScheduleWeeklyPlanCommitment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"plan_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/schedule_ScheduleCommitmentInput"},{"additionalProperties":false,"properties":{"commitments":{"items":{"$ref":"#/components/schemas/schedule_ScheduleCommitmentInput"},"maxItems":200,"minItems":1,"type":"array"}},"required":["commitments"],"type":"object"}]}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleWeeklyPlanResult"}}},"description":"Added; `created` lists the new ids"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access or token scope denied"},"404":{"description":"Weekly work plan not found"},"409":{"description":"The week is committed (denominator frozen)"},"422":{"description":"Invalid body, an activity that is not in the schedule, or no trade for an activity that has none"}},"summary":"Add commitments","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/weekly-plans/{plan_id}/commitments/{commitment_id}":{"delete":{"description":"Requires schedule:write and live Schedule edit access on the project. Audited. Only from a draft week.","operationId":"deleteProjectScheduleWeeklyPlanCommitment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"plan_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"commitment_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleWeeklyPlanResult"}}},"description":"Removed"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access or token scope denied"},"404":{"description":"Weekly work plan or commitment not found"},"409":{"description":"The week is committed (denominator frozen)"}},"summary":"Remove a commitment","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false},"patch":{"description":"Requires schedule:write and live Schedule edit access on the project. Audited. On a draft week, rewrites the promise (activity, description, trade, quantity, unit, notes). On a committed week, only assesses it: `completed: true` (met, no reason), `completed: false` with a `variance_reason` (missed; use `not_recorded` if nobody gave one), or `completed: null` (not yet assessed); notes may change. Partial completion is not partial credit. A new `activity_id` is checked against the schedule as when adding; a committed week's activities are never re-checked, even after they are removed from the schedule.","operationId":"updateProjectScheduleWeeklyPlanCommitment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"plan_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"commitment_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"minProperties":1,"properties":{"activity_id":{"maxLength":512,"minLength":1,"type":"string"},"completed":{"nullable":true,"type":"boolean"},"description":{"maxLength":500,"minLength":1,"type":"string"},"notes":{"maxLength":2000,"type":"string"},"planned_quantity":{"minimum":0,"nullable":true,"type":"number"},"trade":{"maxLength":120,"minLength":1,"type":"string"},"unit":{"maxLength":40,"type":"string"},"variance_reason":{"enum":["prerequisite_work","materials","labour","equipment","information","design_change","directive","weather","access","over_commitment","not_recorded"],"nullable":true,"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_ScheduleWeeklyPlanResult"}}},"description":"Updated"},"400":{"description":"Invalid body or query"},"401":{"description":"Authentication required"},"403":{"description":"Schedule access or token scope denied"},"404":{"description":"Weekly work plan or commitment not found"},"409":{"description":"A committed promise cannot be rewritten, or a draft week cannot be assessed"},"422":{"description":"Invalid body, or a new activity that is not in the schedule"}},"summary":"Edit or assess a commitment","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/workforce-capacity/preview":{"post":{"description":"Requires schedule:read, workforce:read, live Schedule admin, Workforce view and company admin access. Up to 100 explicit person mappings over 366 inclusive days. User-stated minutes-per-unit conversions combine shared-person demand without duplicating supply. Allocation overlaps require review; no reservations, leveling or field dates change. Missing capacity and usage remain unknown. Two matching owner snapshots bracket the engine calculation. No query parameters.","operationId":"createProjectScheduleWorkforceCapacityPreview","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"from_day":{"format":"date","type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"minutes_per_unit":{"maximum":1440,"minimum":0,"not":{"maximum":0},"type":"number"},"person_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"resource_id":{"maxLength":512,"minLength":1,"type":"string"}},"required":["resource_id","person_id","minutes_per_unit"],"type":"object"},"maxItems":100,"minItems":1,"type":"array"},"through_day":{"format":"date","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","from_day","through_day","mappings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_WorkforceCapacityPreview"}}},"description":"Qualified unpersisted workforce capacity review"},"400":{"description":"Invalid schedule or query"},"401":{"description":"Authentication required"},"403":{"description":"Insufficient scope or live permission"},"404":{"description":"Version or person not found"},"408":{"description":"Cancelled"},"409":{"description":"Source changed or integrity check failed"},"413":{"description":"Review exceeds bounded limits"},"422":{"description":"Invalid selection"},"429":{"description":"Engine busy"},"503":{"description":"Engine unavailable"}},"summary":"Preview workforce capacity against daily schedule demand","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/workforce-capacity/reports":{"get":{"description":"Requires live Schedule admin, Workforce view and company admin permissions, plus workforce:read. Evidence is retained unapproved; no reservations, leveling or dates change. Requires schedule:read. Newest first; metadata only.","operationId":"listProjectScheduleWorkforceCapacityReports","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"before_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"version_id","schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page_size","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"next_before_id":{"maximum":2147483647,"minimum":1,"nullable":true,"type":"integer"},"reports":{"items":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"review_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","review_digest","created_by_id","created_at"],"type":"object"},"type":"array"}},"required":["reports","next_before_id"],"type":"object"}}},"description":"Saved review history"},"401":{"description":"Authentication required"},"403":{"description":"Permission or owner scope denied"},"404":{"description":"Report or schedule not found"},"409":{"description":"Evidence changed or integrity check failed"},"422":{"description":"Invalid input"}},"summary":"List saved workforce capacity reviews","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"post":{"description":"Requires live Schedule admin, Workforce view and company admin permissions, plus workforce:read. Evidence is retained unapproved; no reservations, leveling or dates change. Requires schedule:write. Recalculates and checks expected_review_digest. Identical evidence saved by the same actor returns its existing record. Snapshot retention is not an atomic capacity approval. No query parameters.","operationId":"createProjectScheduleWorkforceCapacityReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expected_review_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"from_day":{"format":"date","type":"string"},"mappings":{"items":{"additionalProperties":false,"properties":{"minutes_per_unit":{"maximum":1440,"minimum":0,"not":{"maximum":0},"type":"number"},"person_id":{"maximum":2147483647,"minimum":1,"type":"integer"},"resource_id":{"maxLength":512,"minLength":1,"type":"string"}},"required":["resource_id","person_id","minutes_per_unit"],"type":"object"},"maxItems":100,"minItems":1,"type":"array"},"through_day":{"format":"date","type":"string"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["version_id","from_day","through_day","mappings","expected_review_digest"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"replayed":{"type":"boolean"},"report":{"$ref":"#/components/schemas/schedule_WorkforceCapacityPreview"},"review_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"status":{"enum":["retained_unapproved"],"type":"string"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","review_digest","created_by_id","created_at","status","report","replayed"],"type":"object"}}},"description":"Existing identical review"},"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"definition_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"engine_revision":{"type":"string"},"id":{"maximum":2147483647,"minimum":1,"type":"integer"},"replayed":{"type":"boolean"},"report":{"$ref":"#/components/schemas/schedule_WorkforceCapacityPreview"},"review_digest":{"pattern":"^[a-f0-9]{64}$","type":"string"},"status":{"enum":["retained_unapproved"],"type":"string"},"version":{"maximum":2147483647,"minimum":1,"type":"integer"},"version_id":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["id","version_id","version","definition_digest","engine_revision","review_digest","created_by_id","created_at","status","report","replayed"],"type":"object"}}},"description":"New saved review"},"401":{"description":"Authentication required"},"403":{"description":"Permission or owner scope denied"},"404":{"description":"Report or schedule not found"},"409":{"description":"Evidence changed or integrity check failed"},"422":{"description":"Invalid input"}},"summary":"Save reviewed workforce capacity evidence","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/schedule/workforce-capacity/reports/{id}":{"get":{"description":"Requires live Schedule admin, Workforce view and company admin permissions, plus workforce:read. Evidence is retained unapproved; no reservations, leveling or dates change. Requires schedule:read. Returns original evidence without refreshing availability. No query parameters.","operationId":"getProjectScheduleWorkforceCapacityReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schedule_WorkforceCapacityReport"}}},"description":"Original retained review"},"401":{"description":"Authentication required"},"403":{"description":"Permission or owner scope denied"},"404":{"description":"Report or schedule not found"},"409":{"description":"Evidence changed or integrity check failed"},"422":{"description":"Invalid input"}},"summary":"Read saved workforce capacity evidence","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/scheduled_reports":{"get":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"listProjectScheduledReports","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_at":{"type":"string"},"created_by_id":{"type":"integer"},"format":{"description":"Delivered file format. Built-in and saved reports: csv (default) or pdf. Registered module types list their own formats.","enum":["pdf","xlsx","csv"],"type":"string"},"frequency":{"type":"string"},"id":{"type":"integer"},"last_delivered_count":{"description":"Recipients emailed by the last run, after each was re-authorized at send time.","type":["integer","null"]},"last_error":{"type":["string","null"]},"last_row_count":{"type":["integer","null"]},"last_run_at":{"type":["string","null"]},"last_status":{"type":["string","null"]},"last_storage_key":{"type":["string","null"]},"params":{"additionalProperties":true,"description":"Validated parameters of a registered report type (for example weeks or baseline_id for schedule.lookahead). Empty for built-in and saved reports.","type":"object"},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"recipients":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login","name","locale"],"type":"object"},"type":"array"},"report_key":{"type":"string"},"report_name":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","report_key","report_name","frequency","created_by_id","created_at","updated_at"],"type":"object"},"type":"array"}}}}},"summary":"List scheduled (delivered) reports","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false},"post":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"createProjectScheduledReport","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"schedule":{"properties":{"format":{"description":"Delivered file format. Built-in and saved reports: csv (default) or pdf. Registered module types list their own formats.","enum":["pdf","xlsx","csv"],"type":"string"},"frequency":{"default":"weekly","enum":["daily","weekly","monthly"],"type":"string"},"params":{"additionalProperties":true,"description":"Validated parameters of a registered report type (for example weeks or baseline_id for schedule.lookahead). Empty for built-in and saved reports.","type":"object"},"recipients":{"description":"Project-member user ids emailed on each run. Each is re-authorized at send time; one who lost access receives nothing. Module types with no recipients deliver to the owner.","items":{"minimum":1,"type":"integer"},"maxItems":100,"type":"array"},"report_key":{"description":"A built-in report key, saved-<id>, or a registered module report type such as schedule.lookahead, schedule.cost_evm or schedule.gantt. Module types are authorized by their own live permission check (for schedule types: Schedule admin; cost also needs Budget view).","type":"string"}},"required":["report_key"],"type":"object"}},"required":["schedule"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reporting_ScheduledReport"}}}}},"summary":"Schedule a report for recurring delivery","tags":["reporting"],"x-os-idempotent":true,"x-os-module":"reporting","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/scheduled_reports/{id}":{"delete":{"description":"Stop a schedule (soft delete). Pending delivery jobs no-op once the schedule is gone.","operationId":"deleteProjectScheduledReport","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Stop a schedule","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/specification_section_revision_emails/{id}/send_email":{"post":{"description":"Email a specification section revision ({id} is the revision id) to project users. The email is recorded in the project Emails tool and linked to the revision. At least one recipient is required.","operationId":"sendEmailProjectSpecificationSectionRevisionEmail","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bcc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"body":{"type":"string"},"cc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"subject":{"type":"string"}},"required":["distribution_ids"],"type":"object"}}},"required":true},"responses":{"204":{"description":"Sent."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Send email","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/specification_sets":{"get":{"operationId":"listProjectSpecificationSets","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"company_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date","type":"string"},"date":{"format":"date","nullable":true,"type":"string"},"deleted_at":{"format":"date","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"},"project_id":{"type":"integer"},"updated_at":{"format":"date","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"type":"string"}},"type":"object"}}}}},"summary":"List Specification Sets","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true},"post":{"operationId":"createProjectSpecificationSet","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"date":{"type":"string"},"name":{"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"company_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date","type":"string"},"date":{"format":"date","nullable":true,"type":"string"},"deleted_at":{"format":"date","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"},"project_id":{"type":"integer"},"updated_at":{"format":"date","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"properties":{"field_name":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"type":"string"}},"type":"object"}}}}},"summary":"Create Specification Set","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/specification_sets/{id}":{"get":{"operationId":"getProjectSpecificationSet","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"company_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date","type":"string"},"date":{"format":"date","nullable":true,"type":"string"},"deleted_at":{"format":"date","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"},"project_id":{"type":"integer"},"updated_at":{"format":"date","type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"exception":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}}},"summary":"Show Specification Set","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/specification_sets/{id}/issue":{"post":{"description":"Requires specifications:write and project specifications edit permission. The existing handler checks tenant ownership and tool enablement. Chooses the highest-position revision (highest ID breaks ties) in this set for each live section, makes it current, and supersedes sibling revisions. Returns affected section count. An absent or invalid JSON body is treated as {} by this handler. Catalog presence does not grant authorization.","operationId":"issueProjectSpecificationSet","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/specifications_SetIssue"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/specifications_IssuedSet"}}},"description":"Success"},"400":{"description":"Missing/invalid project query, invalid division/set selection, or division still in use"},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or project permission; tool disabled or workspace restricted"},"404":{"description":"Record is unavailable in the authorized project"},"422":{"description":"Invalid request body"}},"summary":"Issue a specification set","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/sub_jobs":{"get":{"description":"Requires admin:read and current project Admin tool view permission. Project must belong to the authenticated company; company administrator status is not required when the project permission suffices. Flat array ordered by code then ID. No search filter. Catalog presence does not grant authorization.","operationId":"listProjectSubJobs","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion, not a company selector. Company derives from authentication.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Values above 1000 are clamped.","in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/admin_SubJob"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination Link","schema":{"type":"string"}},"Per-Page":{"description":"Pagination Per-Page","schema":{"type":"string"}},"Total":{"description":"Pagination Total","schema":{"type":"string"}}}},"400":{"description":"Invalid tree topology or reference ID"},"401":{"description":"Authentication required"},"403":{"description":"Current project Admin permission or token scope denied"},"404":{"description":"Project or resource not found within the authenticated company"},"422":{"description":"Request body validation failed"}},"summary":"List project sub-jobs","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":true},"post":{"description":"Requires admin:write and current project Admin tool create permission. Project must belong to the authenticated company; company administrator status is not required when the project permission suffices. Creates a project-scoped sub-job; code defaults empty and is returned as null. Catalog presence does not grant authorization.","operationId":"createProjectSubJob","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion, not a company selector. Company derives from authentication.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/admin_SubJobCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/admin_SubJob"}}},"description":"Success"},"400":{"description":"Invalid tree topology or reference ID"},"401":{"description":"Authentication required"},"403":{"description":"Current project Admin permission or token scope denied"},"404":{"description":"Project or resource not found within the authenticated company"},"422":{"description":"Request body validation failed"}},"summary":"Create project sub-job","tags":["admin"],"x-os-idempotent":true,"x-os-module":"admin","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/sub_jobs/{id}":{"delete":{"operationId":"deleteProjectSubJob","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional tenant assertion, not a company selector. Company derives from authentication.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete sub job","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false},"get":{"description":"Requires admin:read and current project Admin tool view permission. Project must belong to the authenticated company; company administrator status is not required when the project permission suffices. updated_at currently equals created_at in this serializer. Catalog presence does not grant authorization.","operationId":"getProjectSubJob","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion, not a company selector. Company derives from authentication.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/admin_SubJob"}}},"description":"Success"},"400":{"description":"Invalid tree topology or reference ID"},"401":{"description":"Authentication required"},"403":{"description":"Current project Admin permission or token scope denied"},"404":{"description":"Project or resource not found within the authenticated company"},"422":{"description":"Request body validation failed"}},"summary":"Read project sub-job","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false},"patch":{"description":"Requires admin:write and current project Admin tool edit permission. Project must belong to the authenticated company; company administrator status is not required when the project permission suffices. Omitted code remains unchanged; an explicit empty string clears it. Null name/code is invalid. updated_at remains the creation timestamp. Catalog presence does not grant authorization.","operationId":"updateProjectSubJob","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional tenant assertion, not a company selector. Company derives from authentication.","in":"header","name":"OS-Company-Id","required":false,"schema":{"maximum":2147483647,"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/admin_SubJobUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/admin_SubJob"}}},"description":"Success"},"400":{"description":"Invalid tree topology or reference ID"},"401":{"description":"Authentication required"},"403":{"description":"Current project Admin permission or token scope denied"},"404":{"description":"Project or resource not found within the authenticated company"},"422":{"description":"Request body validation failed"}},"summary":"Edit project sub-job","tags":["admin"],"x-os-idempotent":true,"x-os-module":"admin","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/submittal_logs/{id}/close_and_distribute":{"patch":{"operationId":"closeAndDistributeProjectSubmittalLog","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"actual_delivery_date":{"format":"date","nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"confirmed_delivery_date":{"format":"date","nullable":true,"type":"string"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"custom_textarea_1":{"nullable":true,"type":"string"},"custom_textfield_1":{"nullable":true,"type":"string"},"deleted_at":{"format":"date-time","type":"string"},"design_team_review_time":{"nullable":true,"type":"integer"},"distributed_submittals":{"items":{"properties":{"distributed_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"distributed_to":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"final_attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"message":{"type":"string"},"selected_approver_ids":{"items":{"type":"integer"},"type":"array"},"sent_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"internal_review_time":{"nullable":true,"type":"integer"},"lead_time":{"nullable":true,"type":"integer"},"required_on_site_date":{"format":"date","nullable":true,"type":"string"},"rich_text_description":{"type":"string"},"scheduled_task":{"nullable":true,"properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"}},"title":"Task","type":"object"},"source_submittal_log_id":{"type":"integer"}},"type":"object"},{"properties":{"approvers":{"items":{"allOf":[{"properties":{"approver_type":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"nullable":true,"type":"string"},"days_to_respond":{"type":["integer","null"]},"distributed":{"type":"boolean"},"due_date":{"format":"date","nullable":true,"type":"string"},"email_sent_at":{"format":"date-time","nullable":true,"type":"string"},"response":{"allOf":[{"properties":{"considered":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"response_required":{"type":"boolean"},"returned_date":{"format":"date","nullable":true,"type":"string"},"sent_date":{"format":"date","nullable":true,"type":"string"},"submittal_associated_attachment_ids":{"items":{"type":"integer"},"type":"array"},"user":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"workflow_group_number":{"type":"integer"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"type":"array"},"attachments_count":{"type":"integer"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"buffer_time":{"nullable":true,"type":"integer"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_revision":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"distributed_at":{"format":"date-time","nullable":true,"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"for_record_only":{"type":"boolean"},"formatted_number":{"type":"string"},"is_rejected":{"type":"boolean"},"issue_date":{"format":"date","nullable":true,"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"open_date":{"format":"date","nullable":true,"type":"string"},"operation_item_errors":{"items":{"properties":{"attribute":{"type":"string"},"message":{"type":"string"}},"type":"object"},"type":"array"},"prepare_time":{"nullable":true,"type":"integer"},"private":{"type":"boolean"},"received_date":{"format":"date","nullable":true,"type":"string"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"rejected_submittal_log_approver_id":{"nullable":true,"type":"integer"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"specification_section":{"properties":{"current_revision_id":{"type":"integer"},"id":{"type":"integer"},"label":{"type":"string"},"number":{"type":"string"}},"type":"object"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"}},"type":"object"},"sub_job":{"nullable":true,"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submit_by":{"format":"date","nullable":true,"type":"string"},"submittal_manager":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"submittal_package":{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"submittal_ids":{"items":{"type":"integer"},"type":"array"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"title":{"type":"string"}},"type":"object"}]},"submittal_workflow_template":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submittal_workflow_template_applied_at":{"format":"date-time","nullable":true,"type":"string"},"type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"revision":{"type":"string"},"title":{"type":"string"}},"type":"object"}]}}}}},"summary":"Close a submittal log and distribute it","tags":["submittals"],"x-os-idempotent":true,"x-os-module":"submittals","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/submittal_packages":{"get":{"operationId":"listProjectSubmittalPackages","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":true,"properties":{"attachments":{"items":{"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"number":{"type":"string"},"specification_section_id":{"nullable":true,"type":"integer"},"specification_section_ids":{"items":{"type":"integer"},"type":"array"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"value":{"type":"string"}},"required":["id","name","value"],"type":"object"},"submittal_ids":{"items":{"type":"integer"},"type":"array"},"title":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","number","title","description","submittal_ids","updated_at"],"type":"object"},"type":"array"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/submittal_packages","tags":["submittals"],"x-os-idempotent":false,"x-os-module":"submittals","x-os-paginated":false},"post":{"operationId":"createProjectSubmittalPackage","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"attachments":{"items":{"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"number":{"type":"string"},"specification_section_id":{"nullable":true,"type":"integer"},"specification_section_ids":{"items":{"type":"integer"},"type":"array"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"value":{"type":"string"}},"required":["id","name","value"],"type":"object"},"submittal_ids":{"items":{"type":"integer"},"type":"array"},"title":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","number","title","description","submittal_ids","updated_at"],"type":"object"}}}}},"summary":"POST /rest/v1.0/projects/{project_id}/submittal_packages","tags":["submittals"],"x-os-idempotent":true,"x-os-module":"submittals","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/submittal_packages/{id}":{"delete":{"operationId":"deleteProjectSubmittalPackage","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete submittal package","tags":["submittals"],"x-os-idempotent":false,"x-os-module":"submittals","x-os-paginated":false},"get":{"operationId":"getProjectSubmittalPackage","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"attachments":{"items":{"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"number":{"type":"string"},"specification_section_id":{"nullable":true,"type":"integer"},"specification_section_ids":{"items":{"type":"integer"},"type":"array"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"value":{"type":"string"}},"required":["id","name","value"],"type":"object"},"submittal_ids":{"items":{"type":"integer"},"type":"array"},"title":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","number","title","description","submittal_ids","updated_at"],"type":"object"}}}}},"summary":"GET /rest/v1.0/projects/{project_id}/submittal_packages/{id}","tags":["submittals"],"x-os-idempotent":false,"x-os-module":"submittals","x-os-paginated":false},"patch":{"operationId":"updateProjectSubmittalPackage","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"attachments":{"items":{"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"number":{"type":"string"},"specification_section_id":{"nullable":true,"type":"integer"},"specification_section_ids":{"items":{"type":"integer"},"type":"array"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"value":{"type":"string"}},"required":["id","name","value"],"type":"object"},"submittal_ids":{"items":{"type":"integer"},"type":"array"},"title":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","number","title","description","submittal_ids","updated_at"],"type":"object"}}}}},"summary":"PATCH /rest/v1.0/projects/{project_id}/submittal_packages/{id}","tags":["submittals"],"x-os-idempotent":true,"x-os-module":"submittals","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/submittal_packages/{id}/submittals":{"delete":{"operationId":"deleteProjectSubmittalPackageSubmittals","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"attachments":{"items":{"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"number":{"type":"string"},"specification_section_id":{"nullable":true,"type":"integer"},"specification_section_ids":{"items":{"type":"integer"},"type":"array"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"value":{"type":"string"}},"required":["id","name","value"],"type":"object"},"submittal_ids":{"items":{"type":"integer"},"type":"array"},"title":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","number","title","description","submittal_ids","updated_at"],"type":"object"}}}}},"summary":"DELETE /rest/v1.0/projects/{project_id}/submittal_packages/{id}/submittals","tags":["submittals"],"x-os-idempotent":true,"x-os-module":"submittals","x-os-paginated":false},"post":{"operationId":"createProjectSubmittalPackageSubmittal","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"attachments":{"items":{"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"distribution_members":{"items":{"type":"object"},"type":"array"},"id":{"type":"integer"},"number":{"type":"string"},"specification_section_id":{"nullable":true,"type":"integer"},"specification_section_ids":{"items":{"type":"integer"},"type":"array"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"value":{"type":"string"}},"required":["id","name","value"],"type":"object"},"submittal_ids":{"items":{"type":"integer"},"type":"array"},"title":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","number","title","description","submittal_ids","updated_at"],"type":"object"}}}}},"summary":"POST /rest/v1.0/projects/{project_id}/submittal_packages/{id}/submittals","tags":["submittals"],"x-os-idempotent":true,"x-os-module":"submittals","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/submittal_workflow_templates":{"get":{"operationId":"listProjectSubmittalWorkflowTemplates","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_default":{"type":"boolean"},"name":{"type":"string"},"steps":{"items":{"properties":{"approver_type":{"type":"string"},"days_to_respond":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"user":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"workflow_group_number":{"type":"integer"}},"type":"object"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}}}},"summary":"List submittal workflow templates","tags":["submittals"],"x-os-idempotent":false,"x-os-module":"submittals","x-os-paginated":false},"post":{"operationId":"createProjectSubmittalWorkflowTemplate","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_default":{"type":"boolean"},"name":{"type":"string"},"steps":{"items":{"properties":{"approver_type":{"type":"string"},"days_to_respond":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"user":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"workflow_group_number":{"type":"integer"}},"type":"object"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}}},"summary":"Create a submittal workflow template","tags":["submittals"],"x-os-idempotent":true,"x-os-module":"submittals","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/submittals/filter_options/ball_in_court_id":{"get":{"operationId":"listProjectSubmittalsFilterOptionsBallInCourtId","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Filter Options for Ball in Court","tags":["submittals"],"x-os-idempotent":false,"x-os-module":"submittals","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/submittals/filter_options/responsible_contractor_id":{"get":{"operationId":"listProjectSubmittalsFilterOptionsResponsibleContractorId","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Filter Options for Responsible Contractor","tags":["submittals"],"x-os-idempotent":false,"x-os-module":"submittals","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/submittals/filter_options/specification_section_id":{"get":{"operationId":"listProjectSubmittalsFilterOptionsSpecificationSectionId","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Filter Options for Specification Section","tags":["submittals"],"x-os-idempotent":false,"x-os-module":"submittals","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/submittals/filter_options/status_id":{"get":{"operationId":"listProjectSubmittalsFilterOptionsStatusId","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"key":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Filter Options for Submittal Status","tags":["submittals"],"x-os-idempotent":false,"x-os-module":"submittals","x-os-paginated":true}},"/rest/v1.0/projects/{project_id}/submittals/filter_options/{field}":{"get":{"description":"Requires the `view` permission on the project's submittals tool. A scoped API token needs `submittals:read`.","operationId":"getProjectSubmittalsFilterOption","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"field","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Get submittals filter options for one field","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/tax_codes":{"get":{"description":"Requires change_orders:read and permission to view the project's Change Orders tool. Returns the project's reference codes for taxing potential change-order line items, sorted by ID.","operationId":"listProjectTaxCodes","parameters":[{"description":"Project ID in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/change_orders_ChangeOrderTaxCode"},"type":"array"}}},"description":"Project tax codes."},"401":{"description":"Authentication required."},"403":{"description":"The project cannot be viewed with the caller's access or its Change Orders tool is disabled."},"404":{"description":"The project could not be found."}},"summary":"List project change-order tax codes","tags":["change_orders"],"x-os-idempotent":false,"x-os-module":"change_orders","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/timecard_entries":{"get":{"operationId":"listProjectTimecardEntries","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/timesheets_TimecardEntry"},"type":"array"}}}}},"summary":"List timecard entries","tags":["timesheets"],"x-os-idempotent":false,"x-os-module":"timesheets","x-os-paginated":false},"post":{"operationId":"createProjectTimecardEntry","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"timecard_entry":{"$ref":"#/components/schemas/timesheets_TimecardEntryWrite"}},"required":["timecard_entry"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_TimecardEntry"}}}}},"summary":"Create timecard entry","tags":["timesheets"],"x-os-idempotent":true,"x-os-module":"timesheets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/timecard_entries/bulk_create":{"post":{"description":"Create up to 100 timecard entries ({ timecard_entries: [...] }). All or nothing: every entry is created in one transaction, or none is (422 lists the failing fields). Above 100 entries: 422.","operationId":"createProjectTimecardEntriesBulkCreate","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/timesheets_TimecardEntry"},"type":"array"}}}}},"summary":"Bulk create timecard entries","tags":["timesheets"],"x-os-idempotent":true,"x-os-module":"timesheets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/timecard_entries/bulk_update":{"patch":{"description":"Update up to 100 timecard entries. Each item carries the record `id` and the fields to change, and runs through the same checks as PATCH …/timecard_entries/{id}. Items run in order; a failing item does not roll back the others. With Idempotency-Key, a retried batch replays the first response; retry only the failed items with a new key.","operationId":"updateProjectTimecardEntriesBulkUpdate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"timecard_entries":{"items":{"$ref":"#/components/schemas/timesheets_TimecardEntryWrite","properties":{"id":{"description":"The record to update.","type":"integer"}},"required":["id"]},"maxItems":100,"minItems":1,"type":"array"}},"required":["timecard_entries"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/timesheets_TimecardEntry"}],"description":"The record as the single-record route returns it (successful items only)."},"errors":{"description":"Failed items only: a message list or a field -> messages map (422).","oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]},"id":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]},"index":{"description":"Position of the item in the request array.","type":"integer"},"status":{"description":"HTTP-style status of this item: 200/201 on success, 4xx on failure.","type":"integer"}},"required":["index","status"],"type":"object"},"type":"array"},"summary":{"properties":{"failed":{"type":"integer"},"succeeded":{"type":"integer"},"total":{"type":"integer"}},"required":["total","succeeded","failed"],"type":"object"}},"required":["results","summary"],"type":"object"}}},"description":"Per-item results."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Malformed envelope."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"More than 100 items."}},"summary":"Bulk update timecard entries","tags":["timesheets"],"x-os-idempotent":true,"x-os-module":"timesheets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/timecard_entries/{id}":{"delete":{"description":"Requires timesheets:write and Timesheets delete permission in the specified project. Soft-deletes one live entry. A linked timesheet must be live and belong to the same project. An approved or completed entry, or an approved parent timesheet, blocks deletion.","operationId":"deleteProjectTimecardEntry","parameters":[{"description":"Project id in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Timecard entry id in the specified project.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"description":"Soft deletion succeeded. The response body is empty."},"401":{"$ref":"#/components/responses/timesheets_WorkflowUnauthorized"},"403":{"$ref":"#/components/responses/timesheets_WorkflowForbidden"},"404":{"$ref":"#/components/responses/timesheets_WorkflowNotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_WorkflowError"}}},"description":"The entry is approved or completed, or its linked timesheet is approved."},"429":{"$ref":"#/components/responses/timesheets_WorkflowRateLimited"},"500":{"$ref":"#/components/responses/timesheets_WorkflowInternalError"},"503":{"$ref":"#/components/responses/timesheets_WorkflowAuthUnavailable"}},"summary":"Delete a timecard entry","tags":["timesheets"],"x-os-idempotent":true,"x-os-module":"timesheets","x-os-paginated":false},"get":{"operationId":"getProjectTimecardEntry","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_TimecardEntry"}}}}},"summary":"Show timecard entry","tags":["timesheets"],"x-os-idempotent":false,"x-os-module":"timesheets","x-os-paginated":false},"patch":{"operationId":"updateProjectTimecardEntry","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"timecard_entry":{"$ref":"#/components/schemas/timesheets_TimecardEntryWrite"}},"required":["timecard_entry"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_TimecardEntry"}}}}},"summary":"Update timecard entry","tags":["timesheets"],"x-os-idempotent":true,"x-os-module":"timesheets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/timecard_entries/{id}/remove_signature":{"patch":{"operationId":"removeSignatureProjectTimecardEntry","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_TimecardEntry"}}}}},"summary":"Remove a timecard entry signature","tags":["timesheets"],"x-os-idempotent":true,"x-os-module":"timesheets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/timecard_entries/{id}/sign":{"patch":{"operationId":"signProjectTimecardEntry","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"signature_text":{"nullable":true,"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_TimecardEntry"}}}}},"summary":"Sign a timecard entry","tags":["timesheets"],"x-os-idempotent":true,"x-os-module":"timesheets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/timesheets":{"get":{"operationId":"listProjectTimesheets","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/timesheets_Timesheet"},"type":"array"}}}}},"summary":"List timesheets","tags":["timesheets"],"x-os-idempotent":false,"x-os-module":"timesheets","x-os-paginated":false},"post":{"operationId":"createProjectTimesheet","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"timesheet":{"properties":{"date":{"format":"date","type":"string"},"status":{"enum":["pending","approved"],"type":"string"}},"required":["date"],"type":"object"}},"required":["timesheet"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_Timesheet"}}}}},"summary":"Create timesheet","tags":["timesheets"],"x-os-idempotent":true,"x-os-module":"timesheets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/timesheets/update_approval":{"patch":{"operationId":"updateProjectTimesheetsUpdateApproval","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"timesheets":{"items":{"properties":{"id":{"type":"integer"},"status":{"enum":["pending","approved"],"type":"string"}},"type":"object"},"type":"array"}},"required":["timesheets"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/timesheets_Timesheet"},"type":"array"}}}}},"summary":"Update timesheet approval status","tags":["timesheets"],"x-os-idempotent":true,"x-os-module":"timesheets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/timesheets/{id}":{"delete":{"description":"Requires timesheets:write and Timesheets delete permission in the specified project. Soft-deletes a live timesheet and keeps its linked timecard entry rows. Reopen an approved timesheet before deleting it. Approved or completed live entries block deletion.","operationId":"deleteProjectTimesheet","parameters":[{"description":"Project id in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Timesheet id in the specified project.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"description":"Soft deletion succeeded. The response body is empty."},"401":{"$ref":"#/components/responses/timesheets_WorkflowUnauthorized"},"403":{"$ref":"#/components/responses/timesheets_WorkflowForbidden"},"404":{"$ref":"#/components/responses/timesheets_WorkflowNotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_WorkflowError"}}},"description":"The timesheet or a live linked entry is approved, or a live linked entry is completed."},"429":{"$ref":"#/components/responses/timesheets_WorkflowRateLimited"},"500":{"$ref":"#/components/responses/timesheets_WorkflowInternalError"},"503":{"$ref":"#/components/responses/timesheets_WorkflowAuthUnavailable"}},"summary":"Delete a timesheet","tags":["timesheets"],"x-os-idempotent":true,"x-os-module":"timesheets","x-os-paginated":false},"get":{"operationId":"getProjectTimesheet","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_Timesheet"}}}}},"summary":"Show timesheet","tags":["timesheets"],"x-os-idempotent":false,"x-os-module":"timesheets","x-os-paginated":false},"patch":{"operationId":"updateProjectTimesheet","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timesheets_Timesheet"}}}}},"summary":"Update timesheet","tags":["timesheets"],"x-os-idempotent":true,"x-os-module":"timesheets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/timesheets/{id}/approve":{"patch":{"operationId":"approveProjectTimesheet","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Approve timesheet","tags":["timesheets"],"x-os-idempotent":false,"x-os-module":"timesheets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/timesheets/{id}/reject":{"patch":{"operationId":"rejectProjectTimesheet","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Reject timesheet","tags":["timesheets"],"x-os-idempotent":false,"x-os-module":"timesheets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/timesheets/{id}/submit":{"patch":{"operationId":"submitProjectTimesheet","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Submit timesheet","tags":["timesheets"],"x-os-idempotent":false,"x-os-module":"timesheets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/tm_tickets":{"get":{"operationId":"listProjectTmTickets","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"amount":{"type":"string"},"attachments_count":{"type":"integer"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"grand_total":{"type":"string"},"id":{"type":"integer"},"line_items_count":{"type":"integer"},"number":{"type":"string"},"status":{"enum":["draft","submitted","approved","rejected"],"type":"string"},"title":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"work_date":{"type":"string"}},"required":["id","number","title","work_date","status","amount","grand_total"],"type":"object"},"type":"array"}}}}},"summary":"List Time & Materials Tickets","tags":["tm_tickets"],"x-os-idempotent":false,"x-os-module":"tm_tickets","x-os-paginated":true},"post":{"operationId":"createProjectTmTicket","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"commitment":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"},"status":{"type":"string"},"title":{"nullable":true,"type":"string"},"type_label":{"type":"string"},"url_segment":{"nullable":true,"type":"string"}},"type":"object"},"contract_id":{"nullable":true,"type":"integer"},"contract_type":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"grand_total":{"type":"string"},"id":{"type":"integer"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"cost_code":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","full_code","name"],"type":"object"},"created_at":{"type":"string"},"id":{"type":"integer"},"position":{"type":"integer"},"quantity":{"type":"string"},"total_amount":{"type":"string"},"type":{"enum":["labor","equipment","material"],"type":"string"},"type_label":{"type":"string"},"unit":{"type":"string"},"unit_cost":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","type","description","quantity","unit_cost","amount"],"type":"object"},"type":"array"},"line_items_count":{"type":"integer"},"number":{"type":"string"},"reviewed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"signed_at":{"type":"string"},"signed_by":{"type":"string"},"status":{"enum":["draft","submitted","approved","rejected"],"type":"string"},"subtotal":{"type":"string"},"title":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"work_date":{"type":"string"}},"required":["id","number","title","work_date","status","amount","grand_total","line_items"],"type":"object"}}}}},"summary":"Create a Time & Materials Ticket","tags":["tm_tickets"],"x-os-idempotent":true,"x-os-module":"tm_tickets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/tm_tickets/{id}":{"delete":{"operationId":"deleteProjectTmTicket","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"}},"required":["id"],"type":"object"}}}}},"summary":"Delete a Time & Materials Ticket","tags":["tm_tickets"],"x-os-idempotent":true,"x-os-module":"tm_tickets","x-os-paginated":false},"get":{"operationId":"getProjectTmTicket","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"commitment":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"},"status":{"type":"string"},"title":{"nullable":true,"type":"string"},"type_label":{"type":"string"},"url_segment":{"nullable":true,"type":"string"}},"type":"object"},"contract_id":{"nullable":true,"type":"integer"},"contract_type":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"grand_total":{"type":"string"},"id":{"type":"integer"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"cost_code":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","full_code","name"],"type":"object"},"created_at":{"type":"string"},"id":{"type":"integer"},"position":{"type":"integer"},"quantity":{"type":"string"},"total_amount":{"type":"string"},"type":{"enum":["labor","equipment","material"],"type":"string"},"type_label":{"type":"string"},"unit":{"type":"string"},"unit_cost":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","type","description","quantity","unit_cost","amount"],"type":"object"},"type":"array"},"line_items_count":{"type":"integer"},"number":{"type":"string"},"reviewed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"signed_at":{"type":"string"},"signed_by":{"type":"string"},"status":{"enum":["draft","submitted","approved","rejected"],"type":"string"},"subtotal":{"type":"string"},"title":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"work_date":{"type":"string"}},"required":["id","number","title","work_date","status","amount","grand_total","line_items"],"type":"object"}}}}},"summary":"Show a Time & Materials Ticket","tags":["tm_tickets"],"x-os-idempotent":false,"x-os-module":"tm_tickets","x-os-paginated":false},"patch":{"operationId":"updateProjectTmTicket","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"commitment":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"},"status":{"type":"string"},"title":{"nullable":true,"type":"string"},"type_label":{"type":"string"},"url_segment":{"nullable":true,"type":"string"}},"type":"object"},"contract_id":{"nullable":true,"type":"integer"},"contract_type":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"grand_total":{"type":"string"},"id":{"type":"integer"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"cost_code":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","full_code","name"],"type":"object"},"created_at":{"type":"string"},"id":{"type":"integer"},"position":{"type":"integer"},"quantity":{"type":"string"},"total_amount":{"type":"string"},"type":{"enum":["labor","equipment","material"],"type":"string"},"type_label":{"type":"string"},"unit":{"type":"string"},"unit_cost":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","type","description","quantity","unit_cost","amount"],"type":"object"},"type":"array"},"line_items_count":{"type":"integer"},"number":{"type":"string"},"reviewed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"signed_at":{"type":"string"},"signed_by":{"type":"string"},"status":{"enum":["draft","submitted","approved","rejected"],"type":"string"},"subtotal":{"type":"string"},"title":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"work_date":{"type":"string"}},"required":["id","number","title","work_date","status","amount","grand_total","line_items"],"type":"object"}}}}},"summary":"Update a Time & Materials Ticket","tags":["tm_tickets"],"x-os-idempotent":true,"x-os-module":"tm_tickets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/tm_tickets/{id}/approve":{"patch":{"operationId":"approveProjectTmTicketPatch","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"commitment":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"},"status":{"type":"string"},"title":{"nullable":true,"type":"string"},"type_label":{"type":"string"},"url_segment":{"nullable":true,"type":"string"}},"type":"object"},"contract_id":{"nullable":true,"type":"integer"},"contract_type":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"grand_total":{"type":"string"},"id":{"type":"integer"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"cost_code":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","full_code","name"],"type":"object"},"created_at":{"type":"string"},"id":{"type":"integer"},"position":{"type":"integer"},"quantity":{"type":"string"},"total_amount":{"type":"string"},"type":{"enum":["labor","equipment","material"],"type":"string"},"type_label":{"type":"string"},"unit":{"type":"string"},"unit_cost":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","type","description","quantity","unit_cost","amount"],"type":"object"},"type":"array"},"line_items_count":{"type":"integer"},"number":{"type":"string"},"reviewed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"signed_at":{"type":"string"},"signed_by":{"type":"string"},"status":{"enum":["draft","submitted","approved","rejected"],"type":"string"},"subtotal":{"type":"string"},"title":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"work_date":{"type":"string"}},"required":["id","number","title","work_date","status","amount","grand_total","line_items"],"type":"object"}}}}},"summary":"Approve a submitted ticket","tags":["tm_tickets"],"x-os-idempotent":true,"x-os-module":"tm_tickets","x-os-paginated":false},"post":{"operationId":"approveProjectTmTicket","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Approve T&M ticket","tags":["tm_tickets"],"x-os-idempotent":false,"x-os-module":"tm_tickets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/tm_tickets/{id}/attachments":{"get":{"operationId":"listProjectTmTicketAttachments","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"}}}}},"summary":"List a T&M ticket's attachments","tags":["tm_tickets"],"x-os-idempotent":false,"x-os-module":"tm_tickets","x-os-paginated":false},"post":{"operationId":"createProjectTmTicketAttachment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"],"type":"object"},"type":"array"}},"required":["attachments"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"}},"required":["attachments"],"type":"object"}}}}},"summary":"Append name+URL attachments to a T&M ticket","tags":["tm_tickets"],"x-os-idempotent":true,"x-os-module":"tm_tickets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/tm_tickets/{id}/attachments/{attachment_id}":{"delete":{"operationId":"deleteProjectTmTicketAttachment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"attachment_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"}},"required":["id"],"type":"object"}}}}},"summary":"Remove an attachment from a T&M ticket","tags":["tm_tickets"],"x-os-idempotent":true,"x-os-module":"tm_tickets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/tm_tickets/{id}/reject":{"patch":{"operationId":"rejectProjectTmTicketPatch","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"commitment":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"},"status":{"type":"string"},"title":{"nullable":true,"type":"string"},"type_label":{"type":"string"},"url_segment":{"nullable":true,"type":"string"}},"type":"object"},"contract_id":{"nullable":true,"type":"integer"},"contract_type":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"grand_total":{"type":"string"},"id":{"type":"integer"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"cost_code":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","full_code","name"],"type":"object"},"created_at":{"type":"string"},"id":{"type":"integer"},"position":{"type":"integer"},"quantity":{"type":"string"},"total_amount":{"type":"string"},"type":{"enum":["labor","equipment","material"],"type":"string"},"type_label":{"type":"string"},"unit":{"type":"string"},"unit_cost":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","type","description","quantity","unit_cost","amount"],"type":"object"},"type":"array"},"line_items_count":{"type":"integer"},"number":{"type":"string"},"reviewed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"signed_at":{"type":"string"},"signed_by":{"type":"string"},"status":{"enum":["draft","submitted","approved","rejected"],"type":"string"},"subtotal":{"type":"string"},"title":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"work_date":{"type":"string"}},"required":["id","number","title","work_date","status","amount","grand_total","line_items"],"type":"object"}}}}},"summary":"Reject a submitted ticket","tags":["tm_tickets"],"x-os-idempotent":true,"x-os-module":"tm_tickets","x-os-paginated":false},"post":{"operationId":"rejectProjectTmTicket","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Reject T&M ticket","tags":["tm_tickets"],"x-os-idempotent":false,"x-os-module":"tm_tickets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/tm_tickets/{id}/submit":{"patch":{"operationId":"submitProjectTmTicketPatch","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"commitment":{"nullable":true,"properties":{"id":{"type":"integer"},"number":{"type":"string"},"status":{"type":"string"},"title":{"nullable":true,"type":"string"},"type_label":{"type":"string"},"url_segment":{"nullable":true,"type":"string"}},"type":"object"},"contract_id":{"nullable":true,"type":"integer"},"contract_type":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"grand_total":{"type":"string"},"id":{"type":"integer"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"cost_code":{"nullable":true,"properties":{"full_code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","full_code","name"],"type":"object"},"created_at":{"type":"string"},"id":{"type":"integer"},"position":{"type":"integer"},"quantity":{"type":"string"},"total_amount":{"type":"string"},"type":{"enum":["labor","equipment","material"],"type":"string"},"type_label":{"type":"string"},"unit":{"type":"string"},"unit_cost":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","type","description","quantity","unit_cost","amount"],"type":"object"},"type":"array"},"line_items_count":{"type":"integer"},"number":{"type":"string"},"reviewed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"signed_at":{"type":"string"},"signed_by":{"type":"string"},"status":{"enum":["draft","submitted","approved","rejected"],"type":"string"},"subtotal":{"type":"string"},"title":{"type":"string"},"translated_status":{"type":"string"},"updated_at":{"type":"string"},"work_date":{"type":"string"}},"required":["id","number","title","work_date","status","amount","grand_total","line_items"],"type":"object"}}}}},"summary":"Submit a ticket for review","tags":["tm_tickets"],"x-os-idempotent":true,"x-os-module":"tm_tickets","x-os-paginated":false},"post":{"operationId":"submitProjectTmTicket","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Submit T&M ticket","tags":["tm_tickets"],"x-os-idempotent":false,"x-os-module":"tm_tickets","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/tool_enablements":{"get":{"description":"Requires the `view` permission on the project's admin tool. A scoped API token needs `admin:read`.","operationId":"listProjectToolEnablements","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"JSON request body.","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"List tool enablements","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false},"patch":{"operationId":"updateProjectToolEnablements","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Update tool enablements","tags":["admin"],"x-os-idempotent":false,"x-os-module":"admin","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/uploads":{"post":{"operationId":"createProjectUpload","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create upload","tags":["documents"],"x-os-idempotent":false,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/users":{"get":{"operationId":"listProjectUsers","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"view","schema":{"enum":["compact","normal"],"type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[permission_template]","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[vendor_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[origin_id]","required":false,"schema":{"type":"string"}},{"explode":true,"in":"query","name":"filters[trade_id][]","schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"filters[search]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[employee]","required":false,"schema":{"type":"boolean"}},{"explode":true,"in":"query","name":"filters[id][]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[search_by_full_name]","required":false,"schema":{"type":"string"}},{"in":"query","name":"sort","required":false,"schema":{"enum":["name","vendor_name","permission_template"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"anyOf":[{"properties":{"first_name":{"type":["string","null"]},"id":{"type":"integer"},"initials":{"type":["string","null"]},"last_name":{"type":"string"},"name":{"type":"string"},"party_id":{"type":["integer","null"]},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]}},"title":"Compact View","type":"object"},{"properties":{"address":{"type":["string","null"]},"avatar":{"type":["string","null"]},"business_id":{"type":["string","null"]},"business_phone":{"type":["string","null"]},"business_phone_extension":{"type":["integer","null"]},"city":{"type":["string","null"]},"company_permission_template":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"project_specific":{"type":"boolean"},"type":{"enum":["company_tools"],"type":"string"}},"type":["object","null"]},"contact_id":{"type":"integer"},"country_code":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":["string","null"]},"email_signature":{"type":["string","null"]},"employee_id":{"type":["string","null"]},"erp_integrated_accountant":{"type":"boolean"},"fax_number":{"type":["string","null"]},"first_name":{"type":["string","null"]},"id":{"type":"integer"},"initials":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"is_employee":{"type":["boolean","null"]},"job_title":{"type":["string","null"]},"last_login_at":{"format":"date-time","type":["string","null"]},"last_name":{"type":"string"},"mobile_phone":{"type":["string","null"]},"name":{"type":"string"},"notes":{"type":["string","null"]},"origin_data":{"type":["string","null"]},"origin_id":{"type":["string","null"]},"party_id":{"type":["integer","null"]},"permission_template":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"project_specific":{"type":"boolean"},"type":{"enum":["global","project_specific"],"type":"string"}},"type":["object","null"]},"state_code":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"business_register_id":{"type":"integer"},"id":{"type":"integer"},"is_connected":{"type":"boolean"},"name":{"type":"string"},"origin_id":{"type":"integer"}},"type":["object","null"]},"welcome_email_sent_at":{"format":"date-time","type":["string","null"]},"work_classification_id":{"type":["integer","null"]},"zip":{"type":["string","null"]}},"title":"Normal View","type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Project Users","tags":["directory"],"x-os-idempotent":false,"x-os-module":"directory","x-os-paginated":true},"post":{"operationId":"createProjectUser","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"user":{"properties":{"address":{"type":"string"},"avatar":{"type":"string"},"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"city":{"type":"string"},"country_code":{"type":"string"},"email_address":{"format":"email","type":"string"},"email_signature":{"type":"string"},"employee_id":{"type":"string"},"fax_number":{"type":"string"},"first_name":{"type":"string"},"initials":{"type":"string"},"is_active":{"type":"boolean"},"is_employee":{"default":false,"type":"boolean"},"job_title":{"type":"string"},"last_name":{"type":"string"},"mobile_phone":{"type":"string"},"notes":{"type":"string"},"permission_template_id":{"type":"integer"},"state_code":{"type":"string"},"vendor_id":{"type":"integer"},"zip":{"type":"string"}},"required":["email_address","last_name"],"title":"Project User","type":"object"}},"required":["user"],"title":"Project User Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"address":{"type":"string"},"avatar":{"type":"string"},"business_id":{"type":["string","null"]},"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"city":{"type":"string"},"company_permission_template_id":{"type":"integer"},"country_code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"default_permission_template_id":{"type":"integer"},"email_address":{"format":"email","type":"string"},"email_signature":{"type":"string"},"employee_id":{"type":"string"},"fax_number":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"initials":{"type":"string"},"is_active":{"type":"boolean"},"is_employee":{"type":"boolean"},"is_insurance_manager":{"type":"boolean"},"job_title":{"type":"string"},"last_login_at":{"format":"date-time","type":"string"},"last_name":{"type":"string"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"state_code":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"work_classification_id":{"type":"integer"},"zip":{"type":"string"}},"title":"User","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create project user","tags":["directory"],"x-os-idempotent":true,"x-os-module":"directory","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/users/{id}":{"get":{"operationId":"getProjectUser","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"address":{"type":"string"},"avatar":{"type":"string"},"business_id":{"type":["string","null"]},"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"city":{"type":"string"},"company_permission_template_id":{"type":"integer"},"country_code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"default_permission_template_id":{"type":"integer"},"email_address":{"format":"email","type":"string"},"email_signature":{"type":"string"},"employee_id":{"type":"string"},"fax_number":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"initials":{"type":"string"},"is_active":{"type":"boolean"},"is_employee":{"type":"boolean"},"is_insurance_manager":{"type":"boolean"},"job_title":{"type":"string"},"last_login_at":{"format":"date-time","type":"string"},"last_name":{"type":"string"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"state_code":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"work_classification_id":{"type":"integer"},"zip":{"type":"string"}},"title":"User","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show project user","tags":["directory"],"x-os-idempotent":false,"x-os-module":"directory","x-os-paginated":false},"patch":{"operationId":"updateProjectUser","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"user":{"properties":{"abbreviated_name":{"type":"string"},"address":{"type":"string"},"avatar":{"type":"string"},"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"city":{"type":"string"},"country_code":{"type":"string"},"email_address":{"format":"email","type":"string"},"email_signature":{"type":"string"},"employee_id":{"type":"string"},"fax_number":{"type":"string"},"first_name":{"type":"string"},"is_active":{"type":"boolean"},"is_employee":{"default":false,"type":"boolean"},"job_title":{"type":"string"},"last_name":{"type":"string"},"mobile_phone":{"type":"string"},"notes":{"type":"string"},"state_code":{"type":"string"},"vendor_id":{"type":"integer"},"zip":{"type":"string"}},"title":"Project User","type":"object"}},"required":["user"],"title":"Project User Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"address":{"type":"string"},"avatar":{"type":"string"},"business_id":{"type":["string","null"]},"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"city":{"type":"string"},"company_permission_template_id":{"type":"integer"},"country_code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"default_permission_template_id":{"type":"integer"},"email_address":{"format":"email","type":"string"},"email_signature":{"type":"string"},"employee_id":{"type":"string"},"fax_number":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"initials":{"type":"string"},"is_active":{"type":"boolean"},"is_employee":{"type":"boolean"},"is_insurance_manager":{"type":"boolean"},"job_title":{"type":"string"},"last_login_at":{"format":"date-time","type":"string"},"last_name":{"type":"string"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"state_code":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"work_classification_id":{"type":"integer"},"zip":{"type":"string"}},"title":"User","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update project user","tags":["directory"],"x-os-idempotent":true,"x-os-module":"directory","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/vendors":{"get":{"operationId":"listProjectVendors","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","schema":{"enum":["normal","extended"],"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[search]","required":false,"schema":{"type":"string"}},{"explode":true,"in":"query","name":"filters[standard_cost_code_id][]","required":false,"schema":{"items":{"type":"integer"},"type":"array"}},{"explode":true,"in":"query","name":"filters[trade_id][]","required":false,"schema":{"items":{"type":"integer"},"type":"array"}},{"explode":true,"in":"query","name":"filters[id][]","required":false,"schema":{"items":{"type":"integer"},"type":"array"}},{"explode":true,"in":"query","name":"filters[parent_id][]","required":false,"schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"filters[abbreviated_name][]","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"in":"query","name":"sort","required":false,"schema":{"enum":["name","main_office_name","project_and_bid_counts"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"bidding":{"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":["object","null"]},"bidding_distribution":{"items":{"allOf":[{"properties":{"company_name":{"type":"string"},"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"business":{"properties":{"Tags":{"properties":{"approval_status":{"enum":["PENDING","APPROVED","REJECTED"],"type":"string"},"claim_status":{"enum":["PENDING","APPROVED"],"type":"string"},"publishable":{"enum":["true","false"],"type":"string"}},"type":"object"},"about":{"type":"string"},"addresses":{"items":{"properties":{"address1":{"type":"string"},"address2":{"type":"string"},"address_types":{"items":{"type":"string"},"type":"array"},"city":{"type":"string"},"country_code":{"type":"string"},"fax_number":{"type":"string"},"id":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"name":{"type":"string"},"phone_number":{"type":"string"},"postal_code1":{"type":"string"},"primary":{"type":"boolean"},"province":{"type":"string"}},"type":"object"},"type":"array"},"business_types":{"items":{"type":"string"},"type":"array"},"claimed":{"type":"boolean"},"classifications":{"items":{"properties":{"abbreviation":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"construction_sectors":{"items":{"type":"string"},"type":"array"},"coverage_areas":{"items":{"properties":{"admin1":{"type":"string"},"admin2":{"type":"string"},"admin3":{"type":["string","null"]},"admin4":{"type":["string","null"]},"country_code":{"type":"string"},"google_place_id":{"type":"string"},"locality":{"type":"string"},"selected_level":{"type":"string"}},"type":"object"},"type":"array"},"dba":{"type":"string"},"id":{"type":"string"},"logo_url":{"type":"string"},"name":{"type":"string"},"primary_slug":{"type":"string"},"project_types":{"items":{"type":"string"},"type":"array"},"provided_services":{"items":{"properties":{"id":{"type":"string"},"key":{"type":"string"},"level":{"type":"string"},"path":{"type":"string"}},"type":"object"},"type":"array"},"published":{"type":"boolean"},"published_at":{"format":"date-time","type":["string","null"]},"published_by":{"type":["string","null"]},"source":{"properties":{"id":{"type":"string"},"record_type":{"type":"string"},"source":{"type":"string"},"type":{"type":"string"}},"type":"object"},"start_of_operations":{"format":"date","type":["string","null"]},"updated_by":{"type":["string","null"]},"website":{"type":"string"}},"title":"Business (Normal View)","type":["object","null"]},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":["object","null"]},"type":"array"}},"title":"extended view","type":"object"},{"properties":{"abbreviated_name":{"type":["string","null"]},"address":{"type":["string","null"]},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_id":{"type":["string","null"]},"business_phone":{"type":["string","null"]},"business_register":{"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"type":["string","null"]},"verified_at":{"format":"date-time","type":["string","null"]}},"type":["object","null"]},"city":{"type":["string","null"]},"company":{"type":["string","null"]},"company_vendor":{"type":"boolean"},"country_code":{"type":["string","null"]},"created_at":{"format":"date-time","type":["string","null"]},"email_address":{"format":"email","type":["string","null"]},"fax_number":{"type":["string","null"]},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_connected":{"type":"boolean"},"labor_union":{"type":["string","null"]},"license_number":{"type":["string","null"]},"logo":{"type":["string","null"]},"mobile_phone":{"type":["string","null"]},"name":{"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"type":["string","null"]},"origin_code":{"type":["string","null"]},"origin_data":{"type":["string","null"]},"origin_id":{"type":["string","null"]},"prequalified":{"type":"boolean"},"primary_contact":{"properties":{"business_phone":{"type":["string","null"]},"business_phone_extension":{"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"type":["object","null"]},"project_ids":{"items":{"type":"integer"},"type":"array"},"state_code":{"type":["string","null"]},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","type":["string","null"]},"uuid":{"format":"uuid","type":["string","null"]},"vendor_group":{"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":["object","null"]},"website":{"type":["string","null"]},"zip":{"type":["string","null"]}},"title":"normal view","type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List project vendors","tags":["directory"],"x-os-idempotent":false,"x-os-module":"directory","x-os-paginated":true},"post":{"operationId":"createProjectVendor","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","schema":{"enum":["normal","extended"],"type":"string"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"vendor":{"properties":{"abbreviated_name":{"type":"string"},"address":{"type":"string"},"authorized_bidder":{"type":"boolean"},"business_phone":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"email_address":{"type":"string"},"fax_number":{"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"type":"string"},"license_number":{"type":"string"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"prequalified":{"default":false,"type":"boolean"},"primary_contact_id":{"type":"integer"},"state_code":{"type":"string"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"website":{"type":"string"},"zip":{"type":"string"}},"required":["name"],"title":"Project Vendor","type":"object"}},"required":["vendor"],"title":"Project Vendor Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"bidding":{"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":["object","null"]},"bidding_distribution":{"items":{"allOf":[{"properties":{"company_name":{"type":"string"},"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"business":{"properties":{"Tags":{"properties":{"approval_status":{"enum":["PENDING","APPROVED","REJECTED"],"type":"string"},"claim_status":{"enum":["PENDING","APPROVED"],"type":"string"},"publishable":{"enum":["true","false"],"type":"string"}},"type":"object"},"about":{"type":"string"},"addresses":{"items":{"properties":{"address1":{"type":"string"},"address2":{"type":"string"},"address_types":{"items":{"type":"string"},"type":"array"},"city":{"type":"string"},"country_code":{"type":"string"},"fax_number":{"type":"string"},"id":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"name":{"type":"string"},"phone_number":{"type":"string"},"postal_code1":{"type":"string"},"primary":{"type":"boolean"},"province":{"type":"string"}},"type":"object"},"type":"array"},"business_types":{"items":{"type":"string"},"type":"array"},"claimed":{"type":"boolean"},"classifications":{"items":{"properties":{"abbreviation":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"construction_sectors":{"items":{"type":"string"},"type":"array"},"coverage_areas":{"items":{"properties":{"admin1":{"type":"string"},"admin2":{"type":"string"},"admin3":{"type":["string","null"]},"admin4":{"type":["string","null"]},"country_code":{"type":"string"},"google_place_id":{"type":"string"},"locality":{"type":"string"},"selected_level":{"type":"string"}},"type":"object"},"type":"array"},"dba":{"type":"string"},"id":{"type":"string"},"logo_url":{"type":"string"},"name":{"type":"string"},"primary_slug":{"type":"string"},"project_types":{"items":{"type":"string"},"type":"array"},"provided_services":{"items":{"properties":{"id":{"type":"string"},"key":{"type":"string"},"level":{"type":"string"},"path":{"type":"string"}},"type":"object"},"type":"array"},"published":{"type":"boolean"},"published_at":{"format":"date-time","type":["string","null"]},"published_by":{"type":["string","null"]},"source":{"properties":{"id":{"type":"string"},"record_type":{"type":"string"},"source":{"type":"string"},"type":{"type":"string"}},"type":"object"},"start_of_operations":{"format":"date","type":["string","null"]},"updated_by":{"type":["string","null"]},"website":{"type":"string"}},"title":"Business (Normal View)","type":["object","null"]},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":["object","null"]},"type":"array"}},"title":"extended view","type":"object"},{"properties":{"abbreviated_name":{"type":["string","null"]},"address":{"type":["string","null"]},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_id":{"type":["string","null"]},"business_phone":{"type":["string","null"]},"business_register":{"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"type":["string","null"]},"verified_at":{"format":"date-time","type":["string","null"]}},"type":["object","null"]},"city":{"type":["string","null"]},"company":{"type":["string","null"]},"company_vendor":{"type":"boolean"},"country_code":{"type":["string","null"]},"created_at":{"format":"date-time","type":["string","null"]},"email_address":{"format":"email","type":["string","null"]},"fax_number":{"type":["string","null"]},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_connected":{"type":"boolean"},"labor_union":{"type":["string","null"]},"license_number":{"type":["string","null"]},"logo":{"type":["string","null"]},"mobile_phone":{"type":["string","null"]},"name":{"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"type":["string","null"]},"origin_code":{"type":["string","null"]},"origin_data":{"type":["string","null"]},"origin_id":{"type":["string","null"]},"prequalified":{"type":"boolean"},"primary_contact":{"properties":{"business_phone":{"type":["string","null"]},"business_phone_extension":{"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"type":["object","null"]},"project_ids":{"items":{"type":"integer"},"type":"array"},"state_code":{"type":["string","null"]},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","type":["string","null"]},"uuid":{"format":"uuid","type":["string","null"]},"vendor_group":{"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":["object","null"]},"website":{"type":["string","null"]},"zip":{"type":["string","null"]}},"title":"normal view","type":"object"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create project vendor","tags":["directory"],"x-os-idempotent":true,"x-os-module":"directory","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/vendors/{id}":{"get":{"operationId":"getProjectVendor","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","schema":{"enum":["normal","extended"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"bidding":{"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":["object","null"]},"bidding_distribution":{"items":{"allOf":[{"properties":{"company_name":{"type":"string"},"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"business":{"properties":{"Tags":{"properties":{"approval_status":{"enum":["PENDING","APPROVED","REJECTED"],"type":"string"},"claim_status":{"enum":["PENDING","APPROVED"],"type":"string"},"publishable":{"enum":["true","false"],"type":"string"}},"type":"object"},"about":{"type":"string"},"addresses":{"items":{"properties":{"address1":{"type":"string"},"address2":{"type":"string"},"address_types":{"items":{"type":"string"},"type":"array"},"city":{"type":"string"},"country_code":{"type":"string"},"fax_number":{"type":"string"},"id":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"name":{"type":"string"},"phone_number":{"type":"string"},"postal_code1":{"type":"string"},"primary":{"type":"boolean"},"province":{"type":"string"}},"type":"object"},"type":"array"},"business_types":{"items":{"type":"string"},"type":"array"},"claimed":{"type":"boolean"},"classifications":{"items":{"properties":{"abbreviation":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"construction_sectors":{"items":{"type":"string"},"type":"array"},"coverage_areas":{"items":{"properties":{"admin1":{"type":"string"},"admin2":{"type":"string"},"admin3":{"type":["string","null"]},"admin4":{"type":["string","null"]},"country_code":{"type":"string"},"google_place_id":{"type":"string"},"locality":{"type":"string"},"selected_level":{"type":"string"}},"type":"object"},"type":"array"},"dba":{"type":"string"},"id":{"type":"string"},"logo_url":{"type":"string"},"name":{"type":"string"},"primary_slug":{"type":"string"},"project_types":{"items":{"type":"string"},"type":"array"},"provided_services":{"items":{"properties":{"id":{"type":"string"},"key":{"type":"string"},"level":{"type":"string"},"path":{"type":"string"}},"type":"object"},"type":"array"},"published":{"type":"boolean"},"published_at":{"format":"date-time","type":["string","null"]},"published_by":{"type":["string","null"]},"source":{"properties":{"id":{"type":"string"},"record_type":{"type":"string"},"source":{"type":"string"},"type":{"type":"string"}},"type":"object"},"start_of_operations":{"format":"date","type":["string","null"]},"updated_by":{"type":["string","null"]},"website":{"type":"string"}},"title":"Business (Normal View)","type":["object","null"]},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":["object","null"]},"type":"array"}},"title":"extended view","type":"object"},{"properties":{"abbreviated_name":{"type":["string","null"]},"address":{"type":["string","null"]},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_id":{"type":["string","null"]},"business_phone":{"type":["string","null"]},"business_register":{"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"type":["string","null"]},"verified_at":{"format":"date-time","type":["string","null"]}},"type":["object","null"]},"city":{"type":["string","null"]},"company":{"type":["string","null"]},"company_vendor":{"type":"boolean"},"country_code":{"type":["string","null"]},"created_at":{"format":"date-time","type":["string","null"]},"email_address":{"format":"email","type":["string","null"]},"fax_number":{"type":["string","null"]},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_connected":{"type":"boolean"},"labor_union":{"type":["string","null"]},"license_number":{"type":["string","null"]},"logo":{"type":["string","null"]},"mobile_phone":{"type":["string","null"]},"name":{"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"type":["string","null"]},"origin_code":{"type":["string","null"]},"origin_data":{"type":["string","null"]},"origin_id":{"type":["string","null"]},"prequalified":{"type":"boolean"},"primary_contact":{"properties":{"business_phone":{"type":["string","null"]},"business_phone_extension":{"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"type":["object","null"]},"project_ids":{"items":{"type":"integer"},"type":"array"},"state_code":{"type":["string","null"]},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","type":["string","null"]},"uuid":{"format":"uuid","type":["string","null"]},"vendor_group":{"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":["object","null"]},"website":{"type":["string","null"]},"zip":{"type":["string","null"]}},"title":"normal view","type":"object"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show project vendor","tags":["directory"],"x-os-idempotent":false,"x-os-module":"directory","x-os-paginated":false},"patch":{"operationId":"updateProjectVendor","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","schema":{"enum":["normal","extended"],"type":"string"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"vendor":{"properties":{"abbreviated_name":{"type":"string"},"address":{"type":"string"},"authorized_bidder":{"type":"boolean"},"bidding":{"properties":{"affirmative_action":{"default":false,"type":"boolean"},"african_american_business":{"default":false,"type":"boolean"},"asian_american_business":{"default":false,"type":"boolean"},"certified_business_enterprise":{"default":false,"type":"boolean"},"disadvantaged_business":{"default":false,"type":"boolean"},"eight_a_business":{"default":false,"type":"boolean"},"hispanic_business":{"default":false,"type":"boolean"},"historically_underutilized_business":{"default":false,"type":"boolean"},"minority_business_enterprise":{"default":false,"type":"boolean"},"native_american_business":{"default":false,"type":"boolean"},"sdvo_business":{"default":false,"type":"boolean"},"small_business":{"default":false,"type":"boolean"},"womens_business":{"default":false,"type":"boolean"}},"type":"object"},"business_phone":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"email_address":{"type":"string"},"fax_number":{"type":"string"},"is_active":{"type":"boolean"},"labor_union":{"type":"string"},"license_number":{"type":"string"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent_id":{"type":"integer"},"prequalified":{"default":false,"type":"boolean"},"primary_contact_id":{"type":"integer"},"state_code":{"type":"string"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"website":{"type":"string"},"zip":{"type":"string"}},"title":"Project Vendor","type":"object"}},"required":["vendor"],"title":"Project Vendor Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"bidding":{"properties":{"affirmative_action":{"type":"boolean"},"african_american_business":{"type":"boolean"},"asian_american_business":{"type":"boolean"},"certified_business_enterprise":{"type":"boolean"},"disadvantaged_business":{"type":"boolean"},"eight_a_business":{"type":"boolean"},"hispanic_business":{"type":"boolean"},"historically_underutilized_business":{"type":"boolean"},"minority_business_enterprise":{"type":"boolean"},"native_american_business":{"type":"boolean"},"sdvo_business":{"type":"boolean"},"small_business":{"type":"boolean"},"womens_business":{"type":"boolean"}},"type":["object","null"]},"bidding_distribution":{"items":{"allOf":[{"properties":{"company_name":{"type":"string"},"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"business":{"properties":{"Tags":{"properties":{"approval_status":{"enum":["PENDING","APPROVED","REJECTED"],"type":"string"},"claim_status":{"enum":["PENDING","APPROVED"],"type":"string"},"publishable":{"enum":["true","false"],"type":"string"}},"type":"object"},"about":{"type":"string"},"addresses":{"items":{"properties":{"address1":{"type":"string"},"address2":{"type":"string"},"address_types":{"items":{"type":"string"},"type":"array"},"city":{"type":"string"},"country_code":{"type":"string"},"fax_number":{"type":"string"},"id":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"name":{"type":"string"},"phone_number":{"type":"string"},"postal_code1":{"type":"string"},"primary":{"type":"boolean"},"province":{"type":"string"}},"type":"object"},"type":"array"},"business_types":{"items":{"type":"string"},"type":"array"},"claimed":{"type":"boolean"},"classifications":{"items":{"properties":{"abbreviation":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"construction_sectors":{"items":{"type":"string"},"type":"array"},"coverage_areas":{"items":{"properties":{"admin1":{"type":"string"},"admin2":{"type":"string"},"admin3":{"type":["string","null"]},"admin4":{"type":["string","null"]},"country_code":{"type":"string"},"google_place_id":{"type":"string"},"locality":{"type":"string"},"selected_level":{"type":"string"}},"type":"object"},"type":"array"},"dba":{"type":"string"},"id":{"type":"string"},"logo_url":{"type":"string"},"name":{"type":"string"},"primary_slug":{"type":"string"},"project_types":{"items":{"type":"string"},"type":"array"},"provided_services":{"items":{"properties":{"id":{"type":"string"},"key":{"type":"string"},"level":{"type":"string"},"path":{"type":"string"}},"type":"object"},"type":"array"},"published":{"type":"boolean"},"published_at":{"format":"date-time","type":["string","null"]},"published_by":{"type":["string","null"]},"source":{"properties":{"id":{"type":"string"},"record_type":{"type":"string"},"source":{"type":"string"},"type":{"type":"string"}},"type":"object"},"start_of_operations":{"format":"date","type":["string","null"]},"updated_by":{"type":["string","null"]},"website":{"type":"string"}},"title":"Business (Normal View)","type":["object","null"]},"children_count":{"type":"integer"},"legal_name":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]},"trades":{"items":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":["object","null"]},"type":"array"}},"title":"extended view","type":"object"},{"properties":{"abbreviated_name":{"type":["string","null"]},"address":{"type":["string","null"]},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"authorized_bidder":{"type":"boolean"},"business_id":{"type":["string","null"]},"business_phone":{"type":["string","null"]},"business_register":{"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"type":{"type":"string"},"verification_status":{"enum":["active","cancelled","does_not_exist",null],"type":["string","null"]},"verified_at":{"format":"date-time","type":["string","null"]}},"type":["object","null"]},"city":{"type":["string","null"]},"company":{"type":["string","null"]},"company_vendor":{"type":"boolean"},"country_code":{"type":["string","null"]},"created_at":{"format":"date-time","type":["string","null"]},"email_address":{"format":"email","type":["string","null"]},"fax_number":{"type":["string","null"]},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_connected":{"type":"boolean"},"labor_union":{"type":["string","null"]},"license_number":{"type":["string","null"]},"logo":{"type":["string","null"]},"mobile_phone":{"type":["string","null"]},"name":{"type":"string"},"non_union_prevailing_wage":{"type":"boolean"},"notes":{"type":["string","null"]},"origin_code":{"type":["string","null"]},"origin_data":{"type":["string","null"]},"origin_id":{"type":["string","null"]},"prequalified":{"type":"boolean"},"primary_contact":{"properties":{"business_phone":{"type":["string","null"]},"business_phone_extension":{"type":["integer","null"]},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":"string"},"fax_number":{"type":["string","null"]},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"mobile_phone":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"type":["object","null"]},"project_ids":{"items":{"type":"integer"},"type":"array"},"state_code":{"type":["string","null"]},"synced_to_erp":{"type":"boolean"},"trade_name":{"type":"string"},"union_member":{"type":"boolean"},"updated_at":{"format":"date-time","type":["string","null"]},"uuid":{"format":"uuid","type":["string","null"]},"vendor_group":{"properties":{"id":{"type":"integer"},"name":{"maxLength":255,"type":"string"}},"required":["name"],"type":["object","null"]},"website":{"type":["string","null"]},"zip":{"type":["string","null"]}},"title":"normal view","type":"object"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"type":["string","null"]},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update project vendor","tags":["directory"],"x-os-idempotent":true,"x-os-module":"directory","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/vendors/{id}/users":{"get":{"operationId":"listProjectVendorUsers","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"anyOf":[{"properties":{"first_name":{"type":["string","null"]},"id":{"type":"integer"},"initials":{"type":["string","null"]},"last_name":{"type":"string"},"name":{"type":"string"},"party_id":{"type":["integer","null"]},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]}},"title":"Compact View","type":"object"},{"properties":{"address":{"type":["string","null"]},"avatar":{"type":["string","null"]},"business_id":{"type":["string","null"]},"business_phone":{"type":["string","null"]},"business_phone_extension":{"type":["integer","null"]},"city":{"type":["string","null"]},"company_permission_template":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"project_specific":{"type":"boolean"},"type":{"enum":["company_tools"],"type":"string"}},"type":["object","null"]},"contact_id":{"type":"integer"},"country_code":{"type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"email_address":{"format":"email","type":["string","null"]},"email_signature":{"type":["string","null"]},"employee_id":{"type":["string","null"]},"erp_integrated_accountant":{"type":"boolean"},"fax_number":{"type":["string","null"]},"first_name":{"type":["string","null"]},"id":{"type":"integer"},"initials":{"type":["string","null"]},"is_active":{"type":["boolean","null"]},"is_employee":{"type":["boolean","null"]},"job_title":{"type":["string","null"]},"last_login_at":{"format":"date-time","type":["string","null"]},"last_name":{"type":"string"},"mobile_phone":{"type":["string","null"]},"name":{"type":"string"},"notes":{"type":["string","null"]},"origin_data":{"type":["string","null"]},"origin_id":{"type":["string","null"]},"party_id":{"type":["integer","null"]},"permission_template":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"project_specific":{"type":"boolean"},"type":{"enum":["global","project_specific"],"type":"string"}},"type":["object","null"]},"state_code":{"type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"business_register_id":{"type":"integer"},"id":{"type":"integer"},"is_connected":{"type":"boolean"},"name":{"type":"string"},"origin_id":{"type":"integer"}},"type":["object","null"]},"welcome_email_sent_at":{"format":"date-time","type":["string","null"]},"work_classification_id":{"type":["integer","null"]},"zip":{"type":["string","null"]}},"title":"Normal View","type":"object"}]},"type":"array"}}}}},"summary":"List company (vendor) people","tags":["directory"],"x-os-idempotent":false,"x-os-module":"directory","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/visitor_logs":{"get":{"operationId":"listProjectVisitorLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"begin_hour":{"maximum":23,"minimum":0,"type":"integer"},"begin_minute":{"maximum":59,"minimum":0,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"details":{"type":"string"},"end_hour":{"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"maximum":59,"minimum":0,"type":"integer"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"subject":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Visitor Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectVisitorLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"visitor_log":{"allOf":[{"properties":{"begin_hour":{"maximum":23,"minimum":0,"type":"integer"},"begin_minute":{"maximum":59,"minimum":0,"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"details":{"type":"string"},"end_hour":{"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"maximum":59,"minimum":0,"type":"integer"},"location_id":{"type":"integer"},"subject":{"type":"string"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"required":["begin_hour","begin_minute","end_hour","end_minute"],"type":"object"}},"required":["visitor_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"begin_hour":{"maximum":23,"minimum":0,"type":"integer"},"begin_minute":{"maximum":59,"minimum":0,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"details":{"type":"string"},"end_hour":{"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"maximum":59,"minimum":0,"type":"integer"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"subject":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Visitor Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/visitor_logs/{id}":{"delete":{"operationId":"deleteProjectVisitorLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Visitor Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectVisitorLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"begin_hour":{"maximum":23,"minimum":0,"type":"integer"},"begin_minute":{"maximum":59,"minimum":0,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"details":{"type":"string"},"end_hour":{"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"maximum":59,"minimum":0,"type":"integer"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"subject":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Visitor Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectVisitorLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"visitor_log":{"allOf":[{"properties":{"begin_hour":{"maximum":23,"minimum":0,"type":"integer"},"begin_minute":{"maximum":59,"minimum":0,"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"details":{"type":"string"},"end_hour":{"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"maximum":59,"minimum":0,"type":"integer"},"location_id":{"type":"integer"},"subject":{"type":"string"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["visitor_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"begin_hour":{"maximum":23,"minimum":0,"type":"integer"},"begin_minute":{"maximum":59,"minimum":0,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"details":{"type":"string"},"end_hour":{"maximum":23,"minimum":0,"type":"integer"},"end_minute":{"maximum":59,"minimum":0,"type":"integer"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"permissions":{"properties":{"can_delete":{"type":"boolean"},"can_update":{"type":"boolean"}},"type":"object"},"position":{"type":"integer"},"status":{"type":"string"},"subject":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Visitor Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/waste_logs":{"get":{"operationId":"listProjectWasteLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[vendor_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"approximate_quantity":{"type":"number"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"contact":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"disposal_location":{"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"material":{"type":"string"},"method_of_disposal":{"type":"string"},"position":{"type":"integer"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Waste Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectWasteLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"waste_log":{"allOf":[{"properties":{"approximate_quantity":{"type":"integer"},"contact_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"disposal_location":{"type":"string"},"location_id":{"type":"integer"},"material":{"type":"string"},"method_of_disposal":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"required":["time_hour","time_minute"],"type":"object"}},"required":["waste_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"waste_log":{"properties":{"approximate_quantity":{"type":"integer"},"contact_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"disposal_location":{"type":"string"},"location_id":{"type":"integer"},"material":{"type":"string"},"method_of_disposal":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"vendor_id":{"type":"integer"}},"required":["time_hour","time_minute"],"type":"object"}},"required":["waste_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"approximate_quantity":{"type":"number"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"contact":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"disposal_location":{"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"material":{"type":"string"},"method_of_disposal":{"type":"string"},"position":{"type":"integer"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Waste Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/waste_logs/{id}":{"delete":{"operationId":"deleteProjectWasteLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Waste Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectWasteLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"approximate_quantity":{"type":"number"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"contact":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"disposal_location":{"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"material":{"type":"string"},"method_of_disposal":{"type":"string"},"position":{"type":"integer"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Waste Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectWasteLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"waste_log":{"allOf":[{"properties":{"approximate_quantity":{"type":"integer"},"contact_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"disposal_location":{"type":"string"},"location_id":{"type":"integer"},"material":{"type":"string"},"method_of_disposal":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"vendor_id":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["waste_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"waste_log":{"properties":{"approximate_quantity":{"type":"integer"},"contact_id":{"type":"integer"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"disposal_location":{"type":"string"},"location_id":{"type":"integer"},"material":{"type":"string"},"method_of_disposal":{"type":"string"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"vendor_id":{"type":"integer"}},"type":"object"}},"required":["waste_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"approximate_quantity":{"type":"number"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"contact":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"disposal_location":{"type":"string"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"material":{"type":"string"},"method_of_disposal":{"type":"string"},"position":{"type":"integer"},"time_hour":{"maximum":23,"minimum":0,"type":"integer"},"time_minute":{"maximum":59,"minimum":0,"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Waste Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/weather_logs":{"get":{"deprecated":true,"operationId":"listProjectWeatherLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"average":{"type":"string"},"calamity":{"type":"string"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"ground":{"type":"string"},"id":{"type":"integer"},"is_weather_delay":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"type":"string"},"temperature":{"type":"string"},"time":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"wind":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Weather Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"deprecated":true,"operationId":"createProjectWeatherLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"weather_log":{"properties":{"average":{"type":"string"},"calamity":{"type":"string"},"comments":{"type":"string"},"date":{"format":"date","type":"string"},"ground":{"type":"string"},"is_weather_delay":{"type":"integer"},"location_id":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"type":"string"},"temperature":{"type":"string"},"time":{"format":"time","type":"string"},"vendor_id":{"type":"integer"},"wind":{"type":"string"}},"required":["date"],"type":"object"}},"required":["weather_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"weather_log":{"properties":{"average":{"type":"string"},"calamity":{"type":"string"},"comments":{"type":"string"},"date":{"format":"date","type":"string"},"ground":{"type":"string"},"is_weather_delay":{"type":"integer"},"location_id":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"type":"string"},"temperature":{"type":"string"},"time":{"format":"time","type":"string"},"vendor_id":{"type":"integer"},"wind":{"type":"string"}},"required":["date"],"type":"object"}},"required":["weather_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"average":{"type":"string"},"calamity":{"type":"string"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"ground":{"type":"string"},"id":{"type":"integer"},"is_weather_delay":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"type":"string"},"temperature":{"type":"string"},"time":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"wind":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Weather Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/weather_logs/conditions":{"get":{"deprecated":true,"operationId":"listProjectWeatherLogsConditions","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"calamity":{"items":{"type":"string"},"type":"array"},"ground":{"items":{"type":"string"},"type":"array"},"sky":{"items":{"type":"string"},"type":"array"},"temperature":{"items":{"type":"string"},"type":"array"},"wind":{"items":{"type":"string"},"type":"array"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Accepted Weather Conditions","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/weather_logs/{id}":{"delete":{"deprecated":true,"operationId":"deleteProjectWeatherLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Weather Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"deprecated":true,"operationId":"getProjectWeatherLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"average":{"type":"string"},"calamity":{"type":"string"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"ground":{"type":"string"},"id":{"type":"integer"},"is_weather_delay":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"type":"string"},"temperature":{"type":"string"},"time":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"wind":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Weather Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"deprecated":true,"operationId":"updateProjectWeatherLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"weather_log":{"properties":{"average":{"type":"string"},"calamity":{"type":"string"},"comments":{"type":"string"},"date":{"format":"date","type":"string"},"ground":{"type":"string"},"is_weather_delay":{"type":"integer"},"location_id":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"type":"string"},"temperature":{"type":"string"},"time":{"format":"time","type":"string"},"vendor_id":{"type":"integer"},"wind":{"type":"string"}},"required":["date"],"type":"object"}},"required":["weather_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"weather_log":{"properties":{"average":{"type":"string"},"calamity":{"type":"string"},"comments":{"type":"string"},"date":{"format":"date","type":"string"},"ground":{"type":"string"},"is_weather_delay":{"type":"integer"},"location_id":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"type":"string"},"temperature":{"type":"string"},"time":{"format":"time","type":"string"},"vendor_id":{"type":"integer"},"wind":{"type":"string"}},"required":["date"],"type":"object"}},"required":["weather_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"average":{"type":"string"},"calamity":{"type":"string"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"ground":{"type":"string"},"id":{"type":"integer"},"is_weather_delay":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"type":"string"},"temperature":{"type":"string"},"time":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"wind":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Weather Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/widget_data":{"get":{"deprecated":true,"description":"Deprecated: 360 Reporting is retired in favour of Analytics. Use the Analytics API instead: dashboards (/rest/v1.0/companies/{company_id}/analytics/dashboards and …/dashboards/{id}/data for computed tiles), ad-hoc queries (…/analytics/query) and exports (…/analytics/exports). See the Analytics API guide.","operationId":"listProjectWidgetData","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reporting_ComputedWidget"}}}}},"summary":"Compute a single widget's chart data","tags":["reporting"],"x-os-idempotent":false,"x-os-module":"reporting","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/work_breakdown_structure/patterns":{"get":{"operationId":"listProjectWorkBreakdownStructurePatterns","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsPattern"}}}}},"summary":"Show the project WBS pattern","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/work_breakdown_structure/segments":{"get":{"operationId":"listProjectWorkBreakdownStructureSegments","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/wbs_Segment"},"type":"array"}}}}},"summary":"List project WBS segments","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"post":{"operationId":"createProjectWorkBreakdownStructureSegment","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_Segment"}}}}},"summary":"Create a project WBS segment","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/work_breakdown_structure/segments/{id}":{"delete":{"description":"Requires wbs:write and the WBS delete permission on the specified project. The segment must belong to that project. Use the company endpoint for shared segments. Deletes the segment and its items. Deletion is blocked if an assembled WBS code uses any of its items or the retained hierarchy is invalid.","operationId":"deleteProjectWorkBreakdownStructureSegment","parameters":[{"description":"Project id in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"WBS segment id.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted successfully. The response body is empty."},"401":{"$ref":"#/components/responses/wbs_WbsUnauthorized"},"403":{"$ref":"#/components/responses/wbs_WbsForbidden"},"404":{"$ref":"#/components/responses/wbs_WbsNotFound"},"409":{"$ref":"#/components/responses/wbs_WbsDeleteConflict"},"429":{"$ref":"#/components/responses/wbs_WbsRateLimited"},"500":{"$ref":"#/components/responses/wbs_WbsInternalError"},"503":{"$ref":"#/components/responses/wbs_WbsAuthUnavailable"}},"summary":"Delete a project WBS segment","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false},"get":{"operationId":"getProjectWorkBreakdownStructureSegment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_Segment"}}}}},"summary":"Show a project WBS segment","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"patch":{"operationId":"updateProjectWorkBreakdownStructureSegment","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_Segment"}}}}},"summary":"Update a project WBS segment","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/work_breakdown_structure/segments/{id}/segment_items":{"get":{"operationId":"listProjectWorkBreakdownStructureSegmentSegmentItems","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/wbs_SegmentItem"},"type":"array"}}}}},"summary":"List project segment items","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"post":{"operationId":"createProjectWorkBreakdownStructureSegmentSegmentItem","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_SegmentItem"}}}}},"summary":"Create a project segment item","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/work_breakdown_structure/segments/{id}/segment_items/{item_id}":{"delete":{"description":"Requires wbs:write and the WBS delete permission on the specified project. The item must belong to a segment owned by that project. Use the company endpoint for shared items. Deletes this item and its descendants. Deletion is blocked if an assembled WBS code uses an item in this subtree or the retained hierarchy is invalid.","operationId":"deleteProjectWorkBreakdownStructureSegmentSegmentItem","parameters":[{"description":"Project id in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"WBS segment id.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"WBS segment item id within the segment.","in":"path","name":"item_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted successfully. The response body is empty."},"401":{"$ref":"#/components/responses/wbs_WbsUnauthorized"},"403":{"$ref":"#/components/responses/wbs_WbsForbidden"},"404":{"$ref":"#/components/responses/wbs_WbsNotFound"},"409":{"$ref":"#/components/responses/wbs_WbsDeleteConflict"},"429":{"$ref":"#/components/responses/wbs_WbsRateLimited"},"500":{"$ref":"#/components/responses/wbs_WbsInternalError"},"503":{"$ref":"#/components/responses/wbs_WbsAuthUnavailable"}},"summary":"Delete a project WBS segment item","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false},"get":{"description":"Requires wbs:read and WBS view permission on the project. Reads a project-owned item or an item inherited from a company WBS segment. The item must belong to the specified segment.","operationId":"getProjectWorkBreakdownStructureSegmentSegmentItem","parameters":[{"description":"Project id in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"WBS segment id.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"WBS segment item id within the segment.","in":"path","name":"item_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_SegmentItem"}}},"description":"The segment item and its ancestry."},"401":{"$ref":"#/components/responses/wbs_WbsUnauthorized"},"403":{"$ref":"#/components/responses/wbs_WbsForbidden"},"404":{"$ref":"#/components/responses/wbs_WbsNotFound"},"429":{"$ref":"#/components/responses/wbs_WbsRateLimited"},"500":{"$ref":"#/components/responses/wbs_WbsInternalError"},"503":{"$ref":"#/components/responses/wbs_WbsAuthUnavailable"}},"summary":"Show a WBS segment item in project context","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"patch":{"operationId":"updateProjectWorkBreakdownStructureSegmentSegmentItem","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_SegmentItem"}}}}},"summary":"Update a project segment item","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/work_breakdown_structure/wbs_codes":{"get":{"operationId":"listProjectWorkBreakdownStructureWbsCodes","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/wbs_WbsCode"},"type":"array"}}}}},"summary":"List assembled WBS codes","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"post":{"operationId":"createProjectWorkBreakdownStructureWbsCode","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsCode"}}}}},"summary":"Create an assembled WBS code","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/work_breakdown_structure/wbs_codes/{id}":{"delete":{"description":"Requires wbs:write and the WBS delete permission on the specified project. Deletes the assembled code and its links to segment items. The underlying segment items are retained.","operationId":"deleteProjectWorkBreakdownStructureWbsCode","parameters":[{"description":"Project id in the authenticated company.","in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Assembled WBS code id in the project.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted successfully. The response body is empty."},"401":{"$ref":"#/components/responses/wbs_WbsUnauthorized"},"403":{"$ref":"#/components/responses/wbs_WbsForbidden"},"404":{"$ref":"#/components/responses/wbs_WbsNotFound"},"429":{"$ref":"#/components/responses/wbs_WbsRateLimited"},"500":{"$ref":"#/components/responses/wbs_WbsInternalError"},"503":{"$ref":"#/components/responses/wbs_WbsAuthUnavailable"}},"summary":"Delete a project WBS code","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false},"get":{"operationId":"getProjectWorkBreakdownStructureWbsCode","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsCode"}}}}},"summary":"Show an assembled WBS code","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"patch":{"operationId":"updateProjectWorkBreakdownStructureWbsCode","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_WbsCode"}}}}},"summary":"Update an assembled WBS code","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/work_logs":{"get":{"operationId":"listProjectWorkLogs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"hourly_rate":{"format":"float","type":"number"},"hours":{"format":"float","type":"number"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"reimbursable":{"type":"boolean"},"resource_name":{"type":"string"},"scheduled_tasks":{"items":{"properties":{"finish_datetime":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"start_datetime":{"format":"date-time","nullable":true,"type":"string"},"task_id":{"type":"integer"},"task_name":{"type":"string"},"task_percentage":{"type":"integer"},"task_row_number":{"type":"integer"},"work_log_id":{"type":"integer"}},"type":"object"},"type":"array"},"showed":{"type":"boolean"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"workers":{"type":"integer"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Work Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectWorkLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"work_log":{"allOf":[{"properties":{"comments":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"hourly_rate":{"format":"float","type":"number"},"hours":{"format":"float","type":"number"},"location_id":{"type":"integer"},"reimbursable":{"type":"boolean"},"resource_name":{"type":"string"},"showed":{"type":"boolean"},"vendor_id":{"type":"integer"},"workers":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["work_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"work_log":{"properties":{"comments":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"hourly_rate":{"format":"float","type":"number"},"hours":{"format":"float","type":"number"},"location_id":{"type":"integer"},"reimbursable":{"type":"boolean"},"resource_name":{"type":"string"},"showed":{"type":"boolean"},"vendor_id":{"type":"integer"},"workers":{"type":"integer"}},"type":"object"}},"required":["work_log"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"hourly_rate":{"format":"float","type":"number"},"hours":{"format":"float","type":"number"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"reimbursable":{"type":"boolean"},"resource_name":{"type":"string"},"scheduled_tasks":{"items":{"properties":{"finish_datetime":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"start_datetime":{"format":"date-time","nullable":true,"type":"string"},"task_id":{"type":"integer"},"task_name":{"type":"string"},"task_percentage":{"type":"integer"},"task_row_number":{"type":"integer"},"work_log_id":{"type":"integer"}},"type":"object"},"type":"array"},"showed":{"type":"boolean"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"workers":{"type":"integer"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Work Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/work_logs/{id}":{"delete":{"operationId":"deleteProjectWorkLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Work Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectWorkLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"hourly_rate":{"format":"float","type":"number"},"hours":{"format":"float","type":"number"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"reimbursable":{"type":"boolean"},"resource_name":{"type":"string"},"scheduled_tasks":{"items":{"properties":{"finish_datetime":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"start_datetime":{"format":"date-time","nullable":true,"type":"string"},"task_id":{"type":"integer"},"task_name":{"type":"string"},"task_percentage":{"type":"integer"},"task_row_number":{"type":"integer"},"work_log_id":{"type":"integer"}},"type":"object"},"type":"array"},"showed":{"type":"boolean"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"workers":{"type":"integer"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Work Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectWorkLog","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"work_log":{"allOf":[{"properties":{"comments":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"hourly_rate":{"format":"float","type":"number"},"hours":{"format":"float","type":"number"},"location_id":{"type":"integer"},"reimbursable":{"type":"boolean"},"resource_name":{"type":"string"},"showed":{"type":"boolean"},"vendor_id":{"type":"integer"},"workers":{"type":"integer"}}},{"properties":{"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"upload_ids":{"items":{"type":"string"},"type":"array"}}}],"type":"object"}},"required":["work_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"work_log":{"properties":{"comments":{"type":"string"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"hourly_rate":{"format":"float","type":"number"},"hours":{"format":"float","type":"number"},"location_id":{"type":"integer"},"reimbursable":{"type":"boolean"},"resource_name":{"type":"string"},"showed":{"type":"boolean"},"vendor_id":{"type":"integer"},"workers":{"type":"integer"}},"type":"object"}},"required":["work_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"hourly_rate":{"format":"float","type":"number"},"hours":{"format":"float","type":"number"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"reimbursable":{"type":"boolean"},"resource_name":{"type":"string"},"scheduled_tasks":{"items":{"properties":{"finish_datetime":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"start_datetime":{"format":"date-time","nullable":true,"type":"string"},"task_id":{"type":"integer"},"task_name":{"type":"string"},"task_percentage":{"type":"integer"},"task_row_number":{"type":"integer"},"work_log_id":{"type":"integer"}},"type":"object"},"type":"array"},"showed":{"type":"boolean"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"workers":{"type":"integer"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Work Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/workforce/assignments":{"get":{"operationId":"listProjectWorkforceAssignments","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/workforce_Assignment"},"type":"array"}}}},"401":{}},"summary":"List project assignments (optionally by date range)","tags":["workforce"],"x-os-idempotent":false,"x-os-module":"workforce","x-os-paginated":false},"post":{"operationId":"createProjectWorkforceAssignment","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"assignment":{"properties":{"crew_id":{"type":"integer"},"end_day":{"type":"string"},"hours_per_day":{"type":"number"},"notes":{"type":"string"},"person_id":{"type":"integer"},"role":{"type":"string"},"start_day":{"type":"string"},"state":{"enum":["pending","confirmed","completed","canceled"],"type":"string"}},"required":["start_day"],"type":"object"}},"required":["assignment"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/workforce_Assignment"}}}},"422":{}},"summary":"Create an assignment","tags":["workforce"],"x-os-idempotent":true,"x-os-module":"workforce","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/workforce/assignments/filter_options/crews":{"get":{"operationId":"listProjectWorkforceAssignmentsFilterOptionsCrews","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/workforce_FilterOption"},"type":"array"}}}}},"summary":"Crew filter options for a project","tags":["workforce"],"x-os-idempotent":false,"x-os-module":"workforce","x-os-paginated":false}},"/rest/v1.0/projects/{project_id}/workforce/assignments/{id}":{"delete":{"operationId":"deleteProjectWorkforceAssignment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Delete assignment","tags":["workforce"],"x-os-idempotent":false,"x-os-module":"workforce","x-os-paginated":false},"get":{"operationId":"getProjectWorkforceAssignment","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/workforce_Assignment"}}}},"404":{}},"summary":"Show an assignment","tags":["workforce"],"x-os-idempotent":false,"x-os-module":"workforce","x-os-paginated":false},"patch":{"operationId":"updateProjectWorkforceAssignment","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"assignment":{"properties":{"crew_id":{"type":"integer"},"end_day":{"type":"string"},"hours_per_day":{"type":"number"},"notes":{"type":"string"},"person_id":{"type":"integer"},"role":{"type":"string"},"start_day":{"type":"string"},"state":{"enum":["pending","confirmed","completed","canceled"],"type":"string"}},"type":"object"}},"required":["assignment"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/workforce_Assignment"}}}}},"summary":"Update an assignment","tags":["workforce"],"x-os-idempotent":true,"x-os-module":"workforce","x-os-paginated":false}},"/rest/v1.0/punch_item_types":{"get":{"operationId":"listPunchItemTypes","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"sort","required":false,"schema":{"enum":["name"],"type":"string"}},{"explode":false,"in":"query","name":"filters[name]","schema":{"items":{"type":"string"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Punch Item Type","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List punch item types","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true},"post":{"description":"Punch item types are shared by every project of the company: needs punch list admin on project_id and company admin. Names are unique per company (case-insensitive).","operationId":"createPunchItemType","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"punch_item_type":{"properties":{"name":{"type":"string"}},"required":["name"],"title":"Punch Item Type","type":"object"}},"required":["project_id","punch_item_type"],"title":"Punch Item Type Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Punch Item Type","type":"object"}}},"description":"The created type."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Create Punch Item Type","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/punch_item_types/{id}":{"delete":{"description":"Punch item types are shared by every project of the company: needs punch list admin on project_id and company admin. A type still used by a punch item (live or recycled) or a template returns 409.","operationId":"deletePunchItemType","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."}},"summary":"Delete Punch Item Type","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false},"get":{"operationId":"getPunchItemType","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Punch Item Type","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Punch Item Type","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":false},"patch":{"description":"Punch item types are shared by every project of the company: needs punch list admin on project_id and company admin. Names are unique per company (case-insensitive).","operationId":"updatePunchItemType","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"punch_item_type":{"properties":{"name":{"type":"string"}},"required":["name"],"title":"Punch Item Type","type":"object"}},"required":["project_id","punch_item_type"],"title":"Punch Item Type Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Punch Item Type","type":"object"}}},"description":"The renamed type."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Update Punch Item type","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/punch_items":{"get":{"operationId":"listPunchItems","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[status]","schema":{"enum":["open","closed","pending"],"type":"string"}},{"in":"query","name":"filters[priority]","schema":{"enum":["low","medium","high"],"type":"string"}},{"in":"query","name":"filters[punch_item_type_id]","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[location_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[include_sublocations]","schema":{"default":false,"type":"boolean"}},{"in":"query","name":"filters[approver_login_information_id]","schema":{"type":"integer"}},{"in":"query","name":"filters[vendor_id]","schema":{"type":"integer"}},{"in":"query","name":"filters[assignee_response]","schema":{"default":false,"type":"boolean"}},{"in":"query","name":"filters[trade_id]","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[category_id]","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"in":"query","name":"sort","schema":{"enum":["id","position","name","due","created_at","closed_at","description","priority","workflow_status","location_name","punch_item_type_name","reference","status_text","trade_name","category_name","closed_by","created_by","final_approver","punch_item_manager"],"type":"string"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"filters[view]","required":false,"schema":{"enum":["my_items"],"type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"explode":true,"in":"query","name":"filters[closed_at][]","required":false,"schema":{"items":{"format":"date","type":"string"},"type":"array"}},{"explode":true,"in":"query","name":"filters[created_at][]","required":false,"schema":{"items":{"format":"date","type":"string"},"type":"array"}},{"explode":true,"in":"query","name":"filters[date_notified][]","required":false,"schema":{"items":{"format":"date","type":"string"},"type":"array"}},{"explode":true,"in":"query","name":"filters[due_date][]","required":false,"schema":{"items":{"format":"date","type":"string"},"type":"array"}},{"in":"query","name":"filters[failed_items_by_operation_id]","required":false,"schema":{"type":"integer"}},{"in":"query","name":"filters[error_category]","required":false,"schema":{"oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"altitude":{"default":null,"type":"string"},"assignees":{"items":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"assignments":{"items":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"id":{"type":"integer"},"login_information":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"login_information_id":{"type":"integer"},"login_information_name":{"type":"string"},"manager_accepted_at":{"format":"date-time","type":"string"},"notified_at":{"format":"date-time","type":"string"},"responded_at":{"format":"date-time","type":"string"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"user_name":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"category":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Category","type":"object"},"closed_at":{"format":"date-time","type":"string"},"closed_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"cost_impact_amount":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"enum":["DRAFT","OPEN","CLOSED"],"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"legacy_workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"nullable":true,"type":"string"},"name":{"type":"string"}},"title":"Punch Item Custom Status","type":"object"},"custom_status_id":{"nullable":true,"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"final_approver":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"has_resolved_responses":{"type":"boolean"},"has_unresolved_responses":{"type":"boolean"},"horizontal_accuracy":{"default":null,"type":"string"},"id":{"type":"integer"},"latitude":{"default":null,"type":"string"},"location":{"nullable":true,"properties":{"code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"longitude":{"default":null,"type":"string"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"punch_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Type","type":"object"},"reference":{"type":"string"},"schedule_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"schedule_risk_confidence":{"type":"integer"},"schedule_risk_probability":{"type":"integer"},"schedule_risk_reason":{"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"vertical_accuracy":{"default":null,"type":"string"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"title":"Punch Item","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Punch Items","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true},"post":{"operationId":"createPunchItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"punch_item":{"properties":{"category_id":{"nullable":true,"type":"integer"},"cost_code_id":{"type":"integer"},"cost_impact":{"type":"string"},"cost_impact_amount":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_status_id":{"nullable":true,"type":"integer"},"date_initiated":{"format":"date","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"due":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"final_approver_id":{"type":"integer"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"location_id":{"type":"integer"},"login_information_ids":{"items":{"type":"integer"},"type":"array"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager_id":{"type":"integer"},"punch_item_type_id":{"type":"integer"},"reference":{"type":"string"},"schedule_impact":{"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"required":["name"],"title":"Punch Item","type":"object"}},"required":["project_id","punch_item"],"title":"Punch Item Body","type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"project_id":{"type":"integer"},"punch_item":{"properties":{"category_id":{"nullable":true,"type":"integer"},"cost_code_id":{"type":"integer"},"cost_impact":{"type":"string"},"cost_impact_amount":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_status_id":{"nullable":true,"type":"integer"},"date_initiated":{"format":"date","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"due":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"final_approver_id":{"type":"integer"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"images":{"items":{"type":"string"},"type":"array"},"location_id":{"type":"integer"},"login_information_ids":{"items":{"type":"integer"},"type":"array"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager_id":{"type":"integer"},"punch_item_type_id":{"type":"integer"},"reference":{"type":"string"},"schedule_impact":{"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"required":["name"],"title":"Punch Item","type":"object"}},"required":["project_id","punch_item"],"title":"Punch Item Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"assignments":{"items":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"formatted_status":{"type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"notified_at":{"format":"date","type":"string"},"ready_for_review_at":{"format":"date","type":"string"},"updated_at":{"format":"date","type":"string"},"work_not_accepted_at":{"format":"date","type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"attached_to_item_id":{"nullable":true,"type":"integer"},"attached_to_item_type":{"nullable":true,"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"can_email":{"type":"boolean"},"category":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Category","type":"object"},"closed_at":{"format":"date-time","type":"string"},"closed_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Closed By","type":"object"},"comments":{"items":{"properties":{"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Comment","type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"cost_impact_amount":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"enum":["DRAFT","OPEN","CLOSED"],"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"legacy_workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"nullable":true,"type":"string"},"name":{"type":"string"}},"title":"Punch Item Custom Status","type":"object"},"date_initiated":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"distribution_members":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"download_all_attachments_uuid":{"type":"string"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"final_approver":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Final Approver","type":"object"},"id":{"type":"integer"},"images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Manager","type":"object"},"punch_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Type","type":"object"},"reference":{"type":"string"},"rich_text_description":{"type":"string"},"schedule_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"type":"string"},"schedule_risk_reason":{"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"web_images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"title":"Punch Item","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Punch Item","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/punch_items/bulk_create":{"post":{"description":"Create up to 100 punch items in one project. Each item is the `punch_item` body of POST /punch_items and runs through the same checks. Items run in order; a failing item does not roll back the others. Successful items have status 201. With Idempotency-Key, a retried batch replays the first response; retry only the failed items with a new key.","operationId":"createPunchItemsBulkCreate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"punch_items":{"items":{"properties":{"category_id":{"nullable":true,"type":"integer"},"cost_code_id":{"type":"integer"},"cost_impact":{"type":"string"},"cost_impact_amount":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_status_id":{"nullable":true,"type":"integer"},"date_initiated":{"format":"date","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"due":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"final_approver_id":{"type":"integer"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"location_id":{"type":"integer"},"login_information_ids":{"items":{"type":"integer"},"type":"array"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager_id":{"type":"integer"},"punch_item_type_id":{"type":"integer"},"reference":{"type":"string"},"schedule_impact":{"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"required":["name"],"title":"Punch Item","type":"object"},"maxItems":100,"minItems":1,"type":"array"}},"required":["project_id","punch_items"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/punch_list_PunchItem"}],"description":"The record as the single-record route returns it (successful items only)."},"errors":{"description":"Failed items only: a message list or a field -> messages map (422).","oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]},"id":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]},"index":{"description":"Position of the item in the request array.","type":"integer"},"status":{"description":"HTTP-style status of this item: 200/201 on success, 4xx on failure.","type":"integer"}},"required":["index","status"],"type":"object"},"type":"array"},"summary":{"properties":{"failed":{"type":"integer"},"succeeded":{"type":"integer"},"total":{"type":"integer"}},"required":["total","succeeded","failed"],"type":"object"}},"required":["results","summary"],"type":"object"}}},"description":"Per-item results."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Malformed envelope."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"More than 100 items."}},"summary":"Bulk create punch items","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/punch_items/bulk_update":{"patch":{"description":"Update up to 100 punch items. Each item carries the record `id` and the fields to change, and runs through the same checks as PATCH /punch_items/{id}. Items run in order; a failing item does not roll back the others. With Idempotency-Key, a retried batch replays the first response; retry only the failed items with a new key.","operationId":"updatePunchItemsBulkUpdate","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"punch_items":{"items":{"properties":{"category_id":{"nullable":true,"type":"integer"},"cost_impact":{"type":"string"},"cost_impact_amount":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_status_id":{"nullable":true,"type":"integer"},"date_initiated":{"format":"date","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"due":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"final_approver_id":{"type":"integer"},"form_ids":{"items":{"type":"integer"},"type":"array"},"id":{"description":"The record to update.","type":"integer"},"image_ids":{"items":{"type":"integer"},"type":"array"},"location_id":{"type":"integer"},"login_information_ids":{"items":{"type":"integer"},"type":"array"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager_id":{"type":"integer"},"punch_item_type_id":{"type":"integer"},"reference":{"type":"string"},"schedule_impact":{"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"required":["id"],"title":"Punch Item","type":"object"},"maxItems":100,"minItems":1,"type":"array"}},"required":["project_id","punch_items"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"results":{"items":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/punch_list_PunchItem"}],"description":"The record as the single-record route returns it (successful items only)."},"errors":{"description":"Failed items only: a message list or a field -> messages map (422).","oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]},"id":{"nullable":true,"oneOf":[{"type":"integer"},{"type":"string"}]},"index":{"description":"Position of the item in the request array.","type":"integer"},"status":{"description":"HTTP-style status of this item: 200/201 on success, 4xx on failure.","type":"integer"}},"required":["index","status"],"type":"object"},"type":"array"},"summary":{"properties":{"failed":{"type":"integer"},"succeeded":{"type":"integer"},"total":{"type":"integer"}},"required":["total","succeeded","failed"],"type":"object"}},"required":["results","summary"],"type":"object"}}},"description":"Per-item results."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Malformed envelope."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"More than 100 items."}},"summary":"Bulk update punch items","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/punch_items/recycle_bin":{"get":{"operationId":"listPunchItemsRecycleBin","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[status]","schema":{"enum":["open","closed","pending"],"type":"string"}},{"in":"query","name":"filters[priority]","schema":{"enum":["low","medium","high"],"type":"string"}},{"in":"query","name":"filters[punch_item_type_id]","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[location_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[include_sublocations]","schema":{"default":false,"type":"boolean"}},{"in":"query","name":"filters[approver_login_information_id]","schema":{"type":"integer"}},{"in":"query","name":"filters[vendor_id]","schema":{"type":"integer"}},{"in":"query","name":"filters[assignee_response]","schema":{"default":false,"type":"boolean"}},{"in":"query","name":"filters[trade_id]","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[category_id]","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"in":"query","name":"sort","schema":{"enum":["id","position","name","due","created_at","closed_at","description","priority","workflow_status","location_name","punch_item_type_name","reference","status_text","trade_name","category_name","closed_by","created_by","final_approver","punch_item_manager"],"type":"string"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[query]","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"altitude":{"default":null,"type":"string"},"assignees":{"items":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"assignments":{"items":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"id":{"type":"integer"},"login_information":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"login_information_id":{"type":"integer"},"login_information_name":{"type":"string"},"manager_accepted_at":{"format":"date-time","type":"string"},"notified_at":{"format":"date-time","type":"string"},"responded_at":{"format":"date-time","type":"string"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"user_name":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"category":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Category","type":"object"},"closed_at":{"format":"date-time","type":"string"},"closed_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"cost_impact_amount":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"enum":["DRAFT","OPEN","CLOSED"],"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"legacy_workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"nullable":true,"type":"string"},"name":{"type":"string"}},"title":"Punch Item Custom Status","type":"object"},"custom_status_id":{"nullable":true,"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"final_approver":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"has_resolved_responses":{"type":"boolean"},"has_unresolved_responses":{"type":"boolean"},"horizontal_accuracy":{"default":null,"type":"string"},"id":{"type":"integer"},"latitude":{"default":null,"type":"string"},"location":{"nullable":true,"properties":{"code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"longitude":{"default":null,"type":"string"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"punch_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Type","type":"object"},"reference":{"type":"string"},"schedule_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"schedule_risk_confidence":{"type":"integer"},"schedule_risk_probability":{"type":"integer"},"schedule_risk_reason":{"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"vertical_accuracy":{"default":null,"type":"string"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"title":"Punch Item","type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Deleted Punch Items","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v1.0/punch_items/send_all_unsent":{"post":{"operationId":"createPunchItemsSendAllUnsent","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"punch_ids":{"items":{"type":"integer"},"type":"array"},"recipient":{"enum":["assignee","manager"],"type":"string"}},"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Send All Unsent Punch Item Emails","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/punch_items/send_unsent":{"post":{"operationId":"createPunchItemsSendUnsent","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"}},"required":["project_id"],"type":"object"}}},"required":true},"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Send unsent Punch Items","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/punch_items/{id}":{"delete":{"operationId":"deletePunchItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Punch Item","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false},"get":{"operationId":"getPunchItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"include_deleted","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignments":{"items":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"formatted_status":{"type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"notified_at":{"format":"date","type":"string"},"ready_for_review_at":{"format":"date","type":"string"},"updated_at":{"format":"date","type":"string"},"work_not_accepted_at":{"format":"date","type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"attached_to_item_id":{"nullable":true,"type":"integer"},"attached_to_item_type":{"nullable":true,"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"can_email":{"type":"boolean"},"category":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Category","type":"object"},"closed_at":{"format":"date-time","type":"string"},"closed_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Closed By","type":"object"},"comments":{"items":{"properties":{"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Comment","type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"cost_impact_amount":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"enum":["DRAFT","OPEN","CLOSED"],"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"legacy_workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"nullable":true,"type":"string"},"name":{"type":"string"}},"title":"Punch Item Custom Status","type":"object"},"date_initiated":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"distribution_members":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"download_all_attachments_uuid":{"type":"string"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"final_approver":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Final Approver","type":"object"},"id":{"type":"integer"},"images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Manager","type":"object"},"punch_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Type","type":"object"},"reference":{"type":"string"},"rich_text_description":{"type":"string"},"schedule_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"type":"string"},"schedule_risk_reason":{"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"web_images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"title":"Punch Item","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Punch Item","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":false},"patch":{"operationId":"updatePunchItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"punch_item":{"properties":{"category_id":{"nullable":true,"type":"integer"},"cost_impact":{"type":"string"},"cost_impact_amount":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_status_id":{"nullable":true,"type":"integer"},"date_initiated":{"format":"date","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"due":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"final_approver_id":{"type":"integer"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"location_id":{"type":"integer"},"login_information_ids":{"items":{"type":"integer"},"type":"array"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager_id":{"type":"integer"},"punch_item_type_id":{"type":"integer"},"reference":{"type":"string"},"schedule_impact":{"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"required":["name"],"title":"Punch Item","type":"object"}},"required":["project_id","punch_item"],"title":"Punch Item Body","type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"project_id":{"type":"integer"},"punch_item":{"properties":{"category_id":{"nullable":true,"type":"integer"},"cost_impact":{"type":"string"},"cost_impact_amount":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_status_id":{"nullable":true,"type":"integer"},"date_initiated":{"format":"date","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"due":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"final_approver_id":{"type":"integer"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"images":{"items":{"type":"string"},"type":"array"},"location_id":{"type":"integer"},"login_information_ids":{"items":{"type":"integer"},"type":"array"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager_id":{"type":"integer"},"punch_item_type_id":{"type":"integer"},"reference":{"type":"string"},"schedule_impact":{"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"required":["name"],"title":"Punch Item","type":"object"}},"required":["project_id","punch_item"],"title":"Punch Item Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignments":{"items":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"formatted_status":{"type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"notified_at":{"format":"date","type":"string"},"ready_for_review_at":{"format":"date","type":"string"},"updated_at":{"format":"date","type":"string"},"work_not_accepted_at":{"format":"date","type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"attached_to_item_id":{"nullable":true,"type":"integer"},"attached_to_item_type":{"nullable":true,"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"can_email":{"type":"boolean"},"category":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Category","type":"object"},"closed_at":{"format":"date-time","type":"string"},"closed_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Closed By","type":"object"},"comments":{"items":{"properties":{"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Comment","type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"cost_impact_amount":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"enum":["DRAFT","OPEN","CLOSED"],"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"legacy_workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"nullable":true,"type":"string"},"name":{"type":"string"}},"title":"Punch Item Custom Status","type":"object"},"date_initiated":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"distribution_members":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"download_all_attachments_uuid":{"type":"string"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"final_approver":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Final Approver","type":"object"},"id":{"type":"integer"},"images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Manager","type":"object"},"punch_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Type","type":"object"},"reference":{"type":"string"},"rich_text_description":{"type":"string"},"schedule_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"type":"string"},"schedule_risk_reason":{"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"web_images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"title":"Punch Item","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Punch Item","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/punch_items/{id}/activities":{"get":{"operationId":"listPunchItemActivities","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"assignee":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"login_information_id":{"type":"integer"},"login_information_name":{"type":"string"},"manager_accepted_at":{"type":"string"},"notified_at":{"type":"string"},"responded_at":{"type":"string"},"updated_at":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"created_at":{"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Activity Creator","type":"object"},"global_status":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"enum":["DRAFT","OPEN","CLOSED"],"type":"string"}},"type":"object"},"id":{"type":"integer"},"status":{"title":"Punch Item Activity Status","type":"string"},"type":{"title":"Punch Item Activity Type","type":"string"},"updated_at":{"type":"string"}},"type":"object"},"title":"Punch Item Activities","type":"array"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Punch Item Activities","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/punch_items/{id}/comments":{"post":{"operationId":"createPunchItemComment","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"comment":{"properties":{"body":{"type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"}},"required":["body"],"title":"Comment","type":"object"}},"required":["comment"],"title":"Punch Item Comment Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"attached_to_item_id":{"nullable":true,"type":"integer"},"attached_to_item_type":{"nullable":true,"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"body":{"type":"string"},"created_at":{"type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Comment Creator","type":"object"},"id":{"type":"integer"},"type":{"title":"Type of Punch Item Activity","type":"string"}},"title":"Punch Item Comment","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Punch Item Comment","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/punch_items/{id}/send_email":{"post":{"operationId":"sendEmailPunchItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bcc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"body":{"type":"string"},"cc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"subject":{"type":"string"}},"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Send Punch Item Email","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.0/punch_list/default_distribution":{"get":{"operationId":"listPunchListDefaultDistribution","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"title":"Array of Punch Item Default Distribution","type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Punch Item Default Distribution List","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v1.0/purchase_order_contracts":{"get":{"operationId":"listPurchaseOrderContracts","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","schema":{"enum":["compact","extended"],"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[status]","schema":{"enum":["Draft","Processing","Submitted","Partially Received","Received","Approved","Closed"],"type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[include_deleted]","required":false,"schema":{"enum":["only","with"],"type":"string"}},{"in":"query","name":"filters[origin_id]","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"approval_letter_date":{"type":"string"},"approved_change_orders":{"type":"string"},"assignee":{"properties":{"id":{"type":"integer"}},"type":"object"},"bill_to_address":{"type":"string"},"billing_schedule_of_values_status":{"enum":["draft","submitted","under_review","revise_and_resubmit","approved"],"type":"string"},"contract_date":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"delivery_date":{"format":"date","type":"string"},"draft_change_orders_amount":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"has_change_order_packages":{"type":"boolean"},"has_potential_change_orders":{"type":"boolean"},"id":{"type":"integer"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"},"payment_terms":{"type":"string"},"pending_change_orders":{"type":"string"},"pending_revised_contract":{"type":"string"},"percentage_paid":{"type":"string"},"private":{"type":"boolean"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"remaining_balance_outstanding":{"type":"string"},"requisitions_are_enabled":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract":{"type":"string"},"ship_to_address":{"type":"string"},"ship_via":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Processing","Submitted","Partially Received","Received","Approved","Closed"],"type":"string"},"title":{"type":"string"},"total_draw_requests_amount":{"type":"string"},"total_payments":{"type":"string"},"total_requisitions_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"company":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List of Purchase Order Contracts","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":true},"post":{"operationId":"createPurchaseOrderContract","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"project_id":{"type":"integer"},"purchase_order_contract":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"approval_letter_date":{"type":"string"},"assignee_id":{"type":"integer"},"bill_to_address":{"type":"string"},"contract_date":{"format":"date","type":"string"},"currency_exchange_rate":{"type":"number"},"currency_iso_code":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"delivery_date":{"format":"date","type":"string"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"invoice_contact_user_ids":{"items":{"type":"integer"},"type":"array"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"payment_terms":{"type":"string"},"private":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"ship_to_address":{"type":"string"},"ship_via":{"type":"string"},"status":{"enum":["Draft","Processing","Submitted","Partially Received","Received","Approved","Closed"],"type":"string"},"title":{"nullable":true,"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"},"vendor_id":{"type":"integer"}},"title":"Purchase Order Contract","type":"object"}},"required":["project_id","purchase_order_contract"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"allow_change_orders_ssov":{"type":"boolean"},"approval_letter_date":{"type":"string"},"approved_change_orders":{"type":"string"},"assignee":{"properties":{"id":{"type":"integer"}},"type":"object"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bill_to_address":{"type":"string"},"billing_schedule_of_values_status":{"enum":["draft","submitted","under_review","revise_and_resubmit","approved"],"type":"string"},"change_order_packages":{"items":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"signed_change_order_received_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"change_order_requests":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"contract_date":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"delivery_date":{"format":"date","type":"string"},"draft_change_orders_amount":{"type":"string"},"enable_ssov":{"type":"boolean"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"has_change_order_packages":{"type":"boolean"},"has_potential_change_orders":{"type":"boolean"},"id":{"type":"integer"},"invoice_contacts":{"items":{"properties":{"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"email":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"id":{"type":"integer"},"job_title":{"nullable":true,"type":"string"},"login_information_id":{"type":"integer"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"vendor_name":{"type":"string"}},"type":"object"},"type":"array"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"},"payment_terms":{"type":"string"},"payments_issued":{"items":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"check_number":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"date":{"format":"date","type":"string"},"draw_request_number":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_number":{"type":"integer"}},"type":"object"},"type":"array"},"pending_change_orders":{"type":"string"},"pending_revised_contract":{"type":"string"},"percentage_paid":{"type":"string"},"potential_change_orders":{"items":{"items":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"type":"array"},"private":{"type":"boolean"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"remaining_balance_outstanding":{"type":"string"},"requisitions_are_enabled":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract":{"type":"string"},"ship_to_address":{"type":"string"},"ship_via":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Processing","Submitted","Partially Received","Received","Approved","Closed"],"type":"string"},"title":{"type":"string"},"total_draw_requests_amount":{"type":"string"},"total_payments":{"type":"string"},"total_requisitions_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"company":{"type":"string"},"id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"}},"type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Purchase Order Contract","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/purchase_order_contracts/{id}":{"delete":{"operationId":"deletePurchaseOrderContract","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Purchase Order Contract","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false},"get":{"operationId":"getPurchaseOrderContract","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"allow_change_orders_ssov":{"type":"boolean"},"approval_letter_date":{"type":"string"},"approved_change_orders":{"type":"string"},"assignee":{"properties":{"id":{"type":"integer"}},"type":"object"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bill_to_address":{"type":"string"},"billing_schedule_of_values_status":{"enum":["draft","submitted","under_review","revise_and_resubmit","approved"],"type":"string"},"change_order_packages":{"items":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"signed_change_order_received_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"change_order_requests":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"contract_date":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"delivery_date":{"format":"date","type":"string"},"draft_change_orders_amount":{"type":"string"},"enable_ssov":{"type":"boolean"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"has_change_order_packages":{"type":"boolean"},"has_potential_change_orders":{"type":"boolean"},"id":{"type":"integer"},"invoice_contacts":{"items":{"properties":{"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"email":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"id":{"type":"integer"},"job_title":{"nullable":true,"type":"string"},"login_information_id":{"type":"integer"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"vendor_name":{"type":"string"}},"type":"object"},"type":"array"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"},"payment_terms":{"type":"string"},"payments_issued":{"items":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"check_number":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"date":{"format":"date","type":"string"},"draw_request_number":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_number":{"type":"integer"}},"type":"object"},"type":"array"},"pending_change_orders":{"type":"string"},"pending_revised_contract":{"type":"string"},"percentage_paid":{"type":"string"},"potential_change_orders":{"items":{"items":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"type":"array"},"private":{"type":"boolean"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"remaining_balance_outstanding":{"type":"string"},"requisitions_are_enabled":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract":{"type":"string"},"ship_to_address":{"type":"string"},"ship_via":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Processing","Submitted","Partially Received","Received","Approved","Closed"],"type":"string"},"title":{"type":"string"},"total_draw_requests_amount":{"type":"string"},"total_payments":{"type":"string"},"total_requisitions_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"company":{"type":"string"},"id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Purchase Order Contract","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false},"patch":{"operationId":"updatePurchaseOrderContract","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"project_id":{"type":"integer"},"purchase_order_contract":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"approval_letter_date":{"type":"string"},"assignee_id":{"type":"integer"},"bill_to_address":{"type":"string"},"contract_date":{"format":"date","type":"string"},"currency_exchange_rate":{"type":"number"},"currency_iso_code":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"delivery_date":{"format":"date","type":"string"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"invoice_contact_user_ids":{"items":{"type":"integer"},"type":"array"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"payment_terms":{"type":"string"},"private":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"ship_to_address":{"type":"string"},"ship_via":{"type":"string"},"status":{"enum":["Draft","Processing","Submitted","Partially Received","Received","Approved","Closed"],"type":"string"},"title":{"nullable":true,"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"},"vendor_id":{"type":"integer"}},"title":"Purchase Order Contract","type":"object"}},"required":["project_id","purchase_order_contract"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"allow_change_orders_ssov":{"type":"boolean"},"approval_letter_date":{"type":"string"},"approved_change_orders":{"type":"string"},"assignee":{"properties":{"id":{"type":"integer"}},"type":"object"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"bill_to_address":{"type":"string"},"billing_schedule_of_values_status":{"enum":["draft","submitted","under_review","revise_and_resubmit","approved"],"type":"string"},"change_order_packages":{"items":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"signed_change_order_received_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"change_order_requests":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"contract_date":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"delivery_date":{"format":"date","type":"string"},"draft_change_orders_amount":{"type":"string"},"enable_ssov":{"type":"boolean"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"has_change_order_packages":{"type":"boolean"},"has_potential_change_orders":{"type":"boolean"},"id":{"type":"integer"},"invoice_contacts":{"items":{"properties":{"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"email":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"id":{"type":"integer"},"job_title":{"nullable":true,"type":"string"},"login_information_id":{"type":"integer"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"vendor_name":{"type":"string"}},"type":"object"},"type":"array"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"},"payment_terms":{"type":"string"},"payments_issued":{"items":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"check_number":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"date":{"format":"date","type":"string"},"draw_request_number":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_number":{"type":"integer"}},"type":"object"},"type":"array"},"pending_change_orders":{"type":"string"},"pending_revised_contract":{"type":"string"},"percentage_paid":{"type":"string"},"potential_change_orders":{"items":{"items":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"type":"array"},"private":{"type":"boolean"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"remaining_balance_outstanding":{"type":"string"},"requisitions_are_enabled":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract":{"type":"string"},"ship_to_address":{"type":"string"},"ship_via":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Processing","Submitted","Partially Received","Received","Approved","Closed"],"type":"string"},"title":{"type":"string"},"total_draw_requests_amount":{"type":"string"},"total_payments":{"type":"string"},"total_requisitions_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"company":{"type":"string"},"id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"}},"type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Purchase Order Contract","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/purchase_order_contracts/{id}/subcontractor_schedule_of_values_status":{"patch":{"description":"Requires commitments:write, live Commitments access and both update and schedule-of-values permission on the contract. From draft, move to under_review. Under review can move to approved, revise_and_resubmit or draft. A revision can move to under_review or draft. An approved schedule can reopen to under_review. Repeating the current status is supported.","operationId":"updatePurchaseOrderContractSubcontractorScheduleOfValuesStatus","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record. Supply either this query parameter or the JSON body project_id. A valid query value takes precedence.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_SsovPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_SsovStatus"}}},"description":"Current review status."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ValidationErrors"}}},"description":"The request fields are invalid."}},"summary":"Change the purchase order schedule-of-values review status","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/purchase_order_contracts/{purchase_order_contract_id}/line_items":{"get":{"operationId":"listPurchaseOrderContractLineItems","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"purchase_order_contract_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[cost_code_id]","schema":{"type":"string"}},{"in":"query","name":"filters[line_item_type_id]","required":false,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["default","ssov_source_lines"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"oneOf":[{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"},{"properties":{"amount":{"type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"id":{"type":"integer"},"position":{"type":"integer"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"ssov_source_lines","type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Purchase Order Contract Line Items","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":true},"post":{"operationId":"createPurchaseOrderContractLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"purchase_order_contract_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"line_item":{"properties":{"amount":{"type":"string"},"cost_code_id":{"type":"integer"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"line_item_type_id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"type":"string"},"tax_code_id":{"type":"integer"},"unit_cost":{"type":"string"},"uom":{"type":"string"},"wbs_code_id":{"type":"integer"}},"title":"Line Item","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","line_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Purchase Order Contract Line Item","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/purchase_order_contracts/{purchase_order_contract_id}/line_items/{id}":{"delete":{"operationId":"deletePurchaseOrderContractLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"purchase_order_contract_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Purchase Order Contract Line Item","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false},"get":{"operationId":"getPurchaseOrderContractLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"purchase_order_contract_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["default","ssov_source_lines"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"},{"properties":{"amount":{"type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"id":{"type":"integer"},"position":{"type":"integer"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"ssov_source_lines","type":"object"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Purchase Order Contract Line Item","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false},"patch":{"operationId":"updatePurchaseOrderContractLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"purchase_order_contract_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"line_item":{"properties":{"amount":{"type":"string"},"cost_code_id":{"type":"integer"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"line_item_type_id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"type":"string"},"tax_code_id":{"type":"integer"},"unit_cost":{"type":"string"},"uom":{"type":"string"},"wbs_code_id":{"type":"integer"}},"title":"Line Item","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","line_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Purchase Order Contract Line Item","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/requisitions":{"get":{"operationId":"listRequisitions","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[commitment_id]","schema":{"type":"integer"}},{"in":"query","name":"filters[period_id]","schema":{"type":"integer"}},{"in":"query","name":"filters[status]","schema":{"enum":["draft","submitted","under_review","revise_and_resubmit","approved","approved_as_noted","pending_owner_approval"],"type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[origin_id]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[search]","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"action_policy":{"allOf":[{"properties":{"controls":{"type":"object"}},"type":"object"},{}]},"attachments":{"items":{"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"billing_date":{"format":"date","type":"string"},"comment":{"nullable":true,"type":"string"},"commitment_id":{"type":"integer"},"commitment_type":{"type":"string"},"contract_invoicing_method":{"enum":["progressive","simplified"],"nullable":false,"type":"string"},"contract_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"currency_iso_code":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"deletable":{"type":"boolean"},"electronic_signature_id":{"type":"integer"},"erp_status":{"type":"string"},"final":{"nullable":true,"type":"boolean"},"id":{"type":"integer"},"invoice_number":{"nullable":true,"type":"string"},"invoice_type":{"enum":["progress","retainage_release","progress_and_retainage_release"],"nullable":false,"type":"string"},"move_materials_to_previous_work_completed":{"nullable":false,"type":"boolean"},"number":{"type":"integer"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"payment_date":{"format":"date","nullable":true,"type":"string"},"percent_complete":{"type":"string"},"period_id":{"type":"integer"},"project_id":{"type":"integer"},"requisition_end":{"format":"date","type":"string"},"requisition_start":{"format":"date","type":"string"},"status":{"enum":["draft","submitted","under_review","revise_and_resubmit","approved","approved_as_noted","pending_owner_approval"],"type":"string"},"submitted_at":{"format":"date","nullable":true,"type":"string"},"summary":{"properties":{"balance_to_finish_including_retainage":{"type":"string"},"completed_work_retainage_amount":{"type":"string"},"completed_work_retainage_percent":{"type":"string"},"contract_sum_to_date":{"type":"string"},"current_payment_due":{"type":"string"},"formatted_period":{"type":"string"},"less_previous_certificates_for_payment":{"type":"string"},"negative_change_order_item_total":{"type":"string"},"negative_new_change_order_item_total":{"type":"string"},"negative_previous_change_order_item_total":{"type":"string"},"net_change_by_change_orders":{"type":"string"},"original_contract_sum":{"type":"string"},"positive_change_order_item_total":{"type":"string"},"positive_new_change_order_item_total":{"type":"string"},"positive_previous_change_order_item_total":{"type":"string"},"stored_materials_retainage_amount":{"type":"string"},"stored_materials_retainage_percent":{"type":"string"},"tax_applicable_to_this_payment":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_earned_less_retainage":{"type":"string"},"total_retainage":{"type":"string"}},"type":"object"},"total_claimed_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor_name":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Requisitions (Subcontractor Invoices) for Project","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":true},"post":{"operationId":"createRequisition","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"commitment_id":{"type":"integer"},"project_id":{"type":"integer"},"requisition":{"properties":{"billing_date":{"format":"date","type":"string"},"comment":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"final":{"type":"boolean"},"invoice_number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"period_id":{"type":"integer"},"requisition_end":{"format":"date","type":"string"},"requisition_start":{"format":"date","type":"string"},"status":{"enum":["draft","submitted","under_review","revise_and_resubmit","approved","approved_as_noted","pending_owner_approval"],"type":"string"},"submitted_at":{"format":"date","type":"string"}},"title":"Requisition (Subcontractor Invoice)","type":"object"}},"required":["project_id","commitment_id"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"action_policy":{"allOf":[{"properties":{"controls":{"type":"object"}},"type":"object"},{}]},"attachments":{"items":{"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"billing_date":{"format":"date","type":"string"},"commitment_id":{"type":"integer"},"commitment_type":{"type":"string"},"contract_invoicing_method":{"enum":["progressive","simplified"],"nullable":false,"type":"string"},"contract_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"base_currency_iso_code":{"type":"string"},"currency_exchange_rate":{"format":"float","type":"number"},"currency_iso_code":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"deletable":{"type":"boolean"},"electronic_signature_id":{"type":"integer"},"erp_status":{"type":"string"},"final":{"nullable":true,"type":"boolean"},"id":{"type":"integer"},"invoice_number":{"nullable":true,"type":"string"},"invoice_type":{"enum":["progress","retainage_release","progress_and_retainage_release"],"nullable":false,"type":"string"},"item_packages":{"items":{"properties":{"batch":{"properties":{"change_order_acronym_number":{"type":"string"},"id":{"nullable":true,"type":"integer"},"title":{"nullable":true,"type":"string"}},"type":"object"},"change_order_acronym_number":{"type":"string"},"change_order_id":{"nullable":true,"type":"integer"},"change_order_request":{"properties":{"change_order_acronym_number":{"type":"string"},"id":{"nullable":true,"type":"integer"},"title":{"nullable":true,"type":"string"}},"type":"object"},"contract_id":{"type":"integer"},"id":{"type":"integer"},"number":{"nullable":true,"type":"string"},"position":{"type":"integer"},"status":{"type":"string"},"title":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"items":{"items":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"comment":{"nullable":true,"type":"string"},"cost_code_id":{"nullable":true,"type":"integer"},"currency_configuration":{"properties":{"base_currency_iso_code":{"type":"string"},"currency_exchange_rate":{"format":"float","type":"number"},"currency_iso_code":{"type":"string"}},"type":"object"},"description_of_work":{"nullable":true,"type":"string"},"gross_amount":{"type":"string"},"id":{"type":"integer"},"item_type":{"deprecated":true,"type":"string"},"item_type_v2":{"enum":["contract_item","change_order_detail_item","change_order_item","contract_detail_item","whole_change_order_item"],"type":"string"},"line_item_id":{"type":"integer"},"line_number":{"type":"string"},"materials_moved":{"type":"string"},"materials_presently_stored":{"type":"string"},"materials_presently_stored_from_previous_progress":{"type":"string"},"materials_presently_stored_quantity":{"type":"string"},"materials_previously_stored_quantity":{"type":"string"},"materials_retainage_retained_moved":{"type":"string"},"materials_stored_retainage_currently_retained":{"type":"string"},"materials_stored_retainage_new_materials":{"type":"string"},"materials_stored_retainage_percent_this_period":{"type":"string"},"materials_stored_retainage_released_this_period":{"type":"string"},"net_amount":{"type":"string"},"position":{"type":"integer"},"previous_progress_id":{"type":"integer"},"scheduled_quantity":{"type":"string"},"scheduled_unit_price":{"type":"string"},"scheduled_value":{"type":"string"},"ssr_manual_override":{"type":"boolean"},"status":{"type":"string"},"subcontractor_claimed_amount":{"type":"string"},"taxes":{"items":{"properties":{"tax_code_id":{"type":"integer"},"tax_code_name":{"type":"string"},"tax_code_rate":{"format":"float","type":"number"}},"type":"object"},"type":"array"},"total_completed_and_stored_to_date":{"type":"string"},"total_completed_and_stored_to_date_from_previous":{"type":"string"},"total_completed_and_stored_to_date_percent":{"type":"string"},"uom":{"type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"},"segment_items":{"items":{"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"path_codes":{"items":{"type":"string"},"type":"array"},"path_ids":{"items":{"type":"integer"},"type":"array"},"segment_id":{"type":"integer"},"segment_type":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"work_completed_from_previous_application":{"type":"string"},"work_completed_from_previous_application_quantity":{"type":"string"},"work_completed_retainage_from_previous_application":{"type":"string"},"work_completed_retainage_percent_this_period":{"type":"string"},"work_completed_retainage_released_this_period":{"type":"string"},"work_completed_retainage_retained_this_period":{"type":"string"},"work_completed_this_period":{"type":"string"},"work_completed_this_period_quantity":{"type":"string"}},"type":"object"},"type":"array"},"move_materials_to_previous_work_completed":{"type":"boolean"},"number":{"type":"integer"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"payment_date":{"format":"date","nullable":true,"type":"string"},"percent_complete":{"type":"string"},"period_id":{"type":"integer"},"previous_requisition_id":{"type":"integer"},"project_id":{"type":"integer"},"requisition_end":{"format":"date","type":"string"},"requisition_start":{"format":"date","type":"string"},"status":{"enum":["draft","submitted","under_review","revise_and_resubmit","approved","approved_as_noted","pending_owner_approval"],"type":"string"},"submitted_at":{"format":"date","nullable":true,"type":"string"},"subtiers_certified_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"summary":{"properties":{"balance_to_finish_including_retainage":{"type":"string"},"completed_work_retainage_amount":{"type":"string"},"completed_work_retainage_percent":{"type":"string"},"contract_sum_to_date":{"type":"string"},"current_payment_due":{"type":"string"},"formatted_period":{"type":"string"},"less_previous_certificates_for_payment":{"type":"string"},"negative_change_order_item_total":{"type":"string"},"negative_new_change_order_item_total":{"type":"string"},"negative_previous_change_order_item_total":{"type":"string"},"net_change_by_change_orders":{"type":"string"},"new_materials":{"type":"string"},"new_materials_quantity":{"type":"string"},"original_contract_sum":{"type":"string"},"positive_change_order_item_total":{"type":"string"},"positive_new_change_order_item_total":{"type":"string"},"positive_previous_change_order_item_total":{"type":"string"},"stored_materials":{"type":"string"},"stored_materials_quantity":{"type":"string"},"stored_materials_retainage_amount":{"type":"string"},"stored_materials_retainage_percent":{"type":"string"},"tax_applicable_to_this_payment":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_earned_less_retainage":{"type":"string"},"total_retainage":{"type":"string"}},"type":"object"},"summary_text":{"properties":{"application_number":{"type":"string"},"contract_date":{"format":"date","type":"string"},"contract_for":{"type":"string"},"project_name":{"type":"string"},"project_number":{"type":"string"},"requisition_period_end":{"format":"date","type":"string"},"requisition_period_start":{"format":"date","type":"string"},"subcontractor_city":{"type":"string"},"subcontractor_country_code":{"type":"string"},"subcontractor_name":{"type":"string"},"subcontractor_state_code":{"type":"string"},"subcontractor_street":{"type":"string"},"subcontractor_zip":{"type":"string"},"to_general_contractor":{"type":"string"}},"type":"object"},"tax_summary":{"items":{"properties":{"applied_amount":{"type":"number"},"tax_code_id":{"type":"integer"},"tax_code_name":{"type":"string"},"tax_code_rate":{"type":"number"}},"type":"object"},"type":"array"},"total_claimed_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor_id":{"type":"integer"},"vendor_name":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"exception":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Requisition (Subcontractor Invoices) for Commitment","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/requisitions/{id}":{"delete":{"operationId":"deleteRequisition","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"exception":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Requisition (Subcontractor Invoice)","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false},"get":{"operationId":"getRequisition","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"action_policy":{"allOf":[{"properties":{"controls":{"type":"object"}},"type":"object"},{}]},"attachments":{"items":{"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"billing_date":{"format":"date","type":"string"},"comment":{"nullable":true,"type":"string"},"commitment_id":{"type":"integer"},"commitment_type":{"type":"string"},"contract_invoicing_method":{"enum":["progressive","simplified"],"nullable":false,"type":"string"},"contract_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"currency_iso_code":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"deletable":{"type":"boolean"},"electronic_signature_id":{"type":"integer"},"erp_status":{"type":"string"},"final":{"nullable":true,"type":"boolean"},"id":{"type":"integer"},"invoice_number":{"nullable":true,"type":"string"},"invoice_type":{"enum":["progress","retainage_release","progress_and_retainage_release"],"nullable":false,"type":"string"},"move_materials_to_previous_work_completed":{"nullable":false,"type":"boolean"},"number":{"type":"integer"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"payment_date":{"format":"date","nullable":true,"type":"string"},"percent_complete":{"type":"string"},"period_id":{"type":"integer"},"project_id":{"type":"integer"},"requisition_end":{"format":"date","type":"string"},"requisition_start":{"format":"date","type":"string"},"status":{"enum":["draft","submitted","under_review","revise_and_resubmit","approved","approved_as_noted","pending_owner_approval"],"type":"string"},"submitted_at":{"format":"date","nullable":true,"type":"string"},"summary":{"properties":{"balance_to_finish_including_retainage":{"type":"string"},"completed_work_retainage_amount":{"type":"string"},"completed_work_retainage_percent":{"type":"string"},"contract_sum_to_date":{"type":"string"},"current_payment_due":{"type":"string"},"formatted_period":{"type":"string"},"less_previous_certificates_for_payment":{"type":"string"},"negative_change_order_item_total":{"type":"string"},"negative_new_change_order_item_total":{"type":"string"},"negative_previous_change_order_item_total":{"type":"string"},"net_change_by_change_orders":{"type":"string"},"original_contract_sum":{"type":"string"},"positive_change_order_item_total":{"type":"string"},"positive_new_change_order_item_total":{"type":"string"},"positive_previous_change_order_item_total":{"type":"string"},"stored_materials_retainage_amount":{"type":"string"},"stored_materials_retainage_percent":{"type":"string"},"tax_applicable_to_this_payment":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_earned_less_retainage":{"type":"string"},"total_retainage":{"type":"string"}},"type":"object"},"total_claimed_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor_name":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Requisition (Subcontractor Invoice)","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false},"patch":{"operationId":"updateRequisition","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"commitment_id":{"type":"integer"},"project_id":{"type":"integer"},"requisition":{"properties":{"billing_date":{"format":"date","type":"string"},"comment":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"final":{"type":"boolean"},"invoice_number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"period_id":{"type":"integer"},"requisition_end":{"format":"date","type":"string"},"requisition_start":{"format":"date","type":"string"},"status":{"enum":["draft","submitted","under_review","revise_and_resubmit","approved","approved_as_noted","pending_owner_approval"],"type":"string"},"submitted_at":{"format":"date","type":"string"}},"title":"Requisition (Subcontractor Invoice)","type":"object"}},"required":["project_id","commitment_id"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"action_policy":{"allOf":[{"properties":{"controls":{"type":"object"}},"type":"object"},{}]},"attachments":{"items":{"properties":{"content_type":{"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"billing_date":{"format":"date","type":"string"},"commitment_id":{"type":"integer"},"commitment_type":{"type":"string"},"contract_invoicing_method":{"enum":["progressive","simplified"],"nullable":false,"type":"string"},"contract_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"properties":{"base_currency_iso_code":{"type":"string"},"currency_exchange_rate":{"format":"float","type":"number"},"currency_iso_code":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"deletable":{"type":"boolean"},"electronic_signature_id":{"type":"integer"},"erp_status":{"type":"string"},"final":{"nullable":true,"type":"boolean"},"id":{"type":"integer"},"invoice_number":{"nullable":true,"type":"string"},"invoice_type":{"enum":["progress","retainage_release","progress_and_retainage_release"],"nullable":false,"type":"string"},"item_packages":{"items":{"properties":{"batch":{"properties":{"change_order_acronym_number":{"type":"string"},"id":{"nullable":true,"type":"integer"},"title":{"nullable":true,"type":"string"}},"type":"object"},"change_order_acronym_number":{"type":"string"},"change_order_id":{"nullable":true,"type":"integer"},"change_order_request":{"properties":{"change_order_acronym_number":{"type":"string"},"id":{"nullable":true,"type":"integer"},"title":{"nullable":true,"type":"string"}},"type":"object"},"contract_id":{"type":"integer"},"id":{"type":"integer"},"number":{"nullable":true,"type":"string"},"position":{"type":"integer"},"status":{"type":"string"},"title":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"items":{"items":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"comment":{"nullable":true,"type":"string"},"cost_code_id":{"nullable":true,"type":"integer"},"currency_configuration":{"properties":{"base_currency_iso_code":{"type":"string"},"currency_exchange_rate":{"format":"float","type":"number"},"currency_iso_code":{"type":"string"}},"type":"object"},"description_of_work":{"nullable":true,"type":"string"},"gross_amount":{"type":"string"},"id":{"type":"integer"},"item_type":{"deprecated":true,"type":"string"},"item_type_v2":{"enum":["contract_item","change_order_detail_item","change_order_item","contract_detail_item","whole_change_order_item"],"type":"string"},"line_item_id":{"type":"integer"},"line_number":{"type":"string"},"materials_moved":{"type":"string"},"materials_presently_stored":{"type":"string"},"materials_presently_stored_from_previous_progress":{"type":"string"},"materials_presently_stored_quantity":{"type":"string"},"materials_previously_stored_quantity":{"type":"string"},"materials_retainage_retained_moved":{"type":"string"},"materials_stored_retainage_currently_retained":{"type":"string"},"materials_stored_retainage_new_materials":{"type":"string"},"materials_stored_retainage_percent_this_period":{"type":"string"},"materials_stored_retainage_released_this_period":{"type":"string"},"net_amount":{"type":"string"},"position":{"type":"integer"},"previous_progress_id":{"type":"integer"},"scheduled_quantity":{"type":"string"},"scheduled_unit_price":{"type":"string"},"scheduled_value":{"type":"string"},"ssr_manual_override":{"type":"boolean"},"status":{"type":"string"},"subcontractor_claimed_amount":{"type":"string"},"taxes":{"items":{"properties":{"tax_code_id":{"type":"integer"},"tax_code_name":{"type":"string"},"tax_code_rate":{"format":"float","type":"number"}},"type":"object"},"type":"array"},"total_completed_and_stored_to_date":{"type":"string"},"total_completed_and_stored_to_date_from_previous":{"type":"string"},"total_completed_and_stored_to_date_percent":{"type":"string"},"uom":{"type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"},"segment_items":{"items":{"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"path_codes":{"items":{"type":"string"},"type":"array"},"path_ids":{"items":{"type":"integer"},"type":"array"},"segment_id":{"type":"integer"},"segment_type":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"work_completed_from_previous_application":{"type":"string"},"work_completed_from_previous_application_quantity":{"type":"string"},"work_completed_retainage_from_previous_application":{"type":"string"},"work_completed_retainage_percent_this_period":{"type":"string"},"work_completed_retainage_released_this_period":{"type":"string"},"work_completed_retainage_retained_this_period":{"type":"string"},"work_completed_this_period":{"type":"string"},"work_completed_this_period_quantity":{"type":"string"}},"type":"object"},"type":"array"},"move_materials_to_previous_work_completed":{"type":"boolean"},"number":{"type":"integer"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"payment_date":{"format":"date","nullable":true,"type":"string"},"percent_complete":{"type":"string"},"period_id":{"type":"integer"},"previous_requisition_id":{"type":"integer"},"project_id":{"type":"integer"},"requisition_end":{"format":"date","type":"string"},"requisition_start":{"format":"date","type":"string"},"status":{"enum":["draft","submitted","under_review","revise_and_resubmit","approved","approved_as_noted","pending_owner_approval"],"type":"string"},"submitted_at":{"format":"date","nullable":true,"type":"string"},"subtiers_certified_by":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"summary":{"properties":{"balance_to_finish_including_retainage":{"type":"string"},"completed_work_retainage_amount":{"type":"string"},"completed_work_retainage_percent":{"type":"string"},"contract_sum_to_date":{"type":"string"},"current_payment_due":{"type":"string"},"formatted_period":{"type":"string"},"less_previous_certificates_for_payment":{"type":"string"},"negative_change_order_item_total":{"type":"string"},"negative_new_change_order_item_total":{"type":"string"},"negative_previous_change_order_item_total":{"type":"string"},"net_change_by_change_orders":{"type":"string"},"new_materials":{"type":"string"},"new_materials_quantity":{"type":"string"},"original_contract_sum":{"type":"string"},"positive_change_order_item_total":{"type":"string"},"positive_new_change_order_item_total":{"type":"string"},"positive_previous_change_order_item_total":{"type":"string"},"stored_materials":{"type":"string"},"stored_materials_quantity":{"type":"string"},"stored_materials_retainage_amount":{"type":"string"},"stored_materials_retainage_percent":{"type":"string"},"tax_applicable_to_this_payment":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_earned_less_retainage":{"type":"string"},"total_retainage":{"type":"string"}},"type":"object"},"summary_text":{"properties":{"application_number":{"type":"string"},"contract_date":{"format":"date","type":"string"},"contract_for":{"type":"string"},"project_name":{"type":"string"},"project_number":{"type":"string"},"requisition_period_end":{"format":"date","type":"string"},"requisition_period_start":{"format":"date","type":"string"},"subcontractor_city":{"type":"string"},"subcontractor_country_code":{"type":"string"},"subcontractor_name":{"type":"string"},"subcontractor_state_code":{"type":"string"},"subcontractor_street":{"type":"string"},"subcontractor_zip":{"type":"string"},"to_general_contractor":{"type":"string"}},"type":"object"},"tax_summary":{"items":{"properties":{"applied_amount":{"type":"number"},"tax_code_id":{"type":"integer"},"tax_code_name":{"type":"string"},"tax_code_rate":{"type":"number"}},"type":"object"},"type":"array"},"total_claimed_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor_id":{"type":"integer"},"vendor_name":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"exception":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Requisition (Subcontractor Invoice)","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/requisitions/{id}/approve":{"patch":{"description":"Requires commitments:write, live Commitments edit permission and visibility of the parent commitment. A live AP bill blocks changes. The current requisition status and billing history determine whether the transition is allowed. Moves the requisition to approved, records its approval time and recomputes billing totals. Approval checks the order of related allocations.","operationId":"approveRequisitionPatch","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record. Supply either this query parameter or the JSON body project_id. A valid query value takes precedence.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_RequisitionTransitionInput"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_Requisition"}}},"description":"Requisition after the requested transition."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The change conflicts with the current billing state."}},"summary":"Approve a requisition","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false},"post":{"description":"Requires commitments:write, live Commitments edit permission and visibility of the parent commitment. A live AP bill blocks changes. The current requisition status and billing history determine whether the transition is allowed. Moves the requisition to approved, records its approval time and recomputes billing totals. Approval checks the order of related allocations. This method is an alias for PATCH.","operationId":"approveRequisition","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record. Supply either this query parameter or the JSON body project_id. A valid query value takes precedence.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_RequisitionTransitionInput"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_Requisition"}}},"description":"Requisition after the requested transition."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The change conflicts with the current billing state."}},"summary":"Approve a requisition","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/requisitions/{id}/reject":{"patch":{"description":"Requires commitments:write, live Commitments edit permission and visibility of the parent commitment. A live AP bill blocks changes. The current requisition status and billing history determine whether the transition is allowed. Moves the requisition to revise_and_resubmit and recomputes billing totals.","operationId":"rejectRequisitionPatch","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record. Supply either this query parameter or the JSON body project_id. A valid query value takes precedence.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_RequisitionTransitionInput"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_Requisition"}}},"description":"Requisition after the requested transition."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The change conflicts with the current billing state."}},"summary":"Return a requisition for revision","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false},"post":{"description":"Requires commitments:write, live Commitments edit permission and visibility of the parent commitment. A live AP bill blocks changes. The current requisition status and billing history determine whether the transition is allowed. Moves the requisition to revise_and_resubmit and recomputes billing totals. This method is an alias for PATCH.","operationId":"rejectRequisition","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record. Supply either this query parameter or the JSON body project_id. A valid query value takes precedence.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_RequisitionTransitionInput"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_Requisition"}}},"description":"Requisition after the requested transition."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The change conflicts with the current billing state."}},"summary":"Return a requisition for revision","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/requisitions/{id}/submit":{"patch":{"description":"Requires commitments:write, live Commitments edit permission and visibility of the parent commitment. A live AP bill blocks changes. The current requisition status and billing history determine whether the transition is allowed. Moves the requisition to submitted and records its submission time on a transition.","operationId":"submitRequisitionPatch","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record. Supply either this query parameter or the JSON body project_id. A valid query value takes precedence.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_RequisitionTransitionInput"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_Requisition"}}},"description":"Requisition after the requested transition."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The change conflicts with the current billing state."}},"summary":"Submit a requisition for review","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false},"post":{"description":"Requires commitments:write, live Commitments edit permission and visibility of the parent commitment. A live AP bill blocks changes. The current requisition status and billing history determine whether the transition is allowed. Moves the requisition to submitted and records its submission time on a transition. This method is an alias for PATCH.","operationId":"submitRequisition","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record. Supply either this query parameter or the JSON body project_id. A valid query value takes precedence.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_RequisitionTransitionInput"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_Requisition"}}},"description":"Requisition after the requested transition."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The change conflicts with the current billing state."}},"summary":"Submit a requisition for review","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/requisitions/{requisition_id}/contract_detail_items":{"get":{"operationId":"listRequisitionContractDetailItems","parameters":[{"in":"path","name":"requisition_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"balance_to_finish":{"type":"string"},"completed_work_retainage_percent_this_period":{"type":"string"},"cost_code_id":{"nullable":true,"type":"integer"},"created_at":{"type":"string"},"description_of_work":{"type":"string"},"detail_line_item_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"item_number":{"nullable":true,"type":"string"},"materials_presently_stored":{"type":"string"},"position":{"type":"integer"},"requisition_id":{"type":"integer"},"scheduled_value":{"type":"string"},"subcontractor_claimed_amount":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_completed_and_stored_to_date_percent":{"type":"string"},"updated_at":{"type":"string"},"work_completed_from_previous_application":{"type":"string"},"work_completed_retainage_retained_this_period":{"type":"string"},"work_completed_this_period":{"type":"string"}},"type":"object"},"type":"array"}}}}},"summary":"List requisition contract detail items (G703)","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false},"post":{"operationId":"createRequisitionContractDetailItem","parameters":[{"in":"path","name":"requisition_id","required":true,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"balance_to_finish":{"type":"string"},"completed_work_retainage_percent_this_period":{"type":"string"},"cost_code_id":{"nullable":true,"type":"integer"},"created_at":{"type":"string"},"description_of_work":{"type":"string"},"detail_line_item_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"item_number":{"nullable":true,"type":"string"},"materials_presently_stored":{"type":"string"},"position":{"type":"integer"},"requisition_id":{"type":"integer"},"scheduled_value":{"type":"string"},"subcontractor_claimed_amount":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_completed_and_stored_to_date_percent":{"type":"string"},"updated_at":{"type":"string"},"work_completed_from_previous_application":{"type":"string"},"work_completed_retainage_retained_this_period":{"type":"string"},"work_completed_this_period":{"type":"string"}},"type":"object"}}}}},"summary":"Create a requisition contract detail item","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/requisitions/{requisition_id}/contract_detail_items/{id}":{"delete":{"description":"Requires commitments:write, live Commitments delete permission, visibility of the parent commitment and access to its schedule of values. Removes the line and recomputes requisition totals. A live AP bill or protected billing allocations can block the deletion.","operationId":"deleteRequisitionContractDetailItem","parameters":[{"in":"path","name":"requisition_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"204":{"description":"Requisition line deleted."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The change conflicts with the current billing state."}},"summary":"Delete a requisition contract detail line","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false},"patch":{"operationId":"updateRequisitionContractDetailItem","parameters":[{"in":"path","name":"requisition_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"balance_to_finish":{"type":"string"},"completed_work_retainage_percent_this_period":{"type":"string"},"cost_code_id":{"nullable":true,"type":"integer"},"created_at":{"type":"string"},"description_of_work":{"type":"string"},"detail_line_item_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"item_number":{"nullable":true,"type":"string"},"materials_presently_stored":{"type":"string"},"position":{"type":"integer"},"requisition_id":{"type":"integer"},"scheduled_value":{"type":"string"},"subcontractor_claimed_amount":{"type":"string"},"total_completed_and_stored_to_date":{"type":"string"},"total_completed_and_stored_to_date_percent":{"type":"string"},"updated_at":{"type":"string"},"work_completed_from_previous_application":{"type":"string"},"work_completed_retainage_retained_this_period":{"type":"string"},"work_completed_this_period":{"type":"string"}},"type":"object"}}}}},"summary":"Update a requisition contract detail item (this-period entry)","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/rfqs":{"get":{"operationId":"listRfqs","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"contract_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[status]","schema":{"enum":["draft","open","closed","awarded"],"type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[commitment_contract_id]","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"assigned":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"change_event":{"properties":{"alphanumeric_number":{"type":"string"},"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"change_event_line_items":{"items":{"properties":{"budget_mod":{"properties":{"created_at":{"format":"date-time","type":"string"},"from_budget_line_item_id":{"type":"integer"},"notes":{"type":"string"},"to_budget_line_item_id":{"type":"integer"},"transfer_amount":{"format":"float","type":"string"}},"type":"object"},"budget_mod_amount":{"type":"string"},"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_code_biller_name":{"type":"string"},"cost_code_is_budgeted":{"type":"boolean"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"links":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"type":"string"},"edit":{"type":"string"},"prime_pco_cost":{"type":"string"},"rfq_amount":{"type":"string"},"rom":{"type":"string"},"view":{"type":"string"}},"type":"object"},"number":{"type":"string"},"prime_pco_cost":{"type":"string"},"rfq_amount":{"type":"string"},"rfq_status":{"type":"string"},"rom":{"type":"integer"},"status":{"type":"string"},"statuses":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"type":"string"},"prime_pco_cost":{"type":"string"},"rfq_amount":{"type":"string"}},"type":"object"},"title":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"change_event_origin_id":{"type":"integer"},"change_event_origin_type":{"type":"string"},"change_event_status":{"properties":{"id":{"type":"integer"},"mapped_to_status":{"type":"string"},"name":{"type":"string"},"show_in_select":{"type":"boolean"}},"type":"object"},"change_order_change_reason":{"properties":{"change_reason":{"type":"string"},"company_id":{"type":"integer"},"id":{"type":"integer"},"show_in_select":{"type":"boolean"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"event_scope":{"enum":["tbd","in_scope","out_of_scope"],"type":"string"},"event_type":{"enum":["tbd","allowance","contingency","owner_change","transfer"],"type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"project_id":{"type":"integer"},"rfi":{"properties":{"due_date":{"format":"date-time","type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"status":{"type":"string"},"title":{"type":"string"}},"type":"object"},"status":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_contract_id":{"type":"integer"},"commitment_potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"estimated_amount":{"format":"float","type":"number"},"estimated_schedule_impact":{"type":"integer"},"estimated_status":{"enum":["rom","final"],"type":"string"},"id":{"type":"integer"},"intent_to_quote":{"type":"boolean"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"original_quote":{"format":"float","type":"number"},"position":{"type":"integer"},"potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"quotes":{"items":{"properties":{"attachments_count":{"type":"integer"},"commitment_quote_number":{"type":"string"},"cost":{"format":"float","type":"number"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"import_origin_id":{"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"request_for_quote_id":{"type":"integer"},"schedule_impact":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Quote","type":"object"},"type":"array"},"responses":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Response","type":"object"},"type":"array"},"specification_section":{"properties":{"spec_section_description":{"type":"string"},"spec_section_number":{"type":"string"},"specification_section_id":{"type":"integer"}},"type":"object"},"status":{"enum":["draft","open","closed","awarded"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List RFQs","tags":["rfqs"],"x-os-idempotent":false,"x-os-module":"rfqs","x-os-paginated":true},"post":{"operationId":"createRfq","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"contract_id":{"type":"integer"},"project_id":{"type":"integer"},"rfq":{"properties":{"assigned_id":{"type":"integer"},"change_event_event_id":{"type":"integer"},"cost_code_id":{"type":"integer"},"due_date":{"format":"date","type":"string"},"estimated_amount":{"format":"float","type":"number"},"estimated_schedule_impact":{"type":"integer"},"estimated_status":{"enum":["rom","final"],"type":"string"},"location_id":{"type":"integer"},"number":{"type":"string"},"original_quote":{"format":"float","type":"number"},"private":{"default":false,"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"spec_section_description":{"type":"string"},"spec_section_number":{"type":"string"},"specification_section_id":{"type":"integer"},"status":{"enum":["draft","open","closed","awarded"],"type":"string"},"title":{"type":"string"}},"required":["title"],"title":"RFQ","type":"object"}},"required":["project_id","contract_id","rfq"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"assigned":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"commitment_contract_id":{"type":"integer"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"due_date":{"format":"date","type":"string"},"estimated_amount":{"format":"float","type":"number"},"estimated_schedule_impact":{"type":"integer"},"estimated_status":{"enum":["rom","final"],"type":"string"},"id":{"type":"integer"},"intent_to_quote":{"type":"boolean"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"original_quote":{"format":"float","type":"number"},"position":{"type":"integer"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"specification_section":{"properties":{"spec_section_description":{"type":"string"},"spec_section_number":{"type":"string"},"specification_section_id":{"type":"integer"}},"type":"object"},"status":{"enum":["draft","open","closed","awarded"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create RFQ","tags":["rfqs"],"x-os-idempotent":true,"x-os-module":"rfqs","x-os-paginated":false}},"/rest/v1.0/rfqs/filter_options/status":{"get":{"description":"Requires the `view` permission on the project's RFQs tool. A scoped API token needs `rfqs:read`.","operationId":"listRfqsFilterOptionsStatus","parameters":[{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."}},"summary":"List RFQs filter options for status","tags":["rfqs"],"x-os-idempotent":false,"x-os-module":"rfqs","x-os-paginated":false}},"/rest/v1.0/rfqs/{id}":{"delete":{"operationId":"deleteRfq","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"contract_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete RFQ","tags":["rfqs"],"x-os-idempotent":true,"x-os-module":"rfqs","x-os-paginated":false},"get":{"operationId":"getRfq","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"contract_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assigned":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"change_event":{"properties":{"alphanumeric_number":{"type":"string"},"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"change_event_line_items":{"items":{"properties":{"budget_mod":{"properties":{"created_at":{"format":"date-time","type":"string"},"from_budget_line_item_id":{"type":"integer"},"notes":{"type":"string"},"to_budget_line_item_id":{"type":"integer"},"transfer_amount":{"format":"float","type":"string"}},"type":"object"},"budget_mod_amount":{"type":"string"},"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_code_biller_name":{"type":"string"},"cost_code_is_budgeted":{"type":"boolean"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"links":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"type":"string"},"edit":{"type":"string"},"prime_pco_cost":{"type":"string"},"rfq_amount":{"type":"string"},"rom":{"type":"string"},"view":{"type":"string"}},"type":"object"},"number":{"type":"string"},"prime_pco_cost":{"type":"string"},"rfq_amount":{"type":"string"},"rfq_status":{"type":"string"},"rom":{"type":"integer"},"status":{"type":"string"},"statuses":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"type":"string"},"prime_pco_cost":{"type":"string"},"rfq_amount":{"type":"string"}},"type":"object"},"title":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"change_event_origin_id":{"type":"integer"},"change_event_origin_type":{"type":"string"},"change_event_status":{"properties":{"id":{"type":"integer"},"mapped_to_status":{"type":"string"},"name":{"type":"string"},"show_in_select":{"type":"boolean"}},"type":"object"},"change_order_change_reason":{"properties":{"change_reason":{"type":"string"},"company_id":{"type":"integer"},"id":{"type":"integer"},"show_in_select":{"type":"boolean"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"event_scope":{"enum":["tbd","in_scope","out_of_scope"],"type":"string"},"event_type":{"enum":["tbd","allowance","contingency","owner_change","transfer"],"type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"project_id":{"type":"integer"},"rfi":{"properties":{"due_date":{"format":"date-time","type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"status":{"type":"string"},"title":{"type":"string"}},"type":"object"},"status":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_contract_id":{"type":"integer"},"commitment_potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"estimated_amount":{"format":"float","type":"number"},"estimated_schedule_impact":{"type":"integer"},"estimated_status":{"enum":["rom","final"],"type":"string"},"id":{"type":"integer"},"intent_to_quote":{"type":"boolean"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"original_quote":{"format":"float","type":"number"},"position":{"type":"integer"},"potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"quotes":{"items":{"properties":{"attachments_count":{"type":"integer"},"commitment_quote_number":{"type":"string"},"cost":{"format":"float","type":"number"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"import_origin_id":{"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"request_for_quote_id":{"type":"integer"},"schedule_impact":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Quote","type":"object"},"type":"array"},"responses":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Response","type":"object"},"type":"array"},"specification_section":{"properties":{"spec_section_description":{"type":"string"},"spec_section_number":{"type":"string"},"specification_section_id":{"type":"integer"}},"type":"object"},"status":{"enum":["draft","open","closed","awarded"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show RFQ","tags":["rfqs"],"x-os-idempotent":false,"x-os-module":"rfqs","x-os-paginated":false},"patch":{"operationId":"updateRfq","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"contract_id":{"type":"integer"},"project_id":{"type":"integer"},"rfq":{"properties":{"assigned_id":{"type":"integer"},"change_event_event_id":{"type":"integer"},"cost_code_id":{"type":"integer"},"due_date":{"format":"date","type":"string"},"estimated_amount":{"format":"float","type":"number"},"estimated_schedule_impact":{"type":"integer"},"estimated_status":{"enum":["rom","final"],"type":"string"},"location_id":{"type":"integer"},"number":{"type":"string"},"original_quote":{"format":"float","type":"number"},"private":{"default":false,"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"spec_section_description":{"type":"string"},"spec_section_number":{"type":"string"},"specification_section_id":{"type":"integer"},"status":{"enum":["draft","open","closed","awarded"],"type":"string"},"title":{"type":"string"}},"title":"RFQ","type":"object"}},"required":["project_id","contract_id","rfq"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assigned":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"change_event":{"properties":{"alphanumeric_number":{"type":"string"},"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"change_event_line_items":{"items":{"properties":{"budget_mod":{"properties":{"created_at":{"format":"date-time","type":"string"},"from_budget_line_item_id":{"type":"integer"},"notes":{"type":"string"},"to_budget_line_item_id":{"type":"integer"},"transfer_amount":{"format":"float","type":"string"}},"type":"object"},"budget_mod_amount":{"type":"string"},"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"properties":{"id":{"type":"integer"},"number":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_code_biller_name":{"type":"string"},"cost_code_is_budgeted":{"type":"boolean"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"links":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"type":"string"},"edit":{"type":"string"},"prime_pco_cost":{"type":"string"},"rfq_amount":{"type":"string"},"rom":{"type":"string"},"view":{"type":"string"}},"type":"object"},"number":{"type":"string"},"prime_pco_cost":{"type":"string"},"rfq_amount":{"type":"string"},"rfq_status":{"type":"string"},"rom":{"type":"integer"},"status":{"type":"string"},"statuses":{"properties":{"commitment_contract_cost":{"type":"string"},"commitment_pco_cost":{"type":"string"},"contract":{"type":"string"},"prime_pco_cost":{"type":"string"},"rfq_amount":{"type":"string"}},"type":"object"},"title":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"change_event_origin_id":{"type":"integer"},"change_event_origin_type":{"type":"string"},"change_event_status":{"properties":{"id":{"type":"integer"},"mapped_to_status":{"type":"string"},"name":{"type":"string"},"show_in_select":{"type":"boolean"}},"type":"object"},"change_order_change_reason":{"properties":{"change_reason":{"type":"string"},"company_id":{"type":"integer"},"id":{"type":"integer"},"show_in_select":{"type":"boolean"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"event_scope":{"enum":["tbd","in_scope","out_of_scope"],"type":"string"},"event_type":{"enum":["tbd","allowance","contingency","owner_change","transfer"],"type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"project_id":{"type":"integer"},"rfi":{"properties":{"due_date":{"format":"date-time","type":"string"},"id":{"type":"integer"},"number":{"type":"integer"},"status":{"type":"string"},"title":{"type":"string"}},"type":"object"},"status":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_change_order_packages":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"commitment_contract_id":{"type":"integer"},"commitment_potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"estimated_amount":{"format":"float","type":"number"},"estimated_schedule_impact":{"type":"integer"},"estimated_status":{"enum":["rom","final"],"type":"string"},"id":{"type":"integer"},"intent_to_quote":{"type":"boolean"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"number":{"type":"string"},"original_quote":{"format":"float","type":"number"},"position":{"type":"integer"},"potential_change_orders":{"properties":{"change_order_package_acronym_number":{"type":"string"},"change_order_package_title":{"type":"string"},"change_order_request_acronym_number":{"type":"string"},"change_order_request_id":{"type":"integer"},"change_order_request_title":{"type":"string"},"change_order_tiers":{"type":"integer"},"change_reason":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"executed":{"type":"boolean"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"potential_change_order_acronym_number":{"type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"schedule_impact_amount":{"type":"integer"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"quotes":{"items":{"properties":{"attachments_count":{"type":"integer"},"commitment_quote_number":{"type":"string"},"cost":{"format":"float","type":"number"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"import_origin_id":{"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"request_for_quote_id":{"type":"integer"},"schedule_impact":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Quote","type":"object"},"type":"array"},"responses":{"items":{"properties":{"comment":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Response","type":"object"},"type":"array"},"specification_section":{"properties":{"spec_section_description":{"type":"string"},"spec_section_number":{"type":"string"},"specification_section_id":{"type":"integer"}},"type":"object"},"status":{"enum":["draft","open","closed","awarded"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update RFQ","tags":["rfqs"],"x-os-idempotent":true,"x-os-module":"rfqs","x-os-paginated":false}},"/rest/v1.0/rfqs/{id}/award":{"patch":{"operationId":"awardRfq","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Award RFQ","tags":["rfqs"],"x-os-idempotent":false,"x-os-module":"rfqs","x-os-paginated":false}},"/rest/v1.0/rfqs/{id}/change_event":{"post":{"operationId":"changeEventRfq","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create change event from RFQ","tags":["rfqs"],"x-os-idempotent":false,"x-os-module":"rfqs","x-os-paginated":false}},"/rest/v1.0/rfqs/{id}/quoters":{"get":{"description":"Requires the `view` permission on the project's RFQs tool. A scoped API token needs `rfqs:read`.","operationId":"listRfqQuoters","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"vendor_ids":{"items":{"exclusiveMinimum":0,"type":"integer"},"minItems":1,"type":"array"}},"required":["vendor_ids"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Created."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"List RFQ quoters","tags":["rfqs"],"x-os-idempotent":false,"x-os-module":"rfqs","x-os-paginated":false},"post":{"operationId":"createRfqQuoter","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create RFQ quoter","tags":["rfqs"],"x-os-idempotent":false,"x-os-module":"rfqs","x-os-paginated":false}},"/rest/v1.0/rfqs/{rfq_id}/quotes":{"get":{"operationId":"listRfqQuotes","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"rfq_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"contract_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"commitment_quote_number":{"type":"string"},"cost":{"format":"float","type":"number"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"import_origin_id":{"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"request_for_quote_id":{"type":"integer"},"schedule_impact":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Quote","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List RFQ Quotes","tags":["rfqs"],"x-os-idempotent":false,"x-os-module":"rfqs","x-os-paginated":true},"post":{"operationId":"createRfqQuote","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"rfq_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"contract_id":{"type":"integer"},"project_id":{"type":"integer"},"rfq_quote":{"properties":{"commitment_quote_number":{"type":"string"},"cost":{"format":"float","type":"number"},"schedule_impact":{"type":"integer"}},"title":"RFQ Quote","type":"object"}},"required":["project_id","contract_id","rfq_quote"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"commitment_quote_number":{"type":"string"},"cost":{"format":"float","type":"number"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"import_origin_id":{"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"request_for_quote_id":{"type":"integer"},"schedule_impact":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Quote","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create RFQ Quote","tags":["rfqs"],"x-os-idempotent":false,"x-os-module":"rfqs","x-os-paginated":false}},"/rest/v1.0/rfqs/{rfq_id}/quotes/{id}":{"get":{"operationId":"getRfqQuote","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"rfq_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"contract_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"commitment_quote_number":{"type":"string"},"cost":{"format":"float","type":"number"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"import_origin_id":{"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"request_for_quote_id":{"type":"integer"},"schedule_impact":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Quote","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show RFQ Quote","tags":["rfqs"],"x-os-idempotent":false,"x-os-module":"rfqs","x-os-paginated":false},"patch":{"description":"Correct a submitted quote before the RFQ is awarded (awarded pricing is frozen: 409). Needs RFQ edit permission and RFQ visibility. `cost` cannot change on a quote with line items (422): its total is the sum of the lines. project_id is optional (resolved from the RFQ when omitted); contract_id is accepted and ignored.","operationId":"updateRfqQuote","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"rfq_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"contract_id":{"type":"integer"},"project_id":{"type":"integer"},"rfq_quote":{"additionalProperties":false,"properties":{"commitment_quote_number":{"nullable":true,"type":"string"},"cost":{"description":"Exact money, at most 2 decimals.","oneOf":[{"type":"string"},{"type":"number"}]},"description":{"nullable":true,"type":"string"},"lead_time":{"nullable":true,"type":"integer"},"schedule_impact":{"nullable":true,"type":"integer"}},"type":"object"}},"required":["rfq_quote"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"commitment_quote_number":{"type":"string"},"cost":{"format":"float","type":"number"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_id":{"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"import_origin_id":{"type":"string"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"request_for_quote_id":{"type":"integer"},"schedule_impact":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"RFQ Quote","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Update RFQ Quote","tags":["rfqs"],"x-os-idempotent":true,"x-os-module":"rfqs","x-os-paginated":false}},"/rest/v1.0/specification_section_divisions":{"get":{"operationId":"listSpecificationSectionDivisions","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"url":{"nullable":true,"type":"string"}},"title":"SpecificationSectionDivision","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Specification Section Divisions for a Project","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true},"post":{"operationId":"createSpecificationSectionDivision","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"specification_section_division":{"properties":{"number":{"type":"string"}},"required":["number","description"],"title":"Specification Section Division","type":"object"}},"required":["specification_section_division"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"url":{"nullable":true,"type":"string"}},"title":"SpecificationSectionDivision","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Specification Section Division for a Project","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/specification_section_divisions/recycle_bin":{"get":{"description":"Requires specifications:read and project specifications view permission. The existing handler checks tenant ownership and tool enablement. Lists recycled divisions, most recently deleted first, then descending ID. Catalog presence does not grant authorization.","operationId":"listSpecificationSectionDivisionsRecycleBin","parameters":[{"description":"Project to authorize and scope the operation.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/specifications_RecycledDivision"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination Link","schema":{"type":"string"}},"Per-Page":{"description":"Pagination Per-Page","schema":{"type":"string"}},"Total":{"description":"Pagination Total","schema":{"type":"string"}}}},"400":{"description":"Missing/invalid project query, invalid division/set selection, or division still in use"},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or project permission; tool disabled or workspace restricted"},"404":{"description":"Record is unavailable in the authorized project"},"422":{"description":"Invalid request body"}},"summary":"List recycled specification divisions","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true}},"/rest/v1.0/specification_section_divisions/{id}":{"delete":{"description":"Requires specifications:write and project specifications delete permission. The existing handler checks tenant ownership and tool enablement. Soft-deletes the division. Live sections using it prevent deletion with 400. Returns empty HTTP 200. Catalog presence does not grant authorization.","operationId":"deleteSpecificationSectionDivision","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project to authorize and scope the operation.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"description":"Success; empty response body"},"400":{"description":"Missing/invalid project query, invalid division/set selection, or division still in use"},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or project permission; tool disabled or workspace restricted"},"404":{"description":"Record is unavailable in the authorized project"},"422":{"description":"Invalid request body"}},"summary":"Recycle a specification division","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/specification_section_divisions/{id}/restore":{"patch":{"description":"Requires specifications:write and project specifications delete permission. The existing handler checks tenant ownership and tool enablement. Restores only a recycled division in this project. url remains null; no concatenated PDF is produced. Catalog presence does not grant authorization.","operationId":"restoreSpecificationSectionDivision","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project to authorize and scope the operation.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/specifications_Division"}}},"description":"Success"},"400":{"description":"Missing/invalid project query, invalid division/set selection, or division still in use"},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or project permission; tool disabled or workspace restricted"},"404":{"description":"Record is unavailable in the authorized project"},"422":{"description":"Invalid request body"}},"summary":"Restore a specification division","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/specification_section_revisions":{"get":{"operationId":"listSpecificationSectionRevisions","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"specification_section_division_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"all_revisions","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"id":{"type":"integer"},"issued_date":{"format":"date","nullable":true,"type":"string"},"number":{"type":"string"},"received_date":{"format":"date","nullable":true,"type":"string"},"revision":{"type":"string"},"specification_section_division_id":{"type":"integer"},"specification_section_id":{"type":"integer"},"specification_set_id":{"nullable":true,"type":"integer"},"updated_at":{"type":"string"},"url":{"type":"string"}},"title":"SpecificationSectionRevision","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Specification Section Revisions for a Specification Section Division","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true}},"/rest/v1.0/specification_section_revisions/{id}":{"get":{"operationId":"getSpecificationSectionRevision","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"id":{"type":"integer"},"name":{"type":"string"},"section_id":{"type":"integer"},"section_name":{"type":"string"},"source_create_time":{"format":"date-time","type":"string"},"source_id":{"type":"integer"},"source_update_time":{"format":"date-time","type":"string"},"url":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Specification Section Revision","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":false},"patch":{"description":"Requires specifications:write and project specifications edit permission. The existing handler checks tenant ownership and tool enablement. Derives the project from the revision before authorization. May edit section metadata and promote the revision. Does not replace or upload files. The returned URL is metadata; downloading bytes requires separate upload-owner authorization. Catalog presence does not grant authorization.","operationId":"updateSpecificationSectionRevision","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/specifications_RevisionUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/specifications_Revision"}}},"description":"Success"},"400":{"description":"Missing/invalid project query, invalid division/set selection, or division still in use"},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or project permission; tool disabled or workspace restricted"},"404":{"description":"Record is unavailable in the authorized project"},"422":{"description":"Invalid request body"}},"summary":"Update a specification revision","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/specification_sections":{"get":{"operationId":"listSpecificationSections","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"sort","schema":{"enum":["number"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"current_revision_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"label":{"type":"string"},"number":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"type":"string"}},"type":"object"}}}}},"summary":"List Specification Sections","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":false},"post":{"operationId":"createSpecificationSection","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"specification_section":{"properties":{"number":{"type":"string"},"specification_section_division_id":{"type":"integer"}},"required":["number","specification_section_division_id"],"type":"object"}},"required":["specification_section"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"current_revision_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"label":{"type":"string"},"number":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Specification Section for a Project","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/specification_sections/recycle_bin":{"get":{"description":"Requires specifications:read and project specifications view permission. The existing handler checks tenant ownership and tool enablement. Lists recycled sections, most recently deleted first, then descending ID, with division/current-revision context. Catalog presence does not grant authorization.","operationId":"listSpecificationSectionsRecycleBin","parameters":[{"description":"Project to authorize and scope the operation.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/specifications_RecycledSection"},"type":"array"}}},"description":"Success","headers":{"Link":{"description":"Pagination Link","schema":{"type":"string"}},"Per-Page":{"description":"Pagination Per-Page","schema":{"type":"string"}},"Total":{"description":"Pagination Total","schema":{"type":"string"}}}},"400":{"description":"Missing/invalid project query, invalid division/set selection, or division still in use"},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or project permission; tool disabled or workspace restricted"},"404":{"description":"Record is unavailable in the authorized project"},"422":{"description":"Invalid request body"}},"summary":"List recycled specification sections","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true}},"/rest/v1.0/specification_sections/{id}":{"delete":{"description":"Requires specifications:write and project specifications delete permission. The existing handler checks tenant ownership and tool enablement. Soft-deletes the section, retaining its revision rows. Returns empty HTTP 200. Catalog presence does not grant authorization.","operationId":"deleteSpecificationSection","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional lookup restriction. Without it, the handler derives and authorizes the record project.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"description":"Success; empty response body"},"400":{"description":"Missing/invalid project query, invalid division/set selection, or division still in use"},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or project permission; tool disabled or workspace restricted"},"404":{"description":"Record is unavailable in the authorized project"},"422":{"description":"Invalid request body"}},"summary":"Recycle a specification section","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false},"get":{"description":"Requires specifications:read and project specifications view permission. The existing handler checks tenant ownership and tool enablement. Returns division and current revision metadata. The returned revision URL does not grant file access. Catalog presence does not grant authorization.","operationId":"getSpecificationSection","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional lookup restriction. Without it, the handler derives and authorizes the record project.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/specifications_Section"}}},"description":"Success"},"400":{"description":"Missing/invalid project query, invalid division/set selection, or division still in use"},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or project permission; tool disabled or workspace restricted"},"404":{"description":"Record is unavailable in the authorized project"},"422":{"description":"Invalid request body"}},"summary":"Get a specification section","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":false},"patch":{"description":"Requires specifications:write and project specifications edit permission. The existing handler checks tenant ownership and tool enablement. Changing its division updates all live revisions of this section. Does not upload or replace file bytes. Catalog presence does not grant authorization.","operationId":"updateSpecificationSection","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional lookup restriction. Without it, the handler derives and authorizes the record project.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/specifications_SectionUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/specifications_Section"}}},"description":"Success"},"400":{"description":"Missing/invalid project query, invalid division/set selection, or division still in use"},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or project permission; tool disabled or workspace restricted"},"404":{"description":"Record is unavailable in the authorized project"},"422":{"description":"Invalid request body"}},"summary":"Update a specification section","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/specification_sections/{id}/compare":{"get":{"description":"Requires specifications:read and project specifications view permission, tenant ownership and tool enablement. Requires exactly one project_id, a and b query value; both revision IDs must belong to the live section. Returns metadata differences and source identities, not a complete PDF content diff. Owned PDFs require current actor and every upload-owner read scope before storage access. Extracted text may be partial; legacy revisions without owned PDFs return explicitly synthetic placeholder content. Catalog presence does not grant authorization.","operationId":"listSpecificationSectionCompare","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},{"in":"query","name":"a","required":true,"schema":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},{"in":"query","name":"b","required":true,"schema":{"maximum":9007199254740991,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/specifications_Compare"}}},"description":"Success"},"400":{"description":"Missing, duplicate or invalid query parameter"},"401":{"description":"Authentication required"},"403":{"description":"Permission or scope denied"},"404":{"description":"Section, revision or owned PDF unavailable in authorized project"}},"summary":"Compare specification revisions","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/specification_sections/{id}/related":{"get":{"description":"Requires specifications:read and project specifications view permission, tenant ownership and tool enablement. Derives and authorizes the section project. Returns only live, actor-visible linked RFIs and submittals. Grant-scoped callers additionally need rfis:read or submittals:read for each family; missing scope or source tool access yields an empty array for that family. Catalog presence does not grant authorization.","operationId":"listSpecificationSectionRelated","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/specifications_Related"}}},"description":"Success"},"400":{"description":"Missing, duplicate or invalid query parameter"},"401":{"description":"Authentication required"},"403":{"description":"Permission or scope denied"},"404":{"description":"Section, revision or owned PDF unavailable in authorized project"}},"summary":"List visible specification-related records","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/specification_sections/{id}/restore":{"patch":{"description":"Requires specifications:write and project specifications delete permission. The existing handler checks tenant ownership and tool enablement. Restores only a currently recycled section in the specified project and returns its division/current revision metadata. Catalog presence does not grant authorization.","operationId":"restoreSpecificationSection","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project to authorize and scope the operation.","in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/specifications_Section"}}},"description":"Success"},"400":{"description":"Missing/invalid project query, invalid division/set selection, or division still in use"},"401":{"description":"Authentication required"},"403":{"description":"Missing scope or project permission; tool disabled or workspace restricted"},"404":{"description":"Record is unavailable in the authorized project"},"422":{"description":"Invalid request body"}},"summary":"Restore a specification section","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v1.0/standard_cost_codes":{"get":{"operationId":"listStandardCostCodes","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/wbs_StandardCostCode"},"type":"array"}}}}},"summary":"List standard cost codes","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"post":{"operationId":"createStandardCostCode","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_StandardCostCode"}}}}},"summary":"Create a standard cost code","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/standard_cost_codes/{id}":{"delete":{"description":"Requires wbs:write and company administrator access in the authenticated company. Permanently deletes the catalog code and all of its descendants. Project cost codes use a separate catalog.","operationId":"deleteStandardCostCode","parameters":[{"description":"Standard cost code id in the authenticated company catalog.","in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted successfully. The response body is empty."},"401":{"$ref":"#/components/responses/wbs_WbsUnauthorized"},"403":{"$ref":"#/components/responses/wbs_WbsForbidden"},"404":{"$ref":"#/components/responses/wbs_WbsNotFound"},"429":{"$ref":"#/components/responses/wbs_WbsRateLimited"},"500":{"$ref":"#/components/responses/wbs_WbsInternalError"},"503":{"$ref":"#/components/responses/wbs_WbsAuthUnavailable"}},"summary":"Delete a company standard cost code","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false},"get":{"operationId":"getStandardCostCode","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_StandardCostCode"}}}}},"summary":"Show a standard cost code","tags":["wbs"],"x-os-idempotent":false,"x-os-module":"wbs","x-os-paginated":false},"patch":{"operationId":"updateStandardCostCode","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/wbs_StandardCostCode"}}}}},"summary":"Update a standard cost code","tags":["wbs"],"x-os-idempotent":true,"x-os-module":"wbs","x-os-paginated":false}},"/rest/v1.0/submittal_approvers/{id}":{"patch":{"operationId":"updateSubmittalApprover","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"send_emails","schema":{"type":"boolean"}},{"in":"query","name":"submittal_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"submittal_approver":{"properties":{"associated_attachments":{"items":{"properties":{"attachment_id":{"type":"integer"},"attachment_source_id":{"type":"integer"},"attachment_source_type":{"type":"string"}},"required":["attachment_id","attachment_source_id","attachment_source_type"],"type":"object"},"type":"array"},"attachment_ids":{"items":{"type":"integer"},"type":"array"},"attachments_to_upload":{"items":{"type":"string"},"type":"array"},"comment":{"type":"string"},"forward_to":{"properties":{"due_date":{"format":"date","type":"string"},"user_id":{"type":"integer"}},"required":["user_id"],"type":"object"},"returned_date":{"type":"string"},"sent_date":{"type":"string"},"submittal_response_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"required":["submittal_response_id"],"type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"days_to_respond":{"type":["integer","null"]},"email_sent_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"returned_date":{"format":"date","type":"string"},"sent_date":{"format":"date","type":"string"},"submittal_response_id":{"type":"integer"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Submittal Approver","tags":["submittals"],"x-os-idempotent":true,"x-os-module":"submittals","x-os-paginated":false}},"/rest/v1.0/task_items":{"get":{"operationId":"listTaskItems","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"filters[assigned_id]","schema":{"type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[due_date]","required":false,"schema":{"type":"string"}},{"explode":false,"in":"query","name":"filters[status]","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"in":"query","name":"filters[task_item_category_id]","required":false,"schema":{"type":"string"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"sort","required":false,"schema":{"enum":["number","title","assignee","due_date","status","category"],"type":"string"}},{"in":"query","name":"view","required":false,"schema":{"enum":["ids_only","compact","normal","extended"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"items":{"type":"integer"},"title":"ids_only","type":"array"},{"items":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"title":"compact","type":"array"},{"items":{"allOf":[{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"date_notified":{"format":"date","type":"string"},"distribution_members":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"format":"date-time","nullable":true,"type":"string"},"number":{"type":"string"},"private":{"type":"boolean"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_category":{"allOf":[{"properties":{"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}],"nullable":true}},"type":"object"},{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"}]},"title":"normal","type":"array"},{"items":{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"origin_item":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"type":{"type":"string"}},"type":"object"},"reentry_url":{"nullable":true,"type":"string"},"type":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"date_notified":{"format":"date","type":"string"},"distribution_members":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"format":"date-time","nullable":true,"type":"string"},"number":{"type":"string"},"private":{"type":"boolean"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_category":{"allOf":[{"properties":{"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}],"nullable":true}},"type":"object"},{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"}]},"title":"extended","type":"array"}]}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List task items","tags":["tasks"],"x-os-idempotent":false,"x-os-module":"tasks","x-os-paginated":true},"post":{"operationId":"createTaskItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["compact","normal","extended"],"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"task_item":{"properties":{"assigned_id":{"type":"integer"},"assignee_ids":{"items":{"type":"integer"},"type":"array"},"attachments":{"items":{"type":"string"},"type":"array"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date-time","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"number":{"type":"string"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_category_id":{"type":"integer"},"title":{"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"required":["task_item"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"oneOf":[{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"title":"compact","type":"object"},{"allOf":[{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"date_notified":{"format":"date","type":"string"},"distribution_members":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"format":"date-time","nullable":true,"type":"string"},"number":{"type":"string"},"private":{"type":"boolean"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_category":{"allOf":[{"properties":{"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}],"nullable":true}},"type":"object"},{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"}],"title":"normal"},{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"origin_item":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"type":{"type":"string"}},"type":"object"},"reentry_url":{"nullable":true,"type":"string"},"type":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"date_notified":{"format":"date","type":"string"},"distribution_members":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"format":"date-time","nullable":true,"type":"string"},"number":{"type":"string"},"private":{"type":"boolean"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_category":{"allOf":[{"properties":{"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}],"nullable":true}},"type":"object"},{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"}],"title":"extended"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create task item","tags":["tasks"],"x-os-idempotent":true,"x-os-module":"tasks","x-os-paginated":false}},"/rest/v1.0/task_items/assignees":{"get":{"operationId":"listTaskItemsAssignees","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[search]","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"name":{"type":"string"}},"type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Task Items Assignee options","tags":["tasks"],"x-os-idempotent":false,"x-os-module":"tasks","x-os-paginated":true}},"/rest/v1.0/task_items/assignees/current":{"get":{"operationId":"listTaskItemsAssigneesCurrent","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"locale":{"nullable":true,"type":"string"},"name":{"type":"string"}},"type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Assignees for Accessible Tasks","tags":["tasks"],"x-os-idempotent":false,"x-os-module":"tasks","x-os-paginated":true}},"/rest/v1.0/task_items/from_coordination_issue":{"post":{"operationId":"createTaskItemsFromCoordinationIssue","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."}},"summary":"Create task item from coordination issue","tags":["tasks"],"x-os-idempotent":false,"x-os-module":"tasks","x-os-paginated":false}},"/rest/v1.0/task_items/from_meeting_topic":{"post":{"operationId":"createTaskItemsFromMeetingTopic","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."}},"summary":"Create task item from meeting topic","tags":["tasks"],"x-os-idempotent":false,"x-os-module":"tasks","x-os-paginated":false}},"/rest/v1.0/task_items/from_rfi":{"post":{"operationId":"createTaskItemsFromRfi","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."}},"summary":"Create task item from RFI","tags":["tasks"],"x-os-idempotent":false,"x-os-module":"tasks","x-os-paginated":false}},"/rest/v1.0/task_items/{id}":{"delete":{"operationId":"deleteTaskItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["compact","normal","extended"],"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Destroy task item","tags":["tasks"],"x-os-idempotent":true,"x-os-module":"tasks","x-os-paginated":false},"get":{"operationId":"getTaskItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["compact","normal","extended"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"title":"compact","type":"object"},{"allOf":[{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"date_notified":{"format":"date","type":"string"},"distribution_members":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"format":"date-time","nullable":true,"type":"string"},"number":{"type":"string"},"private":{"type":"boolean"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_category":{"allOf":[{"properties":{"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}],"nullable":true}},"type":"object"},{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"}],"title":"normal"},{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"origin_item":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"type":{"type":"string"}},"type":"object"},"reentry_url":{"nullable":true,"type":"string"},"type":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"date_notified":{"format":"date","type":"string"},"distribution_members":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"format":"date-time","nullable":true,"type":"string"},"number":{"type":"string"},"private":{"type":"boolean"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_category":{"allOf":[{"properties":{"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}],"nullable":true}},"type":"object"},{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"}],"title":"extended"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show task item","tags":["tasks"],"x-os-idempotent":false,"x-os-module":"tasks","x-os-paginated":false},"patch":{"operationId":"updateTaskItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["compact","normal","extended"],"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"task_item":{"properties":{"assigned_id":{"type":"integer"},"assignee_ids":{"items":{"type":"integer"},"type":"array"},"attachments":{"items":{"type":"string"},"type":"array"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date-time","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"number":{"type":"string"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_category_id":{"type":"integer"},"title":{"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"required":["task_item"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"title":"compact","type":"object"},{"allOf":[{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"date_notified":{"format":"date","type":"string"},"distribution_members":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"format":"date-time","nullable":true,"type":"string"},"number":{"type":"string"},"private":{"type":"boolean"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_category":{"allOf":[{"properties":{"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}],"nullable":true}},"type":"object"},{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"}],"title":"normal"},{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"origin_item":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"parent":{"nullable":true,"properties":{"id":{"type":"integer"},"type":{"type":"string"}},"type":"object"},"reentry_url":{"nullable":true,"type":"string"},"type":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"date_notified":{"format":"date","type":"string"},"distribution_members":{"items":{"properties":{"date_notified":{"format":"date","type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"due_date":{"format":"date-time","nullable":true,"type":"string"},"number":{"type":"string"},"private":{"type":"boolean"},"status":{"enum":["initiated","in_progress","ready_for_review","closed","void"],"type":"string"},"task_item_category":{"allOf":[{"properties":{"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}],"nullable":true}},"type":"object"},{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"}],"title":"extended"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update task item","tags":["tasks"],"x-os-idempotent":true,"x-os-module":"tasks","x-os-paginated":false}},"/rest/v1.0/transmittals":{"get":{"description":" Authorization and record visibility are checked by the existing REST handler; catalog presence does not grant access.","operationId":"listTransmittals","parameters":[{"in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"sort","required":false,"schema":{"default":"number","enum":["number","-number","date","-date","created_at","-created_at"],"type":"string"}},{"in":"query","name":"filters[id]","required":false,"schema":{"description":"Comma-separated filter values","type":"string"}},{"in":"query","name":"filters[sent_via]","required":false,"schema":{"description":"Comma-separated filter values","type":"string"}},{"in":"query","name":"filters[submitted_for]","required":false,"schema":{"description":"Comma-separated filter values","type":"string"}},{"in":"query","name":"filters[from_id]","required":false,"schema":{"description":"Comma-separated filter values","type":"string"}},{"in":"query","name":"filters[search]","required":false,"schema":{"description":"Comma-separated filter values","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/transmittals_Transmittal"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission denied"},"404":{"description":"Record unavailable in the authorized project"},"422":{"description":"Invalid request or business validation failure"}},"summary":"List visible project transmittals","tags":["transmittals"],"x-os-idempotent":false,"x-os-module":"transmittals","x-os-paginated":true},"post":{"description":"Creates a transmittal. deliver=true queues recipient email notifications and requires a UUID submission_key plus at least one recipient. Referenced documents/drawings require their corresponding source permissions.  Authorization and record visibility are checked by the existing REST handler; catalog presence does not grant access.","operationId":"createTransmittal","parameters":[{"in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transmittals_Create"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transmittals_Transmittal"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission denied"},"404":{"description":"Record unavailable in the authorized project"},"422":{"description":"Invalid request or business validation failure"}},"summary":"Create a transmittal","tags":["transmittals"],"x-os-idempotent":true,"x-os-module":"transmittals","x-os-paginated":false}},"/rest/v1.0/transmittals/create_from":{"post":{"description":"Creates a transmittal. deliver=true queues recipient email notifications and requires a UUID submission_key plus at least one recipient. Referenced documents/drawings require their corresponding source permissions. Select at least one document or drawing. Version selection arrays must match the corresponding IDs in length. Authorization and record visibility are checked by the existing REST handler; catalog presence does not grant access.","operationId":"createTransmittalsCreateFrom","parameters":[{"in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transmittals_CreateFrom"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transmittals_Transmittal"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission denied"},"404":{"description":"Record unavailable in the authorized project"},"422":{"description":"Invalid request or business validation failure"}},"summary":"Create a transmittal from documents or drawings","tags":["transmittals"],"x-os-idempotent":true,"x-os-module":"transmittals","x-os-paginated":false}},"/rest/v1.0/transmittals/recycle_bin":{"get":{"description":"Requires the project transmittals delete permission even though this operation is read only. Authorization and record visibility are checked by the existing REST handler; catalog presence does not grant access.","operationId":"listTransmittalsRecycleBin","parameters":[{"in":"query","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/transmittals_Transmittal"},"type":"array"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission denied"},"404":{"description":"Record unavailable in the authorized project"},"422":{"description":"Invalid request or business validation failure"}},"summary":"List recycled project transmittals","tags":["transmittals"],"x-os-idempotent":false,"x-os-module":"transmittals","x-os-paginated":true}},"/rest/v1.0/transmittals/{id}":{"delete":{"description":" Authorization and record visibility are checked by the existing REST handler; catalog presence does not grant access.","operationId":"deleteTransmittal","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted without response body"},"401":{"description":"Authentication required"},"403":{"description":"Permission denied"},"404":{"description":"Record unavailable in the authorized project"},"422":{"description":"Invalid request or business validation failure"}},"summary":"Move a transmittal to the recycle bin","tags":["transmittals"],"x-os-idempotent":true,"x-os-module":"transmittals","x-os-paginated":false},"get":{"description":" Authorization and record visibility are checked by the existing REST handler; catalog presence does not grant access.","operationId":"getTransmittal","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transmittals_Transmittal"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission denied"},"404":{"description":"Record unavailable in the authorized project"},"422":{"description":"Invalid request or business validation failure"}},"summary":"Get a visible transmittal","tags":["transmittals"],"x-os-idempotent":false,"x-os-module":"transmittals","x-os-paginated":false},"patch":{"description":" Authorization and record visibility are checked by the existing REST handler; catalog presence does not grant access.","operationId":"updateTransmittal","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transmittals_Update"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transmittals_Transmittal"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission denied"},"404":{"description":"Record unavailable in the authorized project"},"422":{"description":"Invalid request or business validation failure"}},"summary":"Update a transmittal","tags":["transmittals"],"x-os-idempotent":true,"x-os-module":"transmittals","x-os-paginated":false}},"/rest/v1.0/transmittals/{id}/items/{item_id}/download":{"get":{"operationId":"listTransmittalItemDownload","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Download transmittal item","tags":["transmittals"],"x-os-idempotent":false,"x-os-module":"transmittals","x-os-paginated":false}},"/rest/v1.0/transmittals/{id}/receipts":{"patch":{"description":"Requires a current recipient. The authenticated user may update their own receipt; project transmittals administrators may update other recipient receipts. Authorization and record visibility are checked by the existing REST handler; catalog presence does not grant access.","operationId":"updateTransmittalReceipts","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transmittals_ReceiptInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transmittals_Transmittal"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission denied"},"404":{"description":"Record unavailable in the authorized project"},"422":{"description":"Invalid request or business validation failure"}},"summary":"Update a current recipient receipt","tags":["transmittals"],"x-os-idempotent":true,"x-os-module":"transmittals","x-os-paginated":false}},"/rest/v1.0/transmittals/{id}/restore":{"patch":{"description":"Requires the project transmittals delete permission. Authorization and record visibility are checked by the existing REST handler; catalog presence does not grant access.","operationId":"restoreTransmittalPatch","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transmittals_Transmittal"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission denied"},"404":{"description":"Record unavailable in the authorized project"},"422":{"description":"Invalid request or business validation failure"}},"summary":"Restore a recycled transmittal","tags":["transmittals"],"x-os-idempotent":true,"x-os-module":"transmittals","x-os-paginated":false},"post":{"description":"Requires the project transmittals delete permission. Authorization and record visibility are checked by the existing REST handler; catalog presence does not grant access.","operationId":"restoreTransmittal","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transmittals_Transmittal"}}},"description":"Success"},"401":{"description":"Authentication required"},"403":{"description":"Permission denied"},"404":{"description":"Record unavailable in the authorized project"},"422":{"description":"Invalid request or business validation failure"}},"summary":"Restore a recycled transmittal","tags":["transmittals"],"x-os-idempotent":true,"x-os-module":"transmittals","x-os-paginated":false}},"/rest/v1.0/uploads/{id}":{"get":{"description":"Stream the stored file bytes with the correct Content-Type. The disposition is type-aware (see serveUpload): inert preview types (raster images, PDF, plain text) render inline; active content such as SVG/HTML is forced to attachment to prevent stored-XSS in the app origin. Scoped to the caller's company, project membership, and bound form permissions.","operationId":"getUpload","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Get upload","tags":["documents"],"x-os-idempotent":false,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/uploads/{id}/download":{"get":{"description":"Same as the serve route but forces an attachment Content-Disposition so browsers download rather than render.","operationId":"listUploadDownload","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Download upload","tags":["documents"],"x-os-idempotent":false,"x-os-module":"documents","x-os-paginated":false}},"/rest/v1.0/work_order_contracts":{"get":{"operationId":"listWorkOrderContracts","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","schema":{"enum":["compact","extended"],"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[status]","schema":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated","Void"],"type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[include_deleted]","required":false,"schema":{"enum":["only","with"],"type":"string"}},{"in":"query","name":"filters[origin_id]","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","type":"string"},"approval_letter_date":{"type":"string"},"approved_change_orders":{"type":"string"},"billing_schedule_of_values_status":{"enum":["draft","submitted","under_review","revise_and_resubmit","approved"],"type":"string"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"format":"date","type":"string"},"contract_start_date":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"draft_change_orders_amount":{"type":"string"},"exclusions":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"has_change_order_packages":{"type":"boolean"},"has_potential_change_orders":{"type":"boolean"},"id":{"type":"integer"},"inclusions":{"type":"string"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"},"pending_change_orders":{"type":"string"},"pending_revised_contract":{"type":"string"},"percentage_paid":{"type":"string"},"private":{"type":"boolean"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"remaining_balance_outstanding":{"type":"string"},"requisitions_are_enabled":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated","Void"],"type":"string"},"title":{"type":"string"},"total_draw_requests_amount":{"type":"string"},"total_payments":{"type":"string"},"total_requisitions_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"company":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},{"properties":{"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"}},"type":"object"}],"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List work order contracts","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":true},"post":{"operationId":"createWorkOrderContract","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"project_id":{"type":"integer"},"work_order_contract":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","type":"string"},"approval_letter_date":{"type":"string"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"format":"date","type":"string"},"contract_start_date":{"format":"date","type":"string"},"currency_exchange_rate":{"type":"number"},"currency_iso_code":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"exclusions":{"type":"string"},"executed":{"default":false,"type":"boolean"},"execution_date":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"inclusions":{"type":"string"},"invoice_contact_user_ids":{"items":{"type":"integer"},"type":"array"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"private":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated","Void"],"type":"string"},"title":{"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"},"vendor_id":{"type":"integer"}},"title":"Work Order Contract","type":"object"}},"required":["project_id","work_order_contract"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","type":"string"},"approval_letter_date":{"type":"string"},"approved_change_orders":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"change_order_packages":{"items":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"change_order_requests":{"items":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"type":"array"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"format":"date","type":"string"},"contract_start_date":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"draft_change_orders_amount":{"type":"string"},"exclusions":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"id":{"type":"integer"},"inclusions":{"type":"string"},"invoice_contacts":{"items":{"properties":{"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"email":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"id":{"type":"integer"},"job_title":{"nullable":true,"type":"string"},"login_information_id":{"type":"integer"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"vendor_name":{"type":"string"}},"type":"object"},"type":"array"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"},"payments_issued":{"items":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"check_number":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"date":{"format":"date","type":"string"},"draw_request_number":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_number":{"type":"integer"}},"type":"object"},"type":"array"},"pending_change_orders":{"type":"string"},"pending_revised_contract":{"type":"string"},"percentage_paid":{"type":"string"},"potential_change_orders":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"private":{"type":"boolean"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"remaining_balance_outstanding":{"type":"string"},"requisitions_are_enabled":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated","Void"],"type":"string"},"title":{"type":"string"},"total_draw_requests_amount":{"type":"string"},"total_payments":{"type":"string"},"total_requisitions_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"company":{"type":"string"},"id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"}},"type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create work order contract","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/work_order_contracts/{id}":{"delete":{"operationId":"deleteWorkOrderContract","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete work order contract","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false},"get":{"operationId":"getWorkOrderContract","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","type":"string"},"approval_letter_date":{"type":"string"},"approved_change_orders":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"change_order_packages":{"items":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"change_order_requests":{"items":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"type":"array"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"format":"date","type":"string"},"contract_start_date":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"draft_change_orders_amount":{"type":"string"},"exclusions":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"id":{"type":"integer"},"inclusions":{"type":"string"},"invoice_contacts":{"items":{"properties":{"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"email":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"id":{"type":"integer"},"job_title":{"nullable":true,"type":"string"},"login_information_id":{"type":"integer"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"vendor_name":{"type":"string"}},"type":"object"},"type":"array"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"},"payments_issued":{"items":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"check_number":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"date":{"format":"date","type":"string"},"draw_request_number":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_number":{"type":"integer"}},"type":"object"},"type":"array"},"pending_change_orders":{"type":"string"},"pending_revised_contract":{"type":"string"},"percentage_paid":{"type":"string"},"potential_change_orders":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"private":{"type":"boolean"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"remaining_balance_outstanding":{"type":"string"},"requisitions_are_enabled":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated","Void"],"type":"string"},"title":{"type":"string"},"total_draw_requests_amount":{"type":"string"},"total_payments":{"type":"string"},"total_requisitions_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"company":{"type":"string"},"id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show work order contract","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false},"patch":{"operationId":"updateWorkOrderContract","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"project_id":{"type":"integer"},"work_order_contract":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","type":"string"},"approval_letter_date":{"type":"string"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"format":"date","type":"string"},"contract_start_date":{"format":"date","type":"string"},"currency_exchange_rate":{"type":"number"},"currency_iso_code":{"type":"string"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"exclusions":{"type":"string"},"executed":{"default":false,"type":"boolean"},"execution_date":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"inclusions":{"type":"string"},"invoice_contact_user_ids":{"items":{"type":"integer"},"type":"array"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_code":{"nullable":true,"type":"string"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"private":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated","Void"],"type":"string"},"title":{"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"},"vendor_id":{"type":"integer"}},"title":"Work Order Contract","type":"object"}},"required":["project_id","work_order_contract"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"accounting_method":{"enum":["amount","unit"],"type":"string"},"actual_completion_date":{"format":"date","type":"string"},"approval_letter_date":{"type":"string"},"approved_change_orders":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"change_order_packages":{"items":{"properties":{"contract_id":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"change_order_requests":{"items":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"type":"array"},"contract_date":{"format":"date","type":"string"},"contract_estimated_completion_date":{"format":"date","type":"string"},"contract_start_date":{"format":"date","type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"type":"integer"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"draft_change_orders_amount":{"type":"string"},"exclusions":{"type":"string"},"executed":{"type":"boolean"},"execution_date":{"format":"date","type":"string"},"grand_total":{"type":"string"},"id":{"type":"integer"},"inclusions":{"type":"string"},"invoice_contacts":{"items":{"properties":{"business_phone":{"type":"string"},"business_phone_extension":{"type":"integer"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"email":{"type":"string"},"fax_number":{"nullable":true,"type":"string"},"id":{"type":"integer"},"job_title":{"nullable":true,"type":"string"},"login_information_id":{"type":"integer"},"mobile_phone":{"type":"string"},"name":{"type":"string"},"vendor_name":{"type":"string"}},"type":"object"},"type":"array"},"issued_on_date":{"format":"date","type":"string"},"letter_of_intent_date":{"format":"date","type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"number":{"type":"string"},"origin_code":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"},"payments_issued":{"items":{"properties":{"amount":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"check_number":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"date":{"format":"date","type":"string"},"draw_request_number":{"type":"integer"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"notes":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_number":{"type":"integer"}},"type":"object"},"type":"array"},"pending_change_orders":{"type":"string"},"pending_revised_contract":{"type":"string"},"percentage_paid":{"type":"string"},"potential_change_orders":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"invoiced_date":{"format":"date","type":"string"},"number":{"type":"string"},"paid_date":{"format":"date","type":"string"},"reviewed_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","not_pricing","pricing","pending","revised","proceeding","not_proceeding","no_charge","approved","rejected","void"],"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"private":{"type":"boolean"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"remaining_balance_outstanding":{"type":"string"},"requisitions_are_enabled":{"type":"boolean"},"retainage_percent":{"type":"string"},"returned_date":{"format":"date","type":"string"},"revised_contract":{"type":"string"},"show_line_items_to_non_admins":{"type":"boolean"},"signed_contract_received_date":{"format":"date","type":"string"},"status":{"enum":["Draft","Out For Bid","Out For Signature","Approved","Complete","Terminated","Void"],"type":"string"},"title":{"type":"string"},"total_draw_requests_amount":{"type":"string"},"total_payments":{"type":"string"},"total_requisitions_amount":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"company":{"type":"string"},"id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"}},"type":"object"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update work order contract","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/work_order_contracts/{id}/subcontractor_schedule_of_values_status":{"patch":{"description":"Requires commitments:write, live Commitments access and both update and schedule-of-values permission on the contract. From draft, move to under_review. Under review can move to approved, revise_and_resubmit or draft. A revision can move to under_review or draft. An approved schedule can reopen to under_review. Repeating the current status is supported.","operationId":"updateWorkOrderContractSubcontractorScheduleOfValuesStatus","parameters":[{"in":"path","name":"id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Project containing the record. Supply either this query parameter or the JSON body project_id. A valid query value takes precedence.","in":"query","name":"project_id","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_SsovPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_SsovStatus"}}},"description":"Current review status."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project selector or requested workflow change is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"Authentication is required."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The token scope or live project permission does not grant the action."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ApiErrors"}}},"description":"The project or record is unavailable."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitments_ValidationErrors"}}},"description":"The request fields are invalid."}},"summary":"Change the work order schedule-of-values review status","tags":["commitments"],"x-os-idempotent":true,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/work_order_contracts/{work_order_contract_id}/line_items":{"get":{"operationId":"listWorkOrderContractLineItems","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"work_order_contract_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[cost_code_id]","schema":{"type":"string"}},{"in":"query","name":"filters[line_item_type_id]","required":false,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["default","ssov_source_lines"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"oneOf":[{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"},{"properties":{"amount":{"type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"id":{"type":"integer"},"position":{"type":"integer"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"ssov_source_lines","type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Work Order Contract Line Items","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":true},"post":{"operationId":"createWorkOrderContractLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"work_order_contract_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"line_item":{"properties":{"amount":{"type":"string"},"cost_code_id":{"type":"integer"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"line_item_type_id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"type":"string"},"tax_code_id":{"type":"integer"},"unit_cost":{"type":"string"},"uom":{"type":"string"},"wbs_code_id":{"type":"integer"}},"title":"Line Item","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","line_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Work Order Contract line item","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.0/work_order_contracts/{work_order_contract_id}/line_items/{id}":{"delete":{"operationId":"deleteWorkOrderContractLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"work_order_contract_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Work Order Contract line item","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false},"get":{"operationId":"getWorkOrderContractLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"work_order_contract_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"view","required":false,"schema":{"enum":["default","ssov_source_lines"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"},{"properties":{"amount":{"type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"id":{"type":"integer"},"position":{"type":"integer"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"ssov_source_lines","type":"object"}]}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Work Order Contract line item","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false},"patch":{"operationId":"updateWorkOrderContractLineItem","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"work_order_contract_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"line_item":{"properties":{"amount":{"type":"string"},"cost_code_id":{"type":"integer"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"line_item_type_id":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"type":"string"},"tax_code_id":{"type":"integer"},"unit_cost":{"type":"string"},"uom":{"type":"string"},"wbs_code_id":{"type":"integer"}},"title":"Line Item","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","line_item"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"string"},"change_event_line_item":{"properties":{"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"cost_rom":{"format":"float","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"event_id":{"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"revenue_rom":{"format":"float","type":"string"}},"type":"object"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"currency_iso_code":{"nullable":true,"type":"string"}},"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"holder":{"properties":{"holder_type":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"quantity":{"format":"float","type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"default","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Work Order Contract line item","tags":["commitments"],"x-os-idempotent":false,"x-os-module":"commitments","x-os-paginated":false}},"/rest/v1.1/companies/{company_id}/uploads":{"post":{"operationId":"createCompanyUploadV11","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"header","name":"OS-Company-Id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"attachment_content_disposition":{"default":false,"type":"boolean"},"response_content_type":{"default":"application/octet-stream","type":"string"},"response_filename":{"maxLength":255,"minLength":1,"type":"string"},"size":{"maximum":52428800,"minimum":1,"type":"integer"}},"required":["response_filename"],"type":"object"}},"multipart/form-data":{"schema":{"additionalProperties":false,"properties":{"attachment_content_disposition":{"default":false,"type":"boolean"},"response_content_type":{"default":"application/octet-stream","type":"string"},"response_filename":{"maxLength":255,"minLength":1,"type":"string"},"size":{"maximum":52428800,"minimum":1,"type":"integer"}},"required":["response_filename"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"fields":{"properties":{"capability":{"type":"string"},"uuid":{"type":"string"}},"required":["uuid","capability"],"type":"object"},"url":{"format":"uri","type":"string"},"uuid":{"format":"uuid","type":"string"}},"required":["uuid","url","fields"],"type":"object"}}}},"400":{},"401":{},"403":{},"404":{},"413":{},"429":{}},"summary":"Initiate a local nonsegmented upload","tags":["direct_uploads"],"x-os-idempotent":true,"x-os-module":"direct_uploads","x-os-paginated":false}},"/rest/v1.1/companies/{company_id}/uploads/{uuid}":{"get":{"operationId":"getCompanyUploadV11","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"header","name":"OS-Company-Id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"uuid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"fields":{"properties":{"capability":{"type":"string"},"uuid":{"type":"string"}},"required":["uuid","capability"],"type":"object"},"url":{"format":"uri","type":"string"},"uuid":{"format":"uuid","type":"string"}},"required":["uuid","url","fields"],"type":"object"}}}},"401":{},"403":{},"404":{}},"summary":"Show a local nonsegmented upload","tags":["direct_uploads"],"x-os-idempotent":false,"x-os-module":"direct_uploads","x-os-paginated":false}},"/rest/v1.1/drawing_areas/{drawing_area_id}/drawings":{"get":{"operationId":"listDrawingAreaDrawingsV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"drawing_area_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[drawing_discipline_id]","required":false,"schema":{"type":"integer"}},{"in":"query","name":"filters[drawing_set_id]","required":false,"schema":{"type":"integer"}},{"in":"query","name":"with_position","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"view","required":false,"schema":{"enum":["compact","extended","with_revisions"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"current_revision":{"nullable":true,"properties":{"floorplan":{"type":"boolean"},"has_drawing_sketches":{"type":"boolean"},"id":{"type":"integer"},"large_thumbnail_url":{"type":"string"},"pdf_size":{"type":"integer"},"pdf_url":{"type":"string"},"png_size":{"type":"integer"},"png_url":{"type":"string"},"revision_number":{"type":"string"},"thumbnail_url":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"discipline":{"type":"string"},"drawing_discipline_id":{"type":"integer"},"drawing_number":{"type":"string"},"id":{"type":"integer"},"number":{"type":"string"},"obsolete":{"type":"boolean"},"sheet_number":{"nullable":true,"type":"integer"},"title":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List drawings","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":true},"post":{"operationId":"createDrawingAreaDrawingV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"drawing_area_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"drawing":{"properties":{"drawing_discipline":{"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"},"number":{"type":"string"},"sheet_number":{"nullable":true,"type":"integer"},"title":{"type":"string"}},"required":["number","drawing_discipline"],"title":"Drawing","type":"object"}},"required":["drawing"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"discipline":{"type":"string"},"drawing_number":{"type":"string"},"id":{"type":"integer"},"number":{"type":"string"},"obsolete":{"type":"boolean"},"sheet_number":{"nullable":true,"type":"integer"},"title":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"exception":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Drawing","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.1/drawing_areas/{drawing_area_id}/drawings/{id}":{"get":{"description":"Requires the `view` permission on the project's drawings tool. A scoped API token needs `drawings:read`.","operationId":"getDrawingAreaDrawingV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"drawing_area_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"drawing":{"properties":{"drawing_area_id":{"anyOf":[{"exclusiveMinimum":0,"type":"integer"},{"type":"null"}]},"drawing_discipline":{"properties":{"name":{"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"drawing_discipline_id":{"exclusiveMinimum":0,"type":"integer"},"number":{"minLength":1,"type":"string"},"obsolete":{"type":"boolean"},"ordered_revision_ids":{"items":{"exclusiveMinimum":0,"type":"integer"},"type":"array"},"sheet_number":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"title":{"type":["string","null"]}},"type":"object"}},"required":["drawing"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"Get drawing area drawing","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false},"patch":{"operationId":"updateDrawingAreaDrawingV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"drawing_area_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"drawing":{"properties":{"drawing_discipline":{"properties":{"name":{"type":"string"}},"type":"object"},"number":{"type":"string"},"obsolete":{"type":"boolean"},"ordered_revision_ids":{"items":{"type":"integer"},"type":"array"},"sheet_number":{"nullable":true,"type":"integer"},"title":{"type":"string"}},"title":"Drawing","type":"object"}},"required":["drawing"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"discipline":{"type":"string"},"drawing_number":{"type":"string"},"id":{"type":"integer"},"number":{"type":"string"},"obsolete":{"type":"boolean"},"sheet_number":{"nullable":true,"type":"integer"},"title":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"exception":{"type":"string"},"message":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Drawing","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/bid_packages":{"get":{"operationId":"listProjectBidPackagesV11","parameters":[{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"view","schema":{"enum":["all","internal","use_previous_bidders","use_previous_bid_packages"],"type":"string"}},{"in":"query","name":"filter","schema":{"enum":["open","closed","hidden","has_bid_forms"],"type":"string"}},{"in":"query","name":"with_flags","required":false,"schema":{"items":{"enum":["flexible_response_types_enabled","bid_form_sections_enabled"],"type":"string"},"type":"array"}},{"in":"query","name":"sort","schema":{"enum":["number","title","bid_due_date","invited_bids_count","bids_will_bid_count","submitted_bids_count","status"],"type":"string"}},{"in":"query","name":"filters[bid_due_date]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[status]","required":false,"schema":{"enum":["open","closed","hidden"],"type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[has_bid_forms]","required":false,"schema":{"type":"boolean"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"bid_due_date":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"number":{"nullable":true,"type":"integer"},"project_id":{"type":"integer"},"release_required":{"type":"boolean"},"submitted_bids_count":{"type":"integer"},"title":{"type":"string"},"vendor_revision":{"type":"integer"}},"type":"object"}],"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Bid Packages","tags":["bidding"],"x-os-idempotent":false,"x-os-module":"bidding","x-os-paginated":true}},"/rest/v1.1/projects/{project_id}/daily_logs/counts":{"get":{"operationId":"listProjectDailyLogsCountsV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[status]","schema":{"enum":["all","approved","pending"],"type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"count":{"type":"integer"},"module_name":{"type":"string"},"position":{"type":"integer"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Counts of Daily Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true}},"/rest/v1.1/projects/{project_id}/daily_logs/weather_logs":{"get":{"operationId":"listProjectDailyLogsWeatherLogsV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"log_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[status]","schema":{"enum":["all","approved","pending"],"type":"string"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[daily_log_segment_id]","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"average":{"type":"string"},"calamity":{"type":"string"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"ground":{"type":"string"},"id":{"type":"integer"},"is_weather_delay":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"type":"string"},"status":{"type":"string"},"temperature":{"type":"string"},"time":{"format":"date-time","type":"string"},"time_hour":{"type":"integer"},"time_minute":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"wind":{"type":"string"}},"type":"object"},"type":"array"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Weather Logs","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":true},"post":{"operationId":"createProjectDailyLogsWeatherLogV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"weather_log":{"properties":{"average":{"type":"string"},"calamity":{"enum":["Earthquake","Fire","Flash Flood","Hurricane","Landslide","Other","Snow","Tornado"],"type":"string"},"comments":{"type":"string"},"date":{"format":"date","type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"ground":{"enum":["Dry","Flooded","Frozen","Heavy Surf/Swell","High Tide","Low Tide","Snow","Wet/Muddy","-----"],"type":"string"},"image_ids":{"items":{"type":"integer"},"type":"array"},"is_weather_delay":{"type":"integer"},"location_id":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"enum":["Clear","Cloudy","Fog","Ice/Sleet/Hail","Overcast","Mist","Rain","Snow"],"type":"string"},"temperature":{"enum":["Cold","Hot","Mild","Very Cold","Very Hot"],"type":"string"},"time":{"format":"time","type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"},"vendor_id":{"type":"integer"},"wind":{"enum":["Calm","High Wind","Light Wind"],"type":"string"}},"required":["date"],"type":"object"}},"required":["weather_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"weather_log":{"properties":{"average":{"type":"string"},"calamity":{"enum":["Earthquake","Fire","Flash Flood","Hurricane","Landslide","Other","Snow","Tornado"],"type":"string"},"comments":{"type":"string"},"date":{"format":"date","type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"ground":{"enum":["Dry","Flooded","Frozen","Heavy Surf/Swell","High Tide","Low Tide","Snow","Wet/Muddy","-----"],"type":"string"},"image_ids":{"items":{"type":"integer"},"type":"array"},"is_weather_delay":{"type":"integer"},"location_id":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"enum":["Clear","Cloudy","Fog","Ice/Sleet/Hail","Overcast","Mist","Rain","Snow"],"type":"string"},"temperature":{"enum":["Cold","Hot","Mild","Very Cold","Very Hot"],"type":"string"},"time":{"format":"time","type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"},"vendor_id":{"type":"integer"},"wind":{"enum":["Calm","High Wind","Light Wind"],"type":"string"}},"required":["date"],"type":"object"}},"required":["weather_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"average":{"type":"string"},"calamity":{"type":"string"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"ground":{"type":"string"},"id":{"type":"integer"},"is_weather_delay":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"type":"string"},"status":{"type":"string"},"temperature":{"type":"string"},"time":{"format":"date-time","type":"string"},"time_hour":{"type":"integer"},"time_minute":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"wind":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Weather Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/daily_logs/weather_logs/{id}":{"delete":{"operationId":"deleteProjectDailyLogsWeatherLogV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Weather Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false},"get":{"operationId":"getProjectDailyLogsWeatherLogV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"average":{"type":"string"},"calamity":{"type":"string"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"ground":{"type":"string"},"id":{"type":"integer"},"is_weather_delay":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"type":"string"},"status":{"type":"string"},"temperature":{"type":"string"},"time":{"format":"date-time","type":"string"},"time_hour":{"type":"integer"},"time_minute":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"wind":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Weather Log","tags":["daily_log"],"x-os-idempotent":false,"x-os-module":"daily_log","x-os-paginated":false},"patch":{"operationId":"updateProjectDailyLogsWeatherLogV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"weather_log":{"properties":{"average":{"type":"string"},"calamity":{"enum":["Earthquake","Fire","Flash Flood","Hurricane","Landslide","Other","Snow","Tornado"],"type":"string"},"comments":{"type":"string"},"date":{"format":"date","type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"ground":{"enum":["Dry","Flooded","Frozen","Heavy Surf/Swell","High Tide","Low Tide","Snow","Wet/Muddy","-----"],"type":"string"},"image_ids":{"items":{"type":"integer"},"type":"array"},"is_weather_delay":{"type":"integer"},"location_id":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"enum":["Clear","Cloudy","Fog","Ice/Sleet/Hail","Overcast","Mist","Rain","Snow"],"type":"string"},"temperature":{"enum":["Cold","Hot","Mild","Very Cold","Very Hot"],"type":"string"},"time":{"format":"time","type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"},"vendor_id":{"type":"integer"},"wind":{"enum":["Calm","High Wind","Light Wind"],"type":"string"}},"required":["date"],"type":"object"}},"required":["weather_log"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"weather_log":{"properties":{"average":{"type":"string"},"calamity":{"enum":["Earthquake","Fire","Flash Flood","Hurricane","Landslide","Other","Snow","Tornado"],"type":"string"},"comments":{"type":"string"},"date":{"format":"date","type":"string"},"document_management_document_revision_ids":{"items":{"type":"string"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"ground":{"enum":["Dry","Flooded","Frozen","Heavy Surf/Swell","High Tide","Low Tide","Snow","Wet/Muddy","-----"],"type":"string"},"image_ids":{"items":{"type":"integer"},"type":"array"},"is_weather_delay":{"type":"integer"},"location_id":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"enum":["Clear","Cloudy","Fog","Ice/Sleet/Hail","Overcast","Mist","Rain","Snow"],"type":"string"},"temperature":{"enum":["Cold","Hot","Mild","Very Cold","Very Hot"],"type":"string"},"time":{"format":"time","type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"},"vendor_id":{"type":"integer"},"wind":{"enum":["Calm","High Wind","Light Wind"],"type":"string"}},"required":["date"],"type":"object"}},"required":["weather_log"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"average":{"type":"string"},"calamity":{"type":"string"},"comments":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"created_by_collaborator":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"daily_log_segment":{"nullable":true,"properties":{"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"daily_log_segment_id":{"nullable":true,"type":"integer"},"date":{"format":"date","type":"string"},"datetime":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"ground":{"type":"string"},"id":{"type":"integer"},"is_weather_delay":{"type":"integer"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"position":{"type":"integer"},"precipitation":{"type":"string"},"sky":{"type":"string"},"status":{"type":"string"},"temperature":{"type":"string"},"time":{"format":"date-time","type":"string"},"time_hour":{"type":"integer"},"time_minute":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"},"wind":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Weather Log","tags":["daily_log"],"x-os-idempotent":true,"x-os-module":"daily_log","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/direct_costs":{"get":{"operationId":"listProjectDirectCostsV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[origin_id]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[invoice_number]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[payment_date]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[received_date]","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"amount":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"direct_cost_date":{"format":"date","type":"string"},"direct_cost_type":{"enum":["invoice","expense","payroll","subcontractor_invoice"],"type":"string"},"employee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"grand_total":{"type":"string"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"tax_breakdown":{"properties":{"grand_total":{"type":"string"},"subtotal":{"type":"string"},"tax_details":{"items":{"properties":{"amount":{"type":"string"},"selected_tax_code_id":{"type":"integer"},"selected_tax_code_name":{"type":"string"},"tax_code_id":{"type":"integer"},"tax_code_name":{"type":"string"},"tax_code_rate":{"type":"string"},"taxable_amount":{"type":"string"}},"type":"object"},"type":"array"},"tax_total":{"type":"string"}},"type":"object"},"terms":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"type":"string"},"vendor_id":{"type":"integer"},"vendor_name":{"type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Direct Cost Items","tags":["direct_costs"],"x-os-idempotent":false,"x-os-module":"direct_costs","x-os-paginated":true},"post":{"operationId":"createProjectDirectCostV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"direct_cost":{"properties":{"currency_configuration":{"properties":{"currency_exchange_rate":{"format":"float","type":"number"},"currency_iso_code":{"type":"string"}},"type":"object"},"direct_cost_date":{"format":"date","type":"string"},"direct_cost_type":{"enum":["invoice","expense","payroll","subcontractor_invoice"],"type":"string"},"employee_id":{"type":"integer"},"invoice_number":{"type":"string"},"line_items":{"items":{"properties":{"direct_cost_id":{"type":"integer"},"funding_rule_id":{"nullable":true,"type":"integer"},"manual_amount":{"format":"float","type":"number"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"format":"float","type":"number"},"ref":{"type":"string"},"tax_code_id":{"type":"integer"},"unit_cost":{"format":"float","type":"number"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"},"wbs_code_id":{"type":"integer"}},"required":["wbs_code_id"],"title":"Direct Cost Line Item","type":"object"},"type":"array"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"terms":{"type":"string"},"vendor_id":{"type":"integer"}},"required":["invoice_number","vendor_id","direct_cost_type"],"title":"Direct Cost Item","type":"object"}},"required":["direct_cost"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"base_currency_iso_code":{"type":"string"},"currency_exchange_rate":{"type":"string"},"currency_iso_code":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"direct_cost_date":{"format":"date","type":"string"},"direct_cost_type":{"enum":["invoice","expense","payroll","subcontractor_invoice"],"type":"string"},"employee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"grand_total":{"type":"string"},"has_workflows":{"type":"boolean"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"funding_rule_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"quantity":{"format":"float","type":"string"},"ref":{"type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"Direct Cost Line Item","type":"object"},"type":"array"},"line_items_count":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"synced":{"type":"boolean"},"tax_breakdown":{"properties":{"grand_total":{"type":"string"},"subtotal":{"type":"string"},"tax_details":{"items":{"properties":{"amount":{"type":"string"},"selected_tax_code_id":{"type":"integer"},"selected_tax_code_name":{"type":"string"},"tax_code_id":{"type":"integer"},"tax_code_name":{"type":"string"},"tax_code_rate":{"type":"string"},"taxable_amount":{"type":"string"}},"type":"object"},"type":"array"},"tax_total":{"type":"string"}},"type":"object"},"terms":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"vendor_id":{"type":"integer"},"vendor_name":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Direct Cost Item","tags":["direct_costs"],"x-os-idempotent":true,"x-os-module":"direct_costs","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/direct_costs/{id}":{"delete":{"operationId":"deleteProjectDirectCostV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Direct Cost Item","tags":["direct_costs"],"x-os-idempotent":true,"x-os-module":"direct_costs","x-os-paginated":false},"get":{"operationId":"getProjectDirectCostV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"base_currency_iso_code":{"type":"string"},"currency_exchange_rate":{"type":"string"},"currency_iso_code":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"direct_cost_date":{"format":"date","type":"string"},"direct_cost_type":{"enum":["invoice","expense","payroll","subcontractor_invoice"],"type":"string"},"employee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"grand_total":{"type":"string"},"has_workflows":{"type":"boolean"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"funding_rule_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"quantity":{"format":"float","type":"string"},"ref":{"type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"Direct Cost Line Item","type":"object"},"type":"array"},"line_items_count":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"synced":{"type":"boolean"},"tax_breakdown":{"properties":{"grand_total":{"type":"string"},"subtotal":{"type":"string"},"tax_details":{"items":{"properties":{"amount":{"type":"string"},"selected_tax_code_id":{"type":"integer"},"selected_tax_code_name":{"type":"string"},"tax_code_id":{"type":"integer"},"tax_code_name":{"type":"string"},"tax_code_rate":{"type":"string"},"taxable_amount":{"type":"string"}},"type":"object"},"type":"array"},"tax_total":{"type":"string"}},"type":"object"},"terms":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"vendor_id":{"type":"integer"},"vendor_name":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Direct Cost Item","tags":["direct_costs"],"x-os-idempotent":false,"x-os-module":"direct_costs","x-os-paginated":false},"patch":{"operationId":"updateProjectDirectCostV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"direct_cost":{"properties":{"currency_configuration":{"properties":{"currency_exchange_rate":{"format":"float","type":"number"},"currency_iso_code":{"type":"string"}},"type":"object"},"direct_cost_date":{"format":"date","type":"string"},"employee_id":{"type":"integer"},"line_items":{"items":{"properties":{"direct_cost_id":{"type":"integer"},"funding_rule_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"manual_amount":{"format":"float","type":"number"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"quantity":{"format":"float","type":"number"},"ref":{"type":"string"},"tax_code_id":{"type":"integer"},"unit_cost":{"format":"float","type":"number"},"uom":{"enum":["Any value present in the Company list of Units of Measure"],"type":"string"},"wbs_code_id":{"type":"integer"}},"title":"Direct Cost Line Item","type":"object"},"type":"array"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"terms":{"type":"string"},"vendor_id":{"type":"integer"}},"title":"Direct Cost Item","type":"object"}},"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"properties":{"base_currency_iso_code":{"type":"string"},"currency_exchange_rate":{"type":"string"},"currency_iso_code":{"type":"string"}},"type":"object"},"deleted_at":{"format":"date-time","type":"string"},"direct_cost_date":{"format":"date","type":"string"},"direct_cost_type":{"enum":["invoice","expense","payroll","subcontractor_invoice"],"type":"string"},"employee":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"grand_total":{"type":"string"},"has_workflows":{"type":"boolean"},"id":{"type":"integer"},"invoice_number":{"type":"string"},"line_items":{"items":{"properties":{"amount":{"type":"string"},"company":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_code":{"oneOf":[{"properties":{"full_code":{"type":"string"},"id":{"nullable":true,"type":"integer"},"name":{"type":"string"}},"title":"compact","type":"object"},{"properties":{"biller":{"type":"string"},"biller_id":{"type":"integer"},"biller_origin_id":{"nullable":true,"type":"string"},"biller_type":{"enum":["Project","SubJob"],"type":"string"},"budgeted":{"type":"boolean"},"code":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"full_code":{"type":"string"},"id":{"type":"integer"},"line_item_types":{"items":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","labor","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"type":"array"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"parent":{"properties":{"id":{"type":"integer"}},"type":"object"},"position":{"type":"integer"},"sortable_code":{"type":"string"},"standard_cost_code_id":{"type":"integer"},"standard_cost_code_list_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"extended","type":"object"}]},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^\\d+\\.\\d+$","type":"string"}},"type":"object"}],"type":"object"},"extended_amount":{"format":"float","type":"string"},"extended_type":{"enum":["manual","calculated"],"type":"string"},"funding_rule_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"line_item_type":{"properties":{"base_type":{"enum":["equipment","materials","commitment","owner_cost","professional_services","other"],"type":"string"},"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"origin_data":{"type":"string"},"origin_id":{"nullable":true,"type":"string"}},"title":"LineItemType","type":"object"},"origin_data":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"position":{"type":"integer"},"quantity":{"format":"float","type":"string"},"ref":{"type":"string"},"tax_code_id":{"type":"integer"},"total_amount":{"format":"float","type":"string"},"unit_cost":{"format":"float","type":"string"},"uom":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"properties":{"flat_code":{"type":"string"},"id":{"type":"integer"}},"type":"object"}},"title":"Direct Cost Line Item","type":"object"},"type":"array"},"line_items_count":{"type":"integer"},"origin_data":{"type":"string"},"origin_id":{"type":"string"},"payment_date":{"format":"date","type":"string"},"project":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"received_date":{"format":"date","type":"string"},"status":{"enum":["draft","pending","revise_and_resubmit","approved"],"type":"string"},"synced":{"type":"boolean"},"tax_breakdown":{"properties":{"grand_total":{"type":"string"},"subtotal":{"type":"string"},"tax_details":{"items":{"properties":{"amount":{"type":"string"},"selected_tax_code_id":{"type":"integer"},"selected_tax_code_name":{"type":"string"},"tax_code_id":{"type":"integer"},"tax_code_name":{"type":"string"},"tax_code_rate":{"type":"string"},"taxable_amount":{"type":"string"}},"type":"object"},"type":"array"},"tax_total":{"type":"string"}},"type":"object"},"terms":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"vendor_id":{"type":"integer"},"vendor_name":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"409":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Direct Cost Item","tags":["direct_costs"],"x-os-idempotent":true,"x-os-module":"direct_costs","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/direct_costs/{id}/attachments":{"post":{"operationId":"createProjectDirectCostAttachmentV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Upload direct cost attachment","tags":["direct_costs"],"x-os-idempotent":false,"x-os-module":"direct_costs","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/drawing_areas":{"get":{"operationId":"listProjectDrawingAreasV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[exclude_empty_connected]","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"view","required":false,"schema":{"enum":["compact","extended","only_ids","mfe"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"deletable":{"type":"boolean"},"drawing_disciplines":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"}},"type":"object"},"type":"array"},"drawing_sets":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"date":{"format":"date","type":"string"},"drawing_revisions_count":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"project_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"DrawingSet","type":"object"},"type":"array"},"drawings_count":{"type":"integer"},"id":{"type":"integer"},"latest_revision_update":{"format":"date-time","type":"string"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"DrawingArea","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List drawing areas","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":true},"post":{"operationId":"createProjectDrawingAreaV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"}},"required":["name"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create drawing area","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/drawing_areas/{id}":{"delete":{"description":"Delete an empty drawing area. An area that still holds drawings (current or recycled) returns 409; move them to another area first. Needs drawings delete permission.","operationId":"deleteProjectDrawingAreaV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."}},"summary":"Delete a drawing area","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false},"get":{"description":"Requires the `view` permission on the project's drawings tool. A scoped API token needs `drawings:read`.","operationId":"getProjectDrawingAreaV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"type":["string","null"]},"name":{"minLength":1,"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"Get drawing area","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false},"patch":{"operationId":"updateProjectDrawingAreaV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"}},"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update a drawing area","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/drawing_disciplines":{"get":{"operationId":"listProjectDrawingDisciplinesV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"view","required":false,"schema":{"enum":["only_ids"],"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"abbreviations":{"items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Drawing Disciplines","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":true},"post":{"description":"Alias of `POST /rest/v1.0/projects/{project_id}/drawing_disciplines`, with the same behaviour.","operationId":"createProjectDrawingDisciplineV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"view","required":false,"schema":{"enum":["only_ids"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Create drawing discipline","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/drawing_disciplines/{id}":{"get":{"description":"Alias of `GET /rest/v1.0/projects/{project_id}/drawing_disciplines/{id}`, with the same behaviour. Requires the `view` permission on the project's drawings tool. A scoped API token needs `drawings:read`.","operationId":"getProjectDrawingDisciplineV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"minLength":1,"type":"string"},"position":{"minimum":0,"type":"integer"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."},"422":{"description":"Validation failed; `errors` maps each field to messages."}},"summary":"Get drawing discipline","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false},"patch":{"operationId":"updateProjectDrawingDisciplineV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update drawing discipline","tags":["drawings"],"x-os-idempotent":true,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/drawing_revision_terms":{"get":{"operationId":"listProjectDrawingRevisionTermsV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"drawing_revision_ids","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"drawing_revision_id":{"type":"integer"},"terms":{"additionalProperties":{"items":{"properties":{"height":{"type":"integer"},"index":{"type":"integer"},"width":{"type":"integer"},"x":{"type":"integer"},"y":{"type":"integer"}},"type":"object"},"type":"array"},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"title":"DrawingRevisionTermSet","type":"object"},"nullable":true,"type":"array"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List drawing revision terms","tags":["drawings"],"x-os-idempotent":false,"x-os-module":"drawings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/forms":{"get":{"operationId":"listProjectFormsV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[private]","schema":{"type":"boolean"}},{"explode":false,"in":"query","name":"filters[created_by_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[form_template_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[search]","schema":{"type":"string"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"sort","schema":{"enum":["created_by","description","name","created_at","updated_at"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"attachment":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"deleted":{"type":"boolean"},"download_all_uuid":{"additionalProperties":true,"nullable":true,"type":"object"},"fillable_pdf":{"nullable":true,"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"form_template_id":{"type":"integer"},"form_template_name":{"type":"string"},"holder_class":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"permissions":{"properties":{"can_destroy":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_email":{"type":"boolean"},"can_view_change_history":{"type":"boolean"},"can_view_download_log":{"type":"boolean"}},"type":"object"},"private":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"viewable":{"type":"boolean"},"viewable_document_id":{"nullable":true,"type":"integer"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Forms on a project","tags":["forms"],"x-os-idempotent":false,"x-os-module":"forms","x-os-paginated":true}},"/rest/v1.1/projects/{project_id}/meeting_topics":{"post":{"operationId":"createProjectMeetingTopicV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"meeting_id":{"type":"integer"},"meeting_topic":{"properties":{"added_under_agenda":{"default":true,"type":"boolean"},"assignment_ids":{"items":{"oneOf":[{"type":"integer"},{"type":"string"}]},"type":"array"},"closed_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"is_private":{"type":"boolean"},"meeting_category_id":{"type":"integer"},"meeting_wide_number":{"type":"integer"},"minutes":{"type":"string"},"priority":{"enum":["","High","Medium","Low"],"type":"string"},"status":{"enum":["Open","On Hold","Closed"],"type":"string"},"title":{"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"title":"Meeting Topic","type":"object"}},"required":["meeting_id","meeting_topic"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"assignments":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_on":{"format":"date","type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"id":{"type":"integer"},"meeting_category":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"minutes":{"nullable":true,"type":"string"},"number":{"type":"string"},"position":{"type":"integer"},"priority":{"enum":["","High","Medium","Low",null],"nullable":true,"type":"string"},"status":{"enum":["Open","On Hold","Closed"],"type":"string"},"title":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create meeting topic","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/meeting_topics/{id}":{"patch":{"operationId":"updateProjectMeetingTopicV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"meeting_id":{"type":"integer"},"meeting_topic":{"properties":{"added_under_agenda":{"default":true,"type":"boolean"},"assignment_ids":{"items":{"oneOf":[{"type":"integer"},{"type":"string"}]},"type":"array"},"closed_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"is_private":{"type":"boolean"},"meeting_category_id":{"type":"integer"},"meeting_wide_number":{"type":"integer"},"minutes":{"type":"string"},"priority":{"enum":["","High","Medium","Low"],"type":"string"},"status":{"enum":["Open","On Hold","Closed"],"type":"string"},"title":{"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"title":"Meeting Topic","type":"object"}},"required":["meeting_id","meeting_topic"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignments":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_on":{"format":"date","type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"id":{"type":"integer"},"meeting_category":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"minutes":{"nullable":true,"type":"string"},"number":{"type":"string"},"position":{"type":"integer"},"priority":{"enum":["","High","Medium","Low",null],"nullable":true,"type":"string"},"status":{"enum":["Open","On Hold","Closed"],"type":"string"},"title":{"type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update meeting topic","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/meeting_topics/{meeting_topic_id}/parent_minutes":{"get":{"operationId":"listProjectMeetingTopicParentMinutesV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"meeting_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meeting_topic_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_on":{"format":"date","type":"string"},"id":{"type":"integer"},"marked":{"type":"boolean"},"meeting_id":{"type":"integer"},"meeting_position":{"type":"integer"},"minutes":{"type":"string"},"no_minutes":{"type":"boolean"}},"type":"object"},"type":"array"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Get the minutes and date created for all parent topics","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/meetings":{"get":{"operationId":"listProjectMeetingsV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"deleted_only","schema":{"type":"boolean"}},{"in":"query","name":"filters[assignee_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"filters[query]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[search]","required":false,"schema":{"type":"string"}},{"in":"query","name":"serializer_view","required":false,"schema":{"enum":["normal","extended"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"items":{"properties":{"group_title":{"type":"string"},"meetings":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"distributed_at":{"format":"date-time","type":"string"},"distributed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"ends_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_private":{"type":"boolean"},"last_distributed_event":{"enum":["minutes","agenda",null],"nullable":true,"type":"string"},"location":{"nullable":true,"type":"string"},"meeting_template_id":{"nullable":true,"type":"integer"},"meeting_topics_count":{"type":"integer"},"mode":{"enum":["minutes","agenda"],"type":"string"},"occurred":{"type":"boolean"},"parent_id":{"nullable":true,"type":"integer"},"position":{"type":"integer"},"starts_at":{"format":"date-time","type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},{"properties":{"meetings":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"distributed_at":{"format":"date-time","type":"string"},"distributed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"ends_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_private":{"type":"boolean"},"last_distributed_event":{"enum":["minutes","agenda",null],"nullable":true,"type":"string"},"location":{"nullable":true,"type":"string"},"meeting_template_id":{"nullable":true,"type":"integer"},"meeting_topics_count":{"type":"integer"},"mode":{"enum":["minutes","agenda"],"type":"string"},"occurred":{"type":"boolean"},"parent_id":{"nullable":true,"type":"integer"},"position":{"type":"integer"},"starts_at":{"format":"date-time","type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}]}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List meetings","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":true},"post":{"operationId":"createProjectMeetingV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"meeting":{"properties":{"attendees":{"items":{"type":"integer"},"type":"array"},"conclusion":{"type":"string"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"ends_at":{"type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"is_draft":{"type":"boolean"},"is_private":{"type":"boolean"},"location":{"type":"string"},"minutes":{"type":"string"},"occurred":{"default":false,"type":"boolean"},"overview":{"type":"string"},"position":{"default":1,"type":"integer"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"starts_at":{"type":"string"},"time_zone":{"type":"string"},"title":{"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"required":["position","starts_at","ends_at"],"title":"Meeting","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","meeting"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attendees":{"items":{"properties":{"id":{"type":"integer"},"login_information":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"status":{"enum":["Present","Absent","For Distribution Only","Conference",null],"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"conclusion":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"download_all_url":{"type":"string"},"ends_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_draft":{"type":"boolean"},"is_private":{"type":"boolean"},"location":{"nullable":true,"type":"string"},"meeting_categories":{"items":{"properties":{"id":{"type":"integer"},"meeting_topic":{"items":{"properties":{"assignments":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_on":{"format":"date","type":"string"},"download_all_url":{"type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"meeting_category":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"minutes":{"type":"string"},"number":{"type":"string"},"position":{"type":"integer"},"priority":{"enum":["","High","Medium","Low"],"type":"string"},"status":{"enum":["Open","On Hold","Closed"],"type":"string"},"title":{"type":"string"}},"type":"object"},"type":"array"},"position":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"type":"array"},"meeting_template_id":{"nullable":true,"type":"integer"},"mode":{"enum":["minutes","agenda"],"type":"string"},"occurred":{"type":"boolean"},"position":{"type":"integer"},"remote_meeting_url":{"nullable":true,"type":"string"},"starts_at":{"format":"date-time","type":"string"},"time_zone":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create meeting","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/meetings/referencing":{"get":{"description":"Requires the `view` permission on the project's meetings tool. A scoped API token needs `meetings:read`.","operationId":"listProjectMeetingsReferencingV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"tool","required":true,"schema":{"type":"string"}},{"in":"query","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"List meetings that reference a record","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/meetings/{id}":{"delete":{"operationId":"deleteProjectMeetingV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete meeting","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false},"get":{"operationId":"getProjectMeetingV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attendees":{"items":{"properties":{"id":{"type":"integer"},"login_information":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"status":{"enum":["Present","Absent","For Distribution Only","Conference",null],"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"conclusion":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"download_all_url":{"type":"string"},"ends_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_draft":{"type":"boolean"},"is_private":{"type":"boolean"},"location":{"nullable":true,"type":"string"},"meeting_categories":{"items":{"properties":{"id":{"type":"integer"},"meeting_topic":{"items":{"properties":{"assignments":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_on":{"format":"date","type":"string"},"download_all_url":{"type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"meeting_category":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"minutes":{"type":"string"},"number":{"type":"string"},"position":{"type":"integer"},"priority":{"enum":["","High","Medium","Low"],"type":"string"},"status":{"enum":["Open","On Hold","Closed"],"type":"string"},"title":{"type":"string"}},"type":"object"},"type":"array"},"position":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"type":"array"},"meeting_template_id":{"nullable":true,"type":"integer"},"mode":{"enum":["minutes","agenda"],"type":"string"},"occurred":{"type":"boolean"},"position":{"type":"integer"},"remote_meeting_url":{"nullable":true,"type":"string"},"starts_at":{"format":"date-time","type":"string"},"time_zone":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show meeting","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":false},"patch":{"operationId":"updateProjectMeetingV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"meeting":{"properties":{"conclusion":{"type":"string"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"ends_at":{"type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"is_draft":{"default":false,"type":"boolean"},"is_private":{"type":"boolean"},"location":{"type":"string"},"minutes":{"type":"string"},"occurred":{"default":false,"type":"boolean"},"overview":{"type":"string"},"position":{"type":"integer"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"starts_at":{"type":"string"},"time_zone":{"type":"string"},"title":{"type":"string"},"upload_ids":{"items":{"type":"string"},"type":"array"}},"title":"Meeting","type":"object"},"project_id":{"type":"integer"}},"required":["project_id","meeting"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attendees":{"items":{"properties":{"id":{"type":"integer"},"login_information":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"status":{"enum":["Present","Absent","For Distribution Only","Conference",null],"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"conclusion":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"download_all_url":{"type":"string"},"ends_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_draft":{"type":"boolean"},"is_private":{"type":"boolean"},"location":{"nullable":true,"type":"string"},"meeting_categories":{"items":{"properties":{"id":{"type":"integer"},"meeting_topic":{"items":{"properties":{"assignments":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_on":{"format":"date","type":"string"},"download_all_url":{"type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"meeting_category":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"minutes":{"type":"string"},"number":{"type":"string"},"position":{"type":"integer"},"priority":{"enum":["","High","Medium","Low"],"type":"string"},"status":{"enum":["Open","On Hold","Closed"],"type":"string"},"title":{"type":"string"}},"type":"object"},"type":"array"},"position":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"type":"array"},"meeting_template_id":{"nullable":true,"type":"integer"},"mode":{"enum":["minutes","agenda"],"type":"string"},"occurred":{"type":"boolean"},"position":{"type":"integer"},"remote_meeting_url":{"nullable":true,"type":"string"},"starts_at":{"format":"date-time","type":"string"},"time_zone":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update meeting","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/meetings/{id}/attachments":{"post":{"operationId":"createProjectMeetingAttachmentV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Upload meeting attachment","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/meetings/{id}/distribute":{"get":{"operationId":"listProjectMeetingDistributeV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"meeting_id":{"type":"integer"},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"recipients":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id"],"type":"object"},"type":"array"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"sent_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id"],"type":"object"}},"required":["id","meeting_id","sent_at","recipient_ids","recipients"],"type":"object"},"type":"array"}}}}},"summary":"List minutes distributions for a meeting","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":false},"post":{"operationId":"distributeProjectMeetingV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"distribution":{"properties":{"recipient_ids":{"items":{"type":"integer"},"type":"array"}},"type":"object"},"project_id":{"type":"integer"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"meeting_id":{"type":"integer"},"recipient_ids":{"items":{"type":"integer"},"type":"array"},"recipients":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id"],"type":"object"},"type":"array"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"sent_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id"],"type":"object"}},"required":["id","meeting_id","sent_at","recipient_ids","recipients"],"type":"object"}}}}},"summary":"Distribute a minutes-mode meeting's minutes","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/meetings/{id}/follow_up":{"post":{"operationId":"followUpProjectMeetingV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"follow_up":{"properties":{"ends_at":{"type":"string"},"location":{"nullable":true,"type":"string"},"starts_at":{"type":"string"},"time_zone":{"nullable":true,"type":"string"},"title":{"type":"string"}},"type":"object"},"project_id":{"type":"integer"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attendees":{"items":{"properties":{"id":{"type":"integer"},"login_information":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"status":{"enum":["Present","Absent","For Distribution Only","Conference",null],"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"conclusion":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"download_all_url":{"type":"string"},"ends_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_draft":{"type":"boolean"},"is_private":{"type":"boolean"},"location":{"nullable":true,"type":"string"},"meeting_categories":{"items":{"properties":{"id":{"type":"integer"},"meeting_topic":{"items":{"properties":{"assignments":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_on":{"format":"date","type":"string"},"download_all_url":{"type":"string"},"due_date":{"format":"date","type":"string"},"id":{"type":"integer"},"meeting_category":{"properties":{"id":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"minutes":{"type":"string"},"number":{"type":"string"},"position":{"type":"integer"},"priority":{"enum":["","High","Medium","Low"],"type":"string"},"status":{"enum":["Open","On Hold","Closed"],"type":"string"},"title":{"type":"string"}},"type":"object"},"type":"array"},"position":{"type":"integer"},"title":{"type":"string"}},"type":"object"},"type":"array"},"meeting_template_id":{"nullable":true,"type":"integer"},"mode":{"enum":["minutes","agenda"],"type":"string"},"occurred":{"type":"boolean"},"position":{"type":"integer"},"remote_meeting_url":{"nullable":true,"type":"string"},"starts_at":{"format":"date-time","type":"string"},"time_zone":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}}}}},"summary":"Create a follow-up meeting carrying forward open topics","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/meetings/{id}/recurrence":{"get":{"operationId":"listProjectMeetingRecurrenceV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"cadence":{"enum":["weekly","biweekly","monthly",null],"nullable":true,"type":"string"},"cadence_label":{"nullable":true,"type":"string"},"count":{"nullable":true,"type":"integer"},"created_count":{"type":"integer"},"end_date":{"format":"date","nullable":true,"type":"string"},"interval":{"type":"integer"},"occurrences":{"items":{"properties":{"ends_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"mode":{"enum":["agenda","minutes"],"type":"string"},"position":{"type":"integer"},"starts_at":{"format":"date-time","type":"string"},"title":{"type":"string"}},"required":["id","position","title","mode","starts_at","ends_at"],"type":"object"},"type":"array"},"series_id":{"type":"integer"},"start_date":{"format":"date","nullable":true,"type":"string"}},"required":["series_id","cadence","interval","count","created_count","occurrences"],"type":"object"}}}}},"summary":"Get a meeting series' recurrence definition and occurrences","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":false},"post":{"operationId":"recurrenceProjectMeetingV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"recurrence":{"properties":{"cadence":{"enum":["weekly","biweekly","monthly"],"type":"string"},"count":{"type":"integer"},"end_date":{"nullable":true,"type":"string"},"interval":{"type":"integer"},"start_date":{"nullable":true,"type":"string"}},"required":["cadence"],"type":"object"}},"required":["recurrence"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"cadence":{"enum":["weekly","biweekly","monthly",null],"nullable":true,"type":"string"},"cadence_label":{"nullable":true,"type":"string"},"count":{"nullable":true,"type":"integer"},"created_count":{"type":"integer"},"end_date":{"format":"date","nullable":true,"type":"string"},"interval":{"type":"integer"},"occurrences":{"items":{"properties":{"ends_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"mode":{"enum":["agenda","minutes"],"type":"string"},"position":{"type":"integer"},"starts_at":{"format":"date-time","type":"string"},"title":{"type":"string"}},"required":["id","position","title","mode","starts_at","ends_at"],"type":"object"},"type":"array"},"series_id":{"type":"integer"},"start_date":{"format":"date","nullable":true,"type":"string"}},"required":["series_id","cadence","interval","count","created_count","occurrences"],"type":"object"}}}}},"summary":"Define a recurrence on a meeting series and generate occurrences","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/meetings/{id}/topics/{topic_id}/attachments":{"post":{"operationId":"createProjectMeetingTopicAttachmentV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"topic_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK."},"401":{"description":"Missing, invalid or expired API token."},"403":{"description":"The token or user lacks the required scope or permission."},"404":{"description":"The record does not exist or belongs to another company."}},"summary":"Upload topic attachment","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/rfis/export":{"get":{"description":"Download the RFIs the caller can see as CSV (default) or PDF. Accepts the list filters (filters[...]) and filters[query] search. table_configuration_for_export is a JSON string; hidden columns are left out. At most 5,000 RFIs; larger matches return 422.","operationId":"listProjectRfisExportV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"export_format","schema":{"enum":["pdf","csv"],"type":"string"}},{"in":"query","name":"table_configuration_for_export","schema":{"description":"JSON: {\"columnState\":[{\"field\":\"subject\",\"hidden\":false}]}","type":"string"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}},"text/csv":{"schema":{"type":"string"}}},"description":"CSV or PDF document."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Download RFIs List","tags":["rfis"],"x-os-idempotent":false,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/rfis/{id}/advance_ball_in_court":{"patch":{"operationId":"advanceBallInCourtProjectRfiV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"link":{"format":"url","type":"string"},"location_id":{"type":"integer"},"questions":{"items":{"properties":{"body":{"type":"string"},"errors":{"items":{"properties":{"errors":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"}},"type":"object"},"type":"array"},"specification_section_id":{"type":"integer"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"},"response_required":{"type":"boolean"}},"type":"object"}]},"type":"array"},"ball_in_court":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"ball_in_courts":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"connect_export_origin":{"nullable":true,"properties":{"rfi_number":{"type":"string"},"source_provider_name":{"type":"string"}},"type":"object"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]},"cost_impact":{"nullable":true,"properties":{"status":{"nullable":true,"type":["string","null"]},"value":{"format":"float","nullable":true,"type":["number","null"]}},"type":["object","null"]},"created_at":{"format":"date-time","type":"string"},"current_revision":{"type":"boolean"},"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"full_number":{"type":"string"},"has_revisions":{"type":"boolean"},"id":{"type":"integer"},"initiated_at":{"format":"date-time","type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":["object","null"]},"number":{"type":"string"},"prefix":{"type":"string"},"private":{"type":"boolean"},"project_stage":{"nullable":true,"properties":{"default_stage":{"type":"boolean"},"dependent_projects":{"type":"integer"},"formatted_name":{"type":"string"},"formatted_parent_name":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"type":"integer"},"source_category":{"type":"boolean"}},"type":["object","null"]},"received_from":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}],"nullable":true},"reference":{"type":"string"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]},"revision":{"type":"string"},"rfi_manager":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}],"nullable":true},"schedule_impact":{"nullable":true,"properties":{"status":{"nullable":true,"type":["string","null"]},"value":{"nullable":true,"type":["integer","null"]}},"type":["object","null"]},"source_rfi_header_id":{"type":"integer"},"status":{"enum":["open","closed","draft","closed_with_revision","closed_draft"],"type":"string"},"sub_job":{"nullable":true,"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]},"subject":{"type":"string"},"time_resolved":{"format":"date-time","type":"string"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Advance Ball in Court","tags":["rfis"],"x-os-idempotent":true,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/rfis/{id}/forward_for_review":{"patch":{"operationId":"forwardForReviewProjectRfiV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"rfi":{"properties":{"forwardee_ids":{"items":{"type":"integer"},"type":"array"}},"type":"object"}},"required":["rfi"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"link":{"format":"url","type":"string"},"location_id":{"type":"integer"},"questions":{"items":{"properties":{"body":{"type":"string"},"errors":{"items":{"properties":{"errors":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"}},"type":"object"},"type":"array"},"specification_section_id":{"type":"integer"}},"type":"object"},{"properties":{"assignee":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"assignees":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"},"response_required":{"type":"boolean"}},"type":"object"}]},"type":"array"},"ball_in_court":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"ball_in_courts":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"connect_export_origin":{"nullable":true,"properties":{"rfi_number":{"type":"string"},"source_provider_name":{"type":"string"}},"type":"object"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]},"cost_impact":{"nullable":true,"properties":{"status":{"nullable":true,"type":["string","null"]},"value":{"format":"float","nullable":true,"type":["number","null"]}},"type":["object","null"]},"created_at":{"format":"date-time","type":"string"},"current_revision":{"type":"boolean"},"deleted":{"type":"boolean"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"oneOf":[{"format":"date","type":"string"},{"format":"date-time","type":"string"}]},"full_number":{"type":"string"},"has_revisions":{"type":"boolean"},"id":{"type":"integer"},"initiated_at":{"format":"date-time","type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":["object","null"]},"number":{"type":"string"},"prefix":{"type":"string"},"private":{"type":"boolean"},"project_stage":{"nullable":true,"properties":{"default_stage":{"type":"boolean"},"dependent_projects":{"type":"integer"},"formatted_name":{"type":"string"},"formatted_parent_name":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"parent_id":{"type":"integer"},"source_category":{"type":"boolean"}},"type":["object","null"]},"received_from":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}],"nullable":true},"reference":{"type":"string"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]},"revision":{"type":"string"},"rfi_manager":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}],"nullable":true},"schedule_impact":{"nullable":true,"properties":{"status":{"nullable":true,"type":["string","null"]},"value":{"nullable":true,"type":["integer","null"]}},"type":["object","null"]},"source_rfi_header_id":{"type":"integer"},"status":{"enum":["open","closed","draft","closed_with_revision","closed_draft"],"type":"string"},"sub_job":{"nullable":true,"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":["object","null"]},"subject":{"type":"string"},"time_resolved":{"format":"date-time","type":"string"},"translated_status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"}]}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Forward For Review","tags":["rfis"],"x-os-idempotent":true,"x-os-module":"rfis","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/schedule/requested_changes":{"get":{"operationId":"listProjectScheduleRequestedChangesV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"change_requested":{"type":"string"},"created_at":{"format":"date","nullable":true,"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"new_finish":{"format":"date","nullable":true,"type":"string"},"new_percentage":{"nullable":true,"type":"integer"},"new_start":{"format":"date","nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"old_finish":{"format":"date","nullable":true,"type":"string"},"old_percentage":{"nullable":true,"type":"integer"},"old_start":{"format":"date","nullable":true,"type":"string"},"other_change":{"type":"string"},"reason":{"nullable":true,"type":"string"},"status":{"type":"string"},"status_not_localized":{"enum":["approved","rejected","pending"],"type":"string"},"task_id":{"type":"integer"}},"required":["id","change_requested","status","status_not_localized"],"type":"object"},"type":"array"}}}}},"summary":"List schedule requested changes","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/schedule/requested_changes/review":{"patch":{"operationId":"updateProjectScheduleRequestedChangesReviewV11","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"requested_changes":{"items":{"properties":{"approved":{"type":"boolean"},"disposition_reason":{"type":"string"},"id":{"type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"change_requested":{"type":"string"},"id":{"type":"integer"},"notes":{"type":"string"},"reason":{"type":"string"},"requested_by":{"type":"string"},"status":{"type":"string"},"status_not_localized":{"enum":["approved","rejected","pending"],"type":"string"}},"required":["id","status","status_not_localized"],"type":"object"},"type":"array"}}}}},"summary":"Review (approve/reject) schedule requested changes","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/schedule/resource_assignments/{id}":{"get":{"operationId":"getProjectScheduleResourceAssignmentV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"resource_id":{"type":"integer"},"schedule_attributes":{"additionalProperties":{"type":"string"},"type":"object"},"task_id":{"type":"integer"}},"title":"Resource Assignment","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show resource assignment","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/schedule/resources":{"get":{"operationId":"listProjectScheduleResourcesV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[query]","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"company_id":{"type":"integer"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"project_id":{"type":"integer"},"schedule_attributes":{"additionalProperties":{"type":"string"},"type":"object"},"source_uid":{"type":"string"}},"title":"Resource","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Resources","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":true},"post":{"operationId":"createProjectScheduleResourceV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"resource":{"properties":{"name":{"type":"string"},"source_uid":{"type":"string"}},"title":"Resource","type":"object"}},"required":["project_id","resource"],"title":"Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"company_id":{"type":"integer"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"project_id":{"type":"integer"},"schedule_attributes":{"additionalProperties":{"type":"string"},"type":"object"},"source_uid":{"type":"string"}},"title":"Resource","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create resource","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/schedule/resources/{id}":{"delete":{"operationId":"deleteProjectScheduleResourceV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete resource","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false},"get":{"operationId":"getProjectScheduleResourceV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"company_id":{"type":"integer"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"project_id":{"type":"integer"},"schedule_attributes":{"additionalProperties":{"type":"string"},"type":"object"},"source_uid":{"type":"string"}},"title":"Resource","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show resource","tags":["schedule"],"x-os-idempotent":false,"x-os-module":"schedule","x-os-paginated":false},"patch":{"operationId":"updateProjectScheduleResourceV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"resource":{"properties":{"name":{"type":"string"},"source_uid":{"type":"string"}},"title":"Resource","type":"object"}},"required":["project_id","resource"],"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"company_id":{"type":"integer"},"deleted_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"project_id":{"type":"integer"},"schedule_attributes":{"additionalProperties":{"type":"string"},"type":"object"},"source_uid":{"type":"string"}},"title":"Resource","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update resource","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/schedule/tasks/{task_id}/requested_changes":{"post":{"operationId":"createProjectScheduleTaskRequestedChangeV11","parameters":[{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"task_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"requested_change":{"properties":{"change_reason":{"type":"string"},"notes":{"type":"string"},"other_change":{"type":"string"},"task":{"properties":{"finish":{"type":"string"},"percentage":{"type":"integer"},"start":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"change_requested":{"type":"string"},"created_at":{"format":"date","nullable":true,"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"new_finish":{"format":"date","nullable":true,"type":"string"},"new_percentage":{"nullable":true,"type":"integer"},"new_start":{"format":"date","nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"old_finish":{"format":"date","nullable":true,"type":"string"},"old_percentage":{"nullable":true,"type":"integer"},"old_start":{"format":"date","nullable":true,"type":"string"},"other_change":{"type":"string"},"reason":{"nullable":true,"type":"string"},"status":{"type":"string"},"status_not_localized":{"enum":["approved","rejected","pending"],"type":"string"},"task_id":{"type":"integer"}},"required":["id","change_requested","status","status_not_localized"],"type":"object"}}}}},"summary":"Create a schedule requested change","tags":["schedule"],"x-os-idempotent":true,"x-os-module":"schedule","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/submittals":{"get":{"operationId":"listProjectSubmittalsV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"description":"Current revisions with delivery planning: at_risk includes passed release/required/delivery dates and delivery forecasts after the required date; release_due includes unconfirmed release targets from today through 14 calendar days; missing_plan includes partial or invalid plans. Uses UTC date boundaries and intersects all visibility and other filters before pagination. Approval is not proof of ordering or receipt.","in":"query","name":"filters[procurement_queue]","schema":{"enum":["at_risk","release_due","missing_plan"],"type":"string"}},{"description":"Actionable current revisions: overdue open/draft reviews (before today in UTC), rejected or revise-and-resubmit items, or open/draft items in the authenticated user's ball in court. Intersects all other filters and visibility rules.","in":"query","name":"filters[review_queue]","schema":{"enum":["overdue","resubmit","assigned_to_me"],"type":"string"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[ball_in_court_id]","schema":{"type":"integer"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"filters[received_from_id]","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[responsible_contractor_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[required_on_site_date]","schema":{"items":{"format":"date","type":"string"},"type":"array"}},{"explode":false,"in":"query","name":"filters[specification_section_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[approver_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[current_revision]","schema":{"type":"boolean"}},{"explode":false,"in":"query","name":"filters[division]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[location_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[submittal_manager_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[submittal_package_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[response_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[status_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[type]","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"explode":false,"in":"query","name":"filters[unpackaged]","schema":{"type":"boolean"},"style":"form"},{"explode":false,"in":"query","name":"filters[number]","schema":{"items":{"type":"string"},"type":"array"}},{"explode":false,"in":"query","name":"filters[task_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[anticipated_delivery_date]","schema":{"items":{"format":"date","type":"string"},"type":"array"}},{"in":"query","name":"sort","schema":{"enum":["specification_section","number","title","type","status","responsible_contractor","submit_by","received_from","received_date","due_date","distributed_at","submittal_package","anticipated_delivery_date","actual_delivery_date","ball_in_court","buffer_time","closed_at","confirmed_delivery_date","cost_code","created_at","created_by","created_via","current_revision","design_team_review_time","first_distributed_at","for_record_only","internal_review_time","is_rejected","issue_date","lead_time","location","open_by","prepare_time","private","required_on_site_date","revision","specification_area","sub_job","submittal_workflow_template","updated_at","workflow_progress"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"actual_delivery_date":{"format":"date","nullable":true,"type":"string"},"approvers":{"items":{"properties":{"approver_type":{"type":"string"},"associated_attachments":{"items":{"properties":{"additional_page_count":{"type":"integer"},"attached_at":{"format":"date-time","type":"string"},"attachment_id":{"type":"integer"},"content_type":{"type":"string"},"document_markup_layer_id":{"nullable":true,"type":"integer"},"file_unavailable":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"markup_updated_at":{"format":"date-time","nullable":true,"type":"string"},"state":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"url":{"type":"string"},"version_timestamp":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"comment":{"nullable":true,"type":"string"},"days_to_respond":{"type":"integer"},"due_date":{"format":"date","type":"string"},"email_sent_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"response":{"properties":{"considered":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"response_required":{"type":"boolean"},"returned_date":{"format":"date","nullable":true,"type":"string"},"sent_date":{"format":"date","nullable":true,"type":"string"},"user":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"variance":{"nullable":true,"type":"number"},"workflow_group_number":{"type":"integer"}},"type":"object"},"type":"array"},"associated_attachments":{"items":{"properties":{"additional_page_count":{"type":"integer"},"attached_at":{"format":"date-time","type":"string"},"attachment_id":{"type":"integer"},"content_type":{"type":"string"},"document_markup_layer_id":{"nullable":true,"type":"integer"},"file_unavailable":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"markup_updated_at":{"format":"date-time","nullable":true,"type":"string"},"state":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"url":{"type":"string"},"version_timestamp":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"initials":{"type":"string"},"name":{"type":"string"},"vendor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"cost_code_id":{"nullable":true,"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"current_revision":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"distributed_at":{"format":"date-time","type":"string"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"formatted_number":{"type":"string"},"id":{"type":"integer"},"issue_date":{"format":"date","type":"string"},"last_distributed_submittal":{"nullable":true,"properties":{"distributed_attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"distributed_by":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"distributed_responses":{"items":{"properties":{"comment":{"type":"string"},"distributed_attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"submittal_approver_id":{"type":"integer"},"submittal_response":{"properties":{"considered":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submittal_response_id":{"type":"integer"},"user_id":{"type":"integer"}},"type":"object"},"type":"array"},"distributed_to":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"message":{"type":"string"},"sent_at":{"format":"date-time","type":"string"}},"type":"object"},"lead_time":{"type":"integer"},"linked_drawing_ids":{"items":{"type":"integer"},"type":"array"},"location_id":{"nullable":true,"type":"integer"},"number":{"type":"string"},"private":{"type":"boolean"},"received_date":{"format":"date","type":"string"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"required_on_site_date":{"format":"date","type":"string"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"revision":{"type":"string"},"scheduled_task":{"properties":{"finish_date":{"format":"date-time","type":"string"},"formatted_name":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"start_date":{"format":"date-time","type":"string"},"task_name":{"type":"string"}},"type":"object"},"specification_section":{"nullable":true,"properties":{"current_revision_id":{"type":"integer"},"id":{"type":"integer"},"label":{"type":"string"},"number":{"type":"string"}},"type":"object"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"}},"type":"object"},"sub_job_id":{"nullable":true,"type":"integer"},"submit_by":{"format":"date","type":"string"},"submittal_manager":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submittal_package":{"nullable":true,"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"number":{"type":"string"},"specification_section_id":{"type":"integer"},"submittal_ids":{"items":{"type":"integer"},"type":"array"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"submittal_workflow_template":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submittal_workflow_template_applied_at":{"format":"date-time","nullable":true,"type":"string"},"title":{"type":"string"},"type":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"},"translated_name":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Submittals on a project","tags":["submittals"],"x-os-idempotent":false,"x-os-module":"submittals","x-os-paginated":true},"post":{"operationId":"createProjectSubmittalV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"send_emails","schema":{"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"submittal":{"properties":{"actual_delivery_date":{"format":"date","type":"string"},"buffer_time":{"type":"integer"},"confirmed_delivery_date":{"format":"date","type":"string"},"cost_code_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_textarea_1":{"type":"string"},"custom_textfield_1":{"type":"string"},"design_team_review_time":{"type":"integer"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"for_record_only":{"type":"boolean"},"formatted_lead_time":{"type":"string"},"internal_review_time":{"type":"integer"},"is_rejected":{"type":"boolean"},"issue_date":{"format":"date","type":"string"},"lead_time":{"type":"integer"},"lead_time_format":{"enum":["days","weeks"],"type":"string"},"location_id":{"type":"integer"},"number":{"type":"string"},"prepare_time":{"type":"integer"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"received_date":{"format":"date","type":"string"},"received_from_id":{"type":"integer"},"rejected_submittal_log_approver_id":{"type":"integer"},"required_on_site_date":{"format":"date","type":"string"},"responsible_contractor_id":{"type":"integer"},"revision":{"type":"string"},"scheduled_task_id":{"type":"integer"},"scheduled_task_key":{"type":"string"},"source_submittal_log_id":{"type":"integer"},"source_submittal_revision_id":{"type":"integer"},"specification_section_id":{"type":"integer"},"status_id":{"type":"integer"},"sub_job_id":{"type":"integer"},"submit_by":{"format":"date","type":"string"},"submit_by_date_overridden":{"type":"boolean"},"submittal_manager_id":{"type":"integer"},"submittal_package_id":{"type":"integer"},"submittal_workflow_template_id":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"}},"required":["number"],"type":"object"}},"type":"object"}},"multipart/form-data":{"schema":{"properties":{"submittal":{"properties":{"actual_delivery_date":{"format":"date","type":"string"},"attachments":{"items":{"type":"string"},"type":"array"},"buffer_time":{"type":"integer"},"confirmed_delivery_date":{"format":"date","type":"string"},"cost_code_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_textarea_1":{"type":"string"},"custom_textfield_1":{"type":"string"},"design_team_review_time":{"type":"integer"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"for_record_only":{"type":"boolean"},"formatted_lead_time":{"type":"string"},"internal_review_time":{"type":"integer"},"is_rejected":{"type":"boolean"},"issue_date":{"format":"date","type":"string"},"lead_time":{"type":"integer"},"lead_time_format":{"enum":["days","weeks"],"type":"string"},"location_id":{"type":"integer"},"number":{"type":"string"},"prepare_time":{"type":"integer"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"received_date":{"format":"date","type":"string"},"received_from_id":{"type":"integer"},"rejected_submittal_log_approver_id":{"type":"integer"},"required_on_site_date":{"format":"date","type":"string"},"responsible_contractor_id":{"type":"integer"},"revision":{"type":"string"},"scheduled_task_id":{"type":"integer"},"scheduled_task_key":{"type":"string"},"source_submittal_log_id":{"type":"integer"},"specification_section_id":{"type":"integer"},"status_id":{"type":"integer"},"sub_job_id":{"type":"integer"},"submit_by":{"format":"date","type":"string"},"submit_by_date_overridden":{"type":"boolean"},"submittal_manager_id":{"type":"integer"},"submittal_package_id":{"type":"integer"},"submittal_workflow_template_id":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"},"workflow_data":{"items":{"items":{"properties":{"approver_type":{"enum":["Submitter","Approver"],"type":"string"},"days_to_respond":{"type":["integer","null"]},"due_date":{"format":"date","type":"string"},"login_information_id":{"type":"integer"},"response_required":{"type":"boolean"}},"type":"object"},"type":"array"},"type":"array"}},"required":["number"],"type":"object"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"actual_delivery_date":{"format":"date","nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"confirmed_delivery_date":{"format":"date","nullable":true,"type":"string"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"custom_textarea_1":{"nullable":true,"type":"string"},"custom_textfield_1":{"nullable":true,"type":"string"},"deleted_at":{"format":"date-time","type":"string"},"design_team_review_time":{"nullable":true,"type":"integer"},"distributed_submittals":{"items":{"properties":{"distributed_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"distributed_to":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"final_attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"message":{"type":"string"},"selected_approver_ids":{"items":{"type":"integer"},"type":"array"},"sent_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"internal_review_time":{"nullable":true,"type":"integer"},"lead_time":{"nullable":true,"type":"integer"},"required_on_site_date":{"format":"date","nullable":true,"type":"string"},"rich_text_description":{"type":"string"},"scheduled_task":{"nullable":true,"properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"}},"title":"Task","type":"object"},"source_submittal_log_id":{"type":"integer"}},"type":"object"},{"properties":{"approvers":{"items":{"allOf":[{"properties":{"approver_type":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"nullable":true,"type":"string"},"days_to_respond":{"type":["integer","null"]},"distributed":{"type":"boolean"},"due_date":{"format":"date","nullable":true,"type":"string"},"email_sent_at":{"format":"date-time","nullable":true,"type":"string"},"response":{"allOf":[{"properties":{"considered":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"response_required":{"type":"boolean"},"returned_date":{"format":"date","nullable":true,"type":"string"},"sent_date":{"format":"date","nullable":true,"type":"string"},"submittal_associated_attachment_ids":{"items":{"type":"integer"},"type":"array"},"user":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"workflow_group_number":{"type":"integer"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"type":"array"},"attachments_count":{"type":"integer"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"buffer_time":{"nullable":true,"type":"integer"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_revision":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"distributed_at":{"format":"date-time","nullable":true,"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"for_record_only":{"type":"boolean"},"formatted_number":{"type":"string"},"is_rejected":{"type":"boolean"},"issue_date":{"format":"date","nullable":true,"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"open_date":{"format":"date","nullable":true,"type":"string"},"operation_item_errors":{"items":{"properties":{"attribute":{"type":"string"},"message":{"type":"string"}},"type":"object"},"type":"array"},"prepare_time":{"nullable":true,"type":"integer"},"private":{"type":"boolean"},"received_date":{"format":"date","nullable":true,"type":"string"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"rejected_submittal_log_approver_id":{"nullable":true,"type":"integer"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"specification_section":{"properties":{"current_revision_id":{"type":"integer"},"id":{"type":"integer"},"label":{"type":"string"},"number":{"type":"string"}},"type":"object"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"}},"type":"object"},"sub_job":{"nullable":true,"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submit_by":{"format":"date","nullable":true,"type":"string"},"submittal_manager":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"submittal_package":{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"submittal_ids":{"items":{"type":"integer"},"type":"array"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"title":{"type":"string"}},"type":"object"}]},"submittal_workflow_template":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submittal_workflow_template_applied_at":{"format":"date-time","nullable":true,"type":"string"},"type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"revision":{"type":"string"},"title":{"type":"string"}},"type":"object"}]}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Submittal","tags":["submittals"],"x-os-idempotent":true,"x-os-module":"submittals","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/submittals/recycle_bin":{"get":{"operationId":"listProjectSubmittalsRecycleBinV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[ball_in_court_id]","schema":{"type":"integer"}},{"in":"query","name":"filters[created_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"filters[received_from_id]","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[responsible_contractor_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[specification_section_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[approver_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[current_revision]","schema":{"type":"boolean"}},{"explode":false,"in":"query","name":"filters[division]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[location_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[submittal_manager_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[submittal_package_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[response_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[status_id]","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"filters[type]","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"sort","schema":{"enum":["specification_section","number","title","type","status","responsible_contractor","submit_by","received_from","received_date","due_date","distributed_at","submittal_package","anticipated_delivery_date","actual_delivery_date","ball_in_court","buffer_time","closed_at","confirmed_delivery_date","cost_code","created_at","created_by","created_via","current_revision","design_team_review_time","first_distributed_at","for_record_only","internal_review_time","is_rejected","issue_date","lead_time","location","open_by","prepare_time","private","required_on_site_date","revision","specification_area","sub_job","submittal_workflow_template","updated_at","workflow_progress"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"approvers":{"items":{"allOf":[{"properties":{"approver_type":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"days_to_respond":{"type":["integer","null"]},"distributed":{"type":"boolean"},"due_date":{"format":"date","type":"string"},"email_sent_at":{"format":"date-time","nullable":true,"type":"string"},"response":{"allOf":[{"properties":{"considered":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"response_required":{"type":"boolean"},"returned_date":{"format":"date","type":"string"},"sent_date":{"format":"date","type":"string"},"submittal_associated_attachment_ids":{"items":{"type":"integer"},"type":"array"},"user":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"workflow_group_number":{"type":"integer"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"type":"array"},"attachments_count":{"type":"integer"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"buffer_time":{"type":"integer"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_revision":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"distributed_at":{"format":"date-time","nullable":true,"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"for_record_only":{"type":"boolean"},"formatted_number":{"type":"string"},"is_rejected":{"type":"boolean"},"issue_date":{"format":"date","nullable":true,"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"open_date":{"format":"date","nullable":true,"type":"string"},"operation_item_errors":{"items":{"properties":{"attribute":{"type":"string"},"message":{"type":"string"}},"type":"object"},"type":"array"},"private":{"type":"boolean"},"received_date":{"format":"date","nullable":true,"type":"string"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"rejected_submittal_log_approver_id":{"nullable":true,"type":"integer"},"required_on_site_date":{"format":"date","nullable":true,"type":"string"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"scheduled_task":{"nullable":true,"properties":{"finish_date":{"format":"date-time","type":"string"},"formatted_name":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"start_date":{"format":"date-time","type":"string"},"task_name":{"type":"string"}},"type":"object"},"specification_section":{"properties":{"current_revision_id":{"type":"integer"},"id":{"type":"integer"},"label":{"type":"string"},"number":{"type":"string"}},"type":"object"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"}},"type":"object"},"sub_job":{"nullable":true,"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submit_by":{"format":"date","nullable":true,"type":"string"},"submittal_manager":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"submittal_package":{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"submittal_ids":{"items":{"type":"integer"},"type":"array"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"title":{"type":"string"}},"type":"object"}]},"submittal_workflow_template":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submittal_workflow_template_applied_at":{"format":"date-time","nullable":true,"type":"string"},"type":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"revision":{"type":"string"},"title":{"type":"string"}},"type":"object"}]},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List of deleted Submittals","tags":["submittals"],"x-os-idempotent":false,"x-os-module":"submittals","x-os-paginated":true}},"/rest/v1.1/projects/{project_id}/submittals/{id}":{"delete":{"operationId":"deleteProjectSubmittalV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"500":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Submittal","tags":["submittals"],"x-os-idempotent":true,"x-os-module":"submittals","x-os-paginated":false},"get":{"operationId":"getProjectSubmittalV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"actual_delivery_date":{"format":"date","nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"confirmed_delivery_date":{"format":"date","nullable":true,"type":"string"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"custom_textarea_1":{"nullable":true,"type":"string"},"custom_textfield_1":{"nullable":true,"type":"string"},"deleted_at":{"format":"date-time","type":"string"},"design_team_review_time":{"nullable":true,"type":"integer"},"distributed_submittals":{"items":{"properties":{"distributed_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"distributed_to":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"final_attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"message":{"type":"string"},"selected_approver_ids":{"items":{"type":"integer"},"type":"array"},"sent_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"internal_review_time":{"nullable":true,"type":"integer"},"lead_time":{"nullable":true,"type":"integer"},"required_on_site_date":{"format":"date","nullable":true,"type":"string"},"rich_text_description":{"type":"string"},"scheduled_task":{"nullable":true,"properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"}},"title":"Task","type":"object"},"source_submittal_log_id":{"type":"integer"}},"type":"object"},{"properties":{"approvers":{"items":{"allOf":[{"properties":{"approver_type":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"nullable":true,"type":"string"},"days_to_respond":{"type":["integer","null"]},"distributed":{"type":"boolean"},"due_date":{"format":"date","nullable":true,"type":"string"},"email_sent_at":{"format":"date-time","nullable":true,"type":"string"},"response":{"allOf":[{"properties":{"considered":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"response_required":{"type":"boolean"},"returned_date":{"format":"date","nullable":true,"type":"string"},"sent_date":{"format":"date","nullable":true,"type":"string"},"submittal_associated_attachment_ids":{"items":{"type":"integer"},"type":"array"},"user":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"workflow_group_number":{"type":"integer"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"type":"array"},"attachments_count":{"type":"integer"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"buffer_time":{"nullable":true,"type":"integer"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_revision":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"distributed_at":{"format":"date-time","nullable":true,"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"for_record_only":{"type":"boolean"},"formatted_number":{"type":"string"},"is_rejected":{"type":"boolean"},"issue_date":{"format":"date","nullable":true,"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"open_date":{"format":"date","nullable":true,"type":"string"},"operation_item_errors":{"items":{"properties":{"attribute":{"type":"string"},"message":{"type":"string"}},"type":"object"},"type":"array"},"prepare_time":{"nullable":true,"type":"integer"},"private":{"type":"boolean"},"received_date":{"format":"date","nullable":true,"type":"string"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"rejected_submittal_log_approver_id":{"nullable":true,"type":"integer"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"specification_section":{"properties":{"current_revision_id":{"type":"integer"},"id":{"type":"integer"},"label":{"type":"string"},"number":{"type":"string"}},"type":"object"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"}},"type":"object"},"sub_job":{"nullable":true,"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submit_by":{"format":"date","nullable":true,"type":"string"},"submittal_manager":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"submittal_package":{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"submittal_ids":{"items":{"type":"integer"},"type":"array"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"title":{"type":"string"}},"type":"object"}]},"submittal_workflow_template":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submittal_workflow_template_applied_at":{"format":"date-time","nullable":true,"type":"string"},"type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"revision":{"type":"string"},"title":{"type":"string"}},"type":"object"}]}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Submittal","tags":["submittals"],"x-os-idempotent":false,"x-os-module":"submittals","x-os-paginated":false},"patch":{"operationId":"updateProjectSubmittalV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"send_emails","schema":{"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"submittal":{"properties":{"actual_delivery_date":{"format":"date","type":"string"},"buffer_time":{"type":"integer"},"confirmed_delivery_date":{"format":"date","type":"string"},"cost_code_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_textarea_1":{"type":"string"},"custom_textfield_1":{"type":"string"},"design_team_review_time":{"type":"integer"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"for_record_only":{"type":"boolean"},"formatted_lead_time":{"type":"string"},"internal_review_time":{"type":"integer"},"is_rejected":{"type":"boolean"},"issue_date":{"format":"date","type":"string"},"lead_time":{"type":"integer"},"lead_time_format":{"enum":["days","weeks"],"type":"string"},"location_id":{"type":"integer"},"number":{"type":"string"},"prepare_time":{"type":"integer"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"received_date":{"format":"date","type":"string"},"received_from_id":{"type":"integer"},"rejected_submittal_log_approver_id":{"type":"integer"},"required_on_site_date":{"format":"date","type":"string"},"responsible_contractor_id":{"type":"integer"},"revision":{"type":"string"},"scheduled_task_id":{"type":"integer"},"scheduled_task_key":{"type":"string"},"source_submittal_log_id":{"type":"integer"},"source_submittal_revision_id":{"type":"integer"},"specification_section_id":{"type":"integer"},"status_id":{"type":"integer"},"sub_job_id":{"type":"integer"},"submit_by":{"format":"date","type":"string"},"submit_by_date_overridden":{"type":"boolean"},"submittal_manager_id":{"type":"integer"},"submittal_package_id":{"type":"integer"},"submittal_workflow_template_id":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"}},"required":["number"],"type":"object"}},"type":"object"}},"multipart/form-data":{"schema":{"properties":{"submittal":{"properties":{"actual_delivery_date":{"format":"date","type":"string"},"attachments":{"items":{"type":"string"},"type":"array"},"buffer_time":{"type":"integer"},"confirmed_delivery_date":{"format":"date","type":"string"},"cost_code_id":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_textarea_1":{"type":"string"},"custom_textfield_1":{"type":"string"},"design_team_review_time":{"type":"integer"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"for_record_only":{"type":"boolean"},"formatted_lead_time":{"type":"string"},"internal_review_time":{"type":"integer"},"is_rejected":{"type":"boolean"},"issue_date":{"format":"date","type":"string"},"lead_time":{"type":"integer"},"lead_time_format":{"enum":["days","weeks"],"type":"string"},"location_id":{"type":"integer"},"number":{"type":"string"},"prepare_time":{"type":"integer"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"received_date":{"format":"date","type":"string"},"received_from_id":{"type":"integer"},"rejected_submittal_log_approver_id":{"type":"integer"},"required_on_site_date":{"format":"date","type":"string"},"responsible_contractor_id":{"type":"integer"},"revision":{"type":"string"},"scheduled_task_id":{"type":"integer"},"scheduled_task_key":{"type":"string"},"source_submittal_log_id":{"type":"integer"},"specification_section_id":{"type":"integer"},"status_id":{"type":"integer"},"sub_job_id":{"type":"integer"},"submit_by":{"format":"date","type":"string"},"submit_by_date_overridden":{"type":"boolean"},"submittal_manager_id":{"type":"integer"},"submittal_package_id":{"type":"integer"},"submittal_workflow_template_id":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"},"workflow_data":{"items":{"items":{"properties":{"approver_type":{"enum":["Submitter","Approver"],"type":"string"},"days_to_respond":{"type":["integer","null"]},"due_date":{"format":"date","type":"string"},"login_information_id":{"type":"integer"},"response_required":{"type":"boolean"}},"type":"object"},"type":"array"},"type":"array"}},"required":["number"],"type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"actual_delivery_date":{"format":"date","nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"confirmed_delivery_date":{"format":"date","nullable":true,"type":"string"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"custom_textarea_1":{"nullable":true,"type":"string"},"custom_textfield_1":{"nullable":true,"type":"string"},"deleted_at":{"format":"date-time","type":"string"},"design_team_review_time":{"nullable":true,"type":"integer"},"distributed_submittals":{"items":{"properties":{"distributed_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"distributed_to":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"final_attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"message":{"type":"string"},"selected_approver_ids":{"items":{"type":"integer"},"type":"array"},"sent_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"internal_review_time":{"nullable":true,"type":"integer"},"lead_time":{"nullable":true,"type":"integer"},"required_on_site_date":{"format":"date","nullable":true,"type":"string"},"rich_text_description":{"type":"string"},"scheduled_task":{"nullable":true,"properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"}},"title":"Task","type":"object"},"source_submittal_log_id":{"type":"integer"}},"type":"object"},{"properties":{"approvers":{"items":{"allOf":[{"properties":{"approver_type":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"nullable":true,"type":"string"},"days_to_respond":{"type":["integer","null"]},"distributed":{"type":"boolean"},"due_date":{"format":"date","nullable":true,"type":"string"},"email_sent_at":{"format":"date-time","nullable":true,"type":"string"},"response":{"allOf":[{"properties":{"considered":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"response_required":{"type":"boolean"},"returned_date":{"format":"date","nullable":true,"type":"string"},"sent_date":{"format":"date","nullable":true,"type":"string"},"submittal_associated_attachment_ids":{"items":{"type":"integer"},"type":"array"},"user":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"workflow_group_number":{"type":"integer"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"type":"array"},"attachments_count":{"type":"integer"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"buffer_time":{"nullable":true,"type":"integer"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_revision":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"distributed_at":{"format":"date-time","nullable":true,"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"for_record_only":{"type":"boolean"},"formatted_number":{"type":"string"},"is_rejected":{"type":"boolean"},"issue_date":{"format":"date","nullable":true,"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"open_date":{"format":"date","nullable":true,"type":"string"},"operation_item_errors":{"items":{"properties":{"attribute":{"type":"string"},"message":{"type":"string"}},"type":"object"},"type":"array"},"prepare_time":{"nullable":true,"type":"integer"},"private":{"type":"boolean"},"received_date":{"format":"date","nullable":true,"type":"string"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"rejected_submittal_log_approver_id":{"nullable":true,"type":"integer"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"specification_section":{"properties":{"current_revision_id":{"type":"integer"},"id":{"type":"integer"},"label":{"type":"string"},"number":{"type":"string"}},"type":"object"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"}},"type":"object"},"sub_job":{"nullable":true,"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submit_by":{"format":"date","nullable":true,"type":"string"},"submittal_manager":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"submittal_package":{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"submittal_ids":{"items":{"type":"integer"},"type":"array"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"title":{"type":"string"}},"type":"object"}]},"submittal_workflow_template":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submittal_workflow_template_applied_at":{"format":"date-time","nullable":true,"type":"string"},"type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"revision":{"type":"string"},"title":{"type":"string"}},"type":"object"}]}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Submittal","tags":["submittals"],"x-os-idempotent":true,"x-os-module":"submittals","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/submittals/{id}/revisions":{"get":{"operationId":"listProjectSubmittalRevisionsV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"allOf":[{"properties":{"actual_delivery_date":{"format":"date","nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"confirmed_delivery_date":{"format":"date","nullable":true,"type":"string"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"custom_textarea_1":{"nullable":true,"type":"string"},"custom_textfield_1":{"nullable":true,"type":"string"},"deleted_at":{"format":"date-time","type":"string"},"design_team_review_time":{"nullable":true,"type":"integer"},"distributed_submittals":{"items":{"properties":{"distributed_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"distributed_to":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"final_attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"message":{"type":"string"},"selected_approver_ids":{"items":{"type":"integer"},"type":"array"},"sent_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"internal_review_time":{"nullable":true,"type":"integer"},"lead_time":{"nullable":true,"type":"integer"},"required_on_site_date":{"format":"date","nullable":true,"type":"string"},"rich_text_description":{"type":"string"},"scheduled_task":{"nullable":true,"properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"}},"title":"Task","type":"object"},"source_submittal_log_id":{"type":"integer"}},"type":"object"},{"properties":{"approvers":{"items":{"allOf":[{"properties":{"approver_type":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"nullable":true,"type":"string"},"days_to_respond":{"type":["integer","null"]},"distributed":{"type":"boolean"},"due_date":{"format":"date","nullable":true,"type":"string"},"email_sent_at":{"format":"date-time","nullable":true,"type":"string"},"response":{"allOf":[{"properties":{"considered":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"response_required":{"type":"boolean"},"returned_date":{"format":"date","nullable":true,"type":"string"},"sent_date":{"format":"date","nullable":true,"type":"string"},"submittal_associated_attachment_ids":{"items":{"type":"integer"},"type":"array"},"user":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"workflow_group_number":{"type":"integer"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"type":"array"},"attachments_count":{"type":"integer"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"buffer_time":{"nullable":true,"type":"integer"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_revision":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"distributed_at":{"format":"date-time","nullable":true,"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"for_record_only":{"type":"boolean"},"formatted_number":{"type":"string"},"is_rejected":{"type":"boolean"},"issue_date":{"format":"date","nullable":true,"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"open_date":{"format":"date","nullable":true,"type":"string"},"operation_item_errors":{"items":{"properties":{"attribute":{"type":"string"},"message":{"type":"string"}},"type":"object"},"type":"array"},"prepare_time":{"nullable":true,"type":"integer"},"private":{"type":"boolean"},"received_date":{"format":"date","nullable":true,"type":"string"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"rejected_submittal_log_approver_id":{"nullable":true,"type":"integer"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"specification_section":{"properties":{"current_revision_id":{"type":"integer"},"id":{"type":"integer"},"label":{"type":"string"},"number":{"type":"string"}},"type":"object"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"}},"type":"object"},"sub_job":{"nullable":true,"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submit_by":{"format":"date","nullable":true,"type":"string"},"submittal_manager":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"submittal_package":{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"submittal_ids":{"items":{"type":"integer"},"type":"array"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"title":{"type":"string"}},"type":"object"}]},"submittal_workflow_template":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submittal_workflow_template_applied_at":{"format":"date-time","nullable":true,"type":"string"},"type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"revision":{"type":"string"},"title":{"type":"string"}},"type":"object"}]},"type":"array"}}}}},"summary":"List a submittal's revisions","tags":["submittals"],"x-os-idempotent":false,"x-os-module":"submittals","x-os-paginated":false},"post":{"operationId":"createProjectSubmittalRevisionV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"actual_delivery_date":{"format":"date","nullable":true,"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"confirmed_delivery_date":{"format":"date","nullable":true,"type":"string"},"cost_code":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"created_at":{"format":"date-time","type":"string"},"custom_textarea_1":{"nullable":true,"type":"string"},"custom_textfield_1":{"nullable":true,"type":"string"},"deleted_at":{"format":"date-time","type":"string"},"design_team_review_time":{"nullable":true,"type":"integer"},"distributed_submittals":{"items":{"properties":{"distributed_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"distributed_to":{"items":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"type":"array"},"final_attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"integer"},"message":{"type":"string"},"selected_approver_ids":{"items":{"type":"integer"},"type":"array"},"sent_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"distribution_members":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"internal_review_time":{"nullable":true,"type":"integer"},"lead_time":{"nullable":true,"type":"integer"},"required_on_site_date":{"format":"date","nullable":true,"type":"string"},"rich_text_description":{"type":"string"},"scheduled_task":{"nullable":true,"properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"}},"title":"Task","type":"object"},"source_submittal_log_id":{"type":"integer"}},"type":"object"},{"properties":{"approvers":{"items":{"allOf":[{"properties":{"approver_type":{"type":"string"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"nullable":true,"type":"string"},"days_to_respond":{"type":["integer","null"]},"distributed":{"type":"boolean"},"due_date":{"format":"date","nullable":true,"type":"string"},"email_sent_at":{"format":"date-time","nullable":true,"type":"string"},"response":{"allOf":[{"properties":{"considered":{"type":"string"},"name":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"response_required":{"type":"boolean"},"returned_date":{"format":"date","nullable":true,"type":"string"},"sent_date":{"format":"date","nullable":true,"type":"string"},"submittal_associated_attachment_ids":{"items":{"type":"integer"},"type":"array"},"user":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"workflow_group_number":{"type":"integer"}},"type":"object"},{"properties":{"id":{"type":"integer"}},"type":"object"}]},"type":"array"},"attachments_count":{"type":"integer"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"buffer_time":{"nullable":true,"type":"integer"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"created_by":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"current_revision":{"type":"boolean"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"distributed_at":{"format":"date-time","nullable":true,"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"for_record_only":{"type":"boolean"},"formatted_number":{"type":"string"},"is_rejected":{"type":"boolean"},"issue_date":{"format":"date","nullable":true,"type":"string"},"location":{"nullable":true,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"open_date":{"format":"date","nullable":true,"type":"string"},"operation_item_errors":{"items":{"properties":{"attribute":{"type":"string"},"message":{"type":"string"}},"type":"object"},"type":"array"},"prepare_time":{"nullable":true,"type":"integer"},"private":{"type":"boolean"},"received_date":{"format":"date","nullable":true,"type":"string"},"received_from":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"rejected_submittal_log_approver_id":{"nullable":true,"type":"integer"},"responsible_contractor":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"specification_section":{"properties":{"current_revision_id":{"type":"integer"},"id":{"type":"integer"},"label":{"type":"string"},"number":{"type":"string"}},"type":"object"},"status":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string"}},"type":"object"},"sub_job":{"nullable":true,"properties":{"code":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submit_by":{"format":"date","nullable":true,"type":"string"},"submittal_manager":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"submittal_package":{"allOf":[{"properties":{"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"attachments_count":{"type":"integer"},"created_by":{"allOf":[{"properties":{"login":{"type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}]},"submittal_ids":{"items":{"type":"integer"},"type":"array"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"title":{"type":"string"}},"type":"object"}]},"submittal_workflow_template":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"submittal_workflow_template_applied_at":{"format":"date-time","nullable":true,"type":"string"},"type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},{"properties":{"id":{"type":"integer"},"number":{"type":"string"},"revision":{"type":"string"},"title":{"type":"string"}},"type":"object"}]}}}}},"summary":"Create a new revision of a submittal","tags":["submittals"],"x-os-idempotent":true,"x-os-module":"submittals","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/uploads":{"post":{"operationId":"createProjectUploadV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"header","name":"OS-Company-Id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"attachment_content_disposition":{"default":false,"type":"boolean"},"response_content_type":{"default":"application/octet-stream","type":"string"},"response_filename":{"maxLength":255,"minLength":1,"type":"string"},"size":{"maximum":52428800,"minimum":1,"type":"integer"}},"required":["response_filename"],"type":"object"}},"multipart/form-data":{"schema":{"additionalProperties":false,"properties":{"attachment_content_disposition":{"default":false,"type":"boolean"},"response_content_type":{"default":"application/octet-stream","type":"string"},"response_filename":{"maxLength":255,"minLength":1,"type":"string"},"size":{"maximum":52428800,"minimum":1,"type":"integer"}},"required":["response_filename"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"fields":{"properties":{"capability":{"type":"string"},"uuid":{"type":"string"}},"required":["uuid","capability"],"type":"object"},"url":{"format":"uri","type":"string"},"uuid":{"format":"uuid","type":"string"}},"required":["uuid","url","fields"],"type":"object"}}}},"400":{},"401":{},"403":{},"404":{},"413":{},"429":{}},"summary":"Initiate a local nonsegmented upload","tags":["direct_uploads"],"x-os-idempotent":true,"x-os-module":"direct_uploads","x-os-paginated":false}},"/rest/v1.1/projects/{project_id}/uploads/{uuid}":{"get":{"operationId":"getProjectUploadV11","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"header","name":"OS-Company-Id","required":true,"schema":{"minimum":1,"type":"integer"}},{"in":"path","name":"uuid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"fields":{"properties":{"capability":{"type":"string"},"uuid":{"type":"string"}},"required":["uuid","capability"],"type":"object"},"url":{"format":"uri","type":"string"},"uuid":{"format":"uuid","type":"string"}},"required":["uuid","url","fields"],"type":"object"}}}},"401":{},"403":{},"404":{}},"summary":"Show a local nonsegmented upload","tags":["direct_uploads"],"x-os-idempotent":false,"x-os-module":"direct_uploads","x-os-paginated":false}},"/rest/v1.1/punch_items":{"get":{"operationId":"listPunchItemsV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filters[status]","schema":{"enum":["open","closed","pending"],"type":"string"}},{"in":"query","name":"filters[priority]","schema":{"enum":["low","medium","high"],"type":"string"}},{"in":"query","name":"filters[punch_item_type_id]","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[location_id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[include_sublocations]","schema":{"default":false,"type":"boolean"}},{"in":"query","name":"filters[approver_login_information_id]","schema":{"type":"integer"}},{"in":"query","name":"filters[vendor_id]","schema":{"type":"integer"}},{"in":"query","name":"filters[assignee_response]","schema":{"default":false,"type":"boolean"}},{"in":"query","name":"filters[trade_id]","schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[category_id]","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"in":"query","name":"sort","schema":{"enum":["id","position","name","due","created_at","closed_at","description","priority","workflow_status","location_name","punch_item_type_name","reference","status_text","trade_name","category_name","closed_by","created_by","final_approver","punch_item_manager"],"type":"string"}},{"explode":false,"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"in":"query","name":"filters[query]","schema":{"type":"string"}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"filters[failed_items_by_operation_id]","required":false,"schema":{"type":"integer"}},{"in":"query","name":"filters[error_category]","required":false,"schema":{"oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"assignees":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"assignments":{"items":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"login_information_id":{"type":"integer"},"login_information_name":{"type":"string"},"manager_accepted_at":{"format":"date-time","type":"string"},"notified_at":{"format":"date-time","type":"string"},"responded_at":{"format":"date-time","type":"string"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"user_name":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"category":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Category","type":"object"},"closed_at":{"format":"date-time","type":"string"},"closed_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"cost_impact_amount":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"enum":["DRAFT","OPEN","CLOSED"],"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"legacy_workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"nullable":true,"type":"string"},"name":{"type":"string"}},"title":"Punch Item Custom Status","type":"object"},"custom_status_id":{"nullable":true,"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"final_approver":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"has_resolved_responses":{"type":"boolean"},"has_unresolved_responses":{"type":"boolean"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"punch_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Type","type":"object"},"reference":{"type":"string"},"schedule_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"schedule_risk_confidence":{"type":"integer"},"schedule_risk_probability":{"type":"integer"},"schedule_risk_reason":{"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"title":"Punch Item","type":"object"},"type":"array"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Punch Items","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true},"post":{"operationId":"createPunchItemV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"punch_item":{"properties":{"category_id":{"nullable":true,"type":"integer"},"cost_code_id":{"type":"integer"},"cost_impact":{"type":"string"},"cost_impact_amount":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_status_id":{"nullable":true,"type":"integer"},"date_initiated":{"format":"date","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"due":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"final_approver_id":{"type":"integer"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"location_id":{"type":"integer"},"login_information_ids":{"items":{"type":"integer"},"type":"array"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"punch_item_manager_id":{"type":"integer"},"punch_item_type_id":{"type":"integer"},"reference":{"type":"string"},"schedule_impact":{"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"status":{"enum":["open","closed"],"type":"string"},"trade_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"required":["name"],"title":"Punch Item","type":"object"}},"required":["project_id","punch_item"],"title":"Punch Item Body","type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"project_id":{"type":"integer"},"punch_item":{"properties":{"category_id":{"nullable":true,"type":"integer"},"cost_code_id":{"type":"integer"},"cost_impact":{"type":"string"},"cost_impact_amount":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_status_id":{"nullable":true,"type":"integer"},"date_initiated":{"format":"date","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"due":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"final_approver_id":{"type":"integer"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"images":{"items":{"type":"string"},"type":"array"},"location_id":{"type":"integer"},"login_information_ids":{"items":{"type":"integer"},"type":"array"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager_id":{"type":"integer"},"punch_item_type_id":{"type":"integer"},"reference":{"type":"string"},"schedule_impact":{"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"status":{"enum":["open","closed"],"type":"string"},"trade_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"required":["name"],"title":"Punch Item","type":"object"}},"required":["project_id","punch_item"],"title":"Punch Item Body","type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"assignments":{"items":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"formatted_status":{"type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"notified_at":{"format":"date","type":"string"},"ready_for_review_at":{"format":"date","type":"string"},"updated_at":{"format":"date","type":"string"},"work_not_accepted_at":{"format":"date","type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"attached_to_item_id":{"nullable":true,"type":"integer"},"attached_to_item_type":{"nullable":true,"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"can_email":{"type":"boolean"},"category":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Category","type":"object"},"closed_at":{"format":"date-time","type":"string"},"closed_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Closed By","type":"object"},"comments":{"items":{"properties":{"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Comment","type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"cost_impact_amount":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"enum":["DRAFT","OPEN","CLOSED"],"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"legacy_workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"nullable":true,"type":"string"},"name":{"type":"string"}},"title":"Punch Item Custom Status","type":"object"},"date_initiated":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"distribution_members":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"download_all_attachments_uuid":{"type":"string"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"final_approver":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Final Approver","type":"object"},"id":{"type":"integer"},"images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Manager","type":"object"},"punch_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Type","type":"object"},"reference":{"type":"string"},"rich_text_description":{"type":"string"},"schedule_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"type":"string"},"schedule_risk_reason":{"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"web_images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"title":"Punch Item","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Create Punch Item","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.1/punch_items/recycle_bin":{"get":{"operationId":"listPunchItemsRecycleBinV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"explode":false,"in":"query","name":"filters[category_id]","required":false,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"in":"query","name":"sort","schema":{"enum":["id","position","name","due","created_at","closed_at","description","priority","workflow_status","location_name","punch_item_type_name","reference","status_text","trade_name","category_name","closed_by","created_by","final_approver","punch_item_manager"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignees":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"assignments":{"items":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"login_information_id":{"type":"integer"},"login_information_name":{"type":"string"},"manager_accepted_at":{"format":"date-time","type":"string"},"notified_at":{"format":"date-time","type":"string"},"responded_at":{"format":"date-time","type":"string"},"status":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"user_name":{"type":"string"},"vendor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Compact","type":"object"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"category":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Category","type":"object"},"closed_at":{"format":"date-time","type":"string"},"closed_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"cost_impact_amount":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"nullable":true,"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"variant":{"type":"string"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"},"variant":{"type":"string"}},"type":"object"}},"type":"object"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"enum":["DRAFT","OPEN","CLOSED"],"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"legacy_workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"nullable":true,"type":"string"},"name":{"type":"string"}},"title":"Punch Item Custom Status","type":"object"},"custom_status_id":{"nullable":true,"type":"integer"},"deleted_at":{"format":"date-time","type":"string"},"due_date":{"format":"date","type":"string"},"final_approver":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"has_resolved_responses":{"type":"boolean"},"has_unresolved_responses":{"type":"boolean"},"id":{"type":"integer"},"location":{"nullable":true,"properties":{"code":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager":{"properties":{"company_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"punch_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Type","type":"object"},"reference":{"type":"string"},"schedule_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"schedule_risk_confidence":{"type":"integer"},"schedule_risk_probability":{"type":"integer"},"schedule_risk_reason":{"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"title":"Punch Item","type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"List Deleted Punch Items","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.1/punch_items/send_all_unsent":{"post":{"operationId":"createPunchItemsSendAllUnsentV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"punch_ids":{"items":{"type":"integer"},"type":"array"},"recipient":{"enum":["assignee","manager"],"type":"string"}},"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Send All Unsent Punch Item Emails","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.1/punch_items/send_unsent":{"post":{"operationId":"createPunchItemsSendUnsentV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"}},"required":["project_id"],"type":"object"}}},"required":true},"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Send unsent Punch Items","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.1/punch_items/{id}":{"delete":{"operationId":"deletePunchItemV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Delete Punch Item","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false},"get":{"operationId":"getPunchItemV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"project_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"include_deleted","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignments":{"items":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"formatted_status":{"type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"notified_at":{"format":"date","type":"string"},"ready_for_review_at":{"format":"date","type":"string"},"updated_at":{"format":"date","type":"string"},"work_not_accepted_at":{"format":"date","type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"attached_to_item_id":{"nullable":true,"type":"integer"},"attached_to_item_type":{"nullable":true,"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"can_email":{"type":"boolean"},"category":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Category","type":"object"},"closed_at":{"format":"date-time","type":"string"},"closed_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Closed By","type":"object"},"comments":{"items":{"properties":{"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Comment","type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"cost_impact_amount":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"enum":["DRAFT","OPEN","CLOSED"],"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"legacy_workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"nullable":true,"type":"string"},"name":{"type":"string"}},"title":"Punch Item Custom Status","type":"object"},"date_initiated":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"distribution_members":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"download_all_attachments_uuid":{"type":"string"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"final_approver":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Final Approver","type":"object"},"id":{"type":"integer"},"images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Manager","type":"object"},"punch_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Type","type":"object"},"reference":{"type":"string"},"rich_text_description":{"type":"string"},"schedule_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"type":"string"},"schedule_risk_reason":{"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"web_images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"title":"Punch Item","type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Show Punch Item","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":false},"patch":{"operationId":"updatePunchItemV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"run_configurable_validations","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"project_id":{"type":"integer"},"punch_item":{"properties":{"category_id":{"nullable":true,"type":"integer"},"cost_impact":{"type":"string"},"cost_impact_amount":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_status_id":{"nullable":true,"type":"integer"},"date_initiated":{"format":"date","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"due":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"final_approver_id":{"type":"integer"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"location_id":{"type":"integer"},"login_information_ids":{"items":{"type":"integer"},"type":"array"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"prostore_file_ids":{"items":{"type":"integer"},"type":"array"},"punch_item_manager_id":{"type":"integer"},"punch_item_type_id":{"type":"integer"},"reference":{"type":"string"},"schedule_impact":{"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"status":{"enum":["open","closed"],"type":"string"},"trade_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"required":["name"],"title":"Punch Item","type":"object"}},"required":["project_id","punch_item"],"title":"Punch Item Body","type":"object"}},"multipart/form-data":{"schema":{"properties":{"attachments":{"items":{"type":"string"},"type":"array"},"project_id":{"type":"integer"},"punch_item":{"properties":{"category_id":{"nullable":true,"type":"integer"},"cost_impact":{"type":"string"},"cost_impact_amount":{"type":"integer"},"custom_field_%{custom_field_definition_id}":{"oneOf":[{"title":"string","type":"string"},{"title":"number","type":"number"},{"title":"boolean","type":"boolean"},{"items":{"type":"integer"},"title":"array","type":"array"}]},"custom_status_id":{"nullable":true,"type":"integer"},"date_initiated":{"format":"date","type":"string"},"distribution_member_ids":{"items":{"type":"integer"},"type":"array"},"drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"due":{"format":"date","type":"string"},"file_version_ids":{"items":{"type":"integer"},"type":"array"},"final_approver_id":{"type":"integer"},"form_ids":{"items":{"type":"integer"},"type":"array"},"image_ids":{"items":{"type":"integer"},"type":"array"},"images":{"items":{"type":"string"},"type":"array"},"location_id":{"type":"integer"},"login_information_ids":{"items":{"type":"integer"},"type":"array"},"mt_location":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager_id":{"type":"integer"},"punch_item_type_id":{"type":"integer"},"reference":{"type":"string"},"schedule_impact":{"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"enum":["ml_low","ml_medium","ml_high"],"type":"string"},"status":{"enum":["open","closed"],"type":"string"},"trade_id":{"type":"integer"},"upload_ids":{"items":{"type":"string"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"required":["name"],"title":"Punch Item","type":"object"}},"required":["project_id","punch_item"],"title":"Punch Item Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assignments":{"items":{"properties":{"approved":{"type":"boolean"},"attachments":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable":{"type":"boolean"}},"type":"object"},"type":"array"},"comment":{"type":"string"},"formatted_status":{"type":"string"},"id":{"type":"integer"},"login_information":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"notified_at":{"format":"date","type":"string"},"ready_for_review_at":{"format":"date","type":"string"},"updated_at":{"format":"date","type":"string"},"work_not_accepted_at":{"format":"date","type":"string"}},"type":"object"},"type":"array"},"attachments":{"items":{"properties":{"attached_to_item_id":{"nullable":true,"type":"integer"},"attached_to_item_type":{"nullable":true,"type":"string"},"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"},"viewable_document_id":{"type":"integer"},"viewer_url":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"ball_in_court":{"items":{"properties":{"id":{"type":"integer"},"locale":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"can_email":{"type":"boolean"},"category":{"nullable":true,"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Category","type":"object"},"closed_at":{"format":"date-time","type":"string"},"closed_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Closed By","type":"object"},"comments":{"items":{"properties":{"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"creator":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Comment","type":"object"},"type":"array"},"cost_code":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"cost_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"cost_impact_amount":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"created_by":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Creator","type":"object"},"current_drawing_revision_ids":{"items":{"type":"integer"},"type":"array"},"custom_fields":{"properties":{"custom_field_%{custom_field_boolean_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"boolean"}},"type":"object"},"custom_field_%{custom_field_decimal_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"number"}},"type":"object"},"custom_field_%{custom_field_lov_entries_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"items":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"custom_field_%{custom_field_lov_entry_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"properties":{"id":{"type":"integer"},"label":{"type":"string"}},"type":"object"}},"type":"object"},"custom_field_%{custom_field_string_definition_id}":{"properties":{"data_type":{"type":"string"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"custom_status":{"nullable":true,"properties":{"default":{"type":"boolean"},"global_status":{"properties":{"id":{"type":"integer"},"name":{"enum":["DRAFT","OPEN","CLOSED"],"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"legacy_workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"nullable":true,"type":"string"},"name":{"type":"string"}},"title":"Punch Item Custom Status","type":"object"},"date_initiated":{"format":"date","type":"string"},"deleted_at":{"format":"date-time","type":"string"},"distribution_members":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"download_all_attachments_uuid":{"type":"string"},"drawing_ids":{"items":{"type":"integer"},"type":"array"},"due_date":{"format":"date","type":"string"},"final_approver":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Final Approver","type":"object"},"id":{"type":"integer"},"images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"location":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"node_name":{"type":"string"},"parent_id":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"Location","type":"object"},"name":{"type":"string"},"position":{"type":"integer"},"priority":{"type":"string"},"private":{"type":"boolean"},"punch_item_manager":{"properties":{"company_name":{"type":"string"},"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"title":"Punch Item Manager","type":"object"},"punch_item_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"title":"Punch Item Type","type":"object"},"reference":{"type":"string"},"rich_text_description":{"type":"string"},"schedule_impact":{"enum":["yes_known","yes_unknown","no_impact","tbd","n_a"],"type":"string"},"schedule_impact_days":{"type":"integer"},"schedule_risk":{"type":"string"},"schedule_risk_reason":{"type":"string"},"status":{"enum":["Open","Closed","Overdue","Pending"],"type":"string"},"trade":{"properties":{"active":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"Trade","type":"object"},"updated_at":{"format":"date-time","type":"string"},"web_images":{"items":{"properties":{"filename":{"type":"string"},"id":{"type":"integer"},"url":{"type":"string"}},"type":"object"},"type":"array"},"workflow_status":{"enum":["draft","initiated","in_dispute","work_required","ready_for_review","work_not_accepted","ready_to_close","not_accepted_by_creator","closed"],"type":"string"}},"title":"Punch Item","type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Update Punch Item","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v1.1/punch_items/{id}/send_email":{"post":{"operationId":"sendEmailPunchItemV11","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bcc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"body":{"type":"string"},"cc_distribution_ids":{"items":{"type":"integer"},"type":"array"},"distribution_ids":{"items":{"type":"integer"},"type":"array"},"subject":{"type":"string"}},"title":"Body","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{}}}},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}},"422":{"content":{"application/json":{"schema":{"properties":{"code":{"format":"int32","type":"integer"},"error":{"nullable":true,"type":"string"},"fields":{"type":"string"},"message":{"type":"string"},"reason":{"type":"string"}},"type":"object"}}}}},"summary":"Send Punch Item Email","tags":["punch_list"],"x-os-idempotent":true,"x-os-module":"punch_list","x-os-paginated":false}},"/rest/v2.0/companies/{company_id}/budget_views/{budget_view_id}":{"get":{"operationId":"getCompanyBudgetViewV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"budget_view_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"source_snapshot_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"project_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"assigned_projects_count":{"type":"integer"},"assignment_level":{"enum":["company","project","erp_integrated_projects","non_erp_integrated_projects"],"type":"string"},"columns":{"items":{"properties":{"actuals":{"nullable":true,"type":"boolean"},"aggregatable":{"type":"boolean"},"alias":{"type":"string"},"attribute":{"type":"string"},"definition":{"oneOf":[{"properties":{"sources":{"items":{"properties":{"filters":{"items":{"properties":{"label":{"type":"string"},"type":{"type":"string"},"values":{"items":{"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},{"properties":{"original_label":{"type":"string"}},"type":"object"},{"properties":{"formatted_list":{"items":{"type":"string"},"type":"array"}},"type":"object"}],"type":"object"},"display_rules":{"nullable":true,"properties":{"scope":{"enum":["include","exclude"],"type":"string"},"segment_id":{"type":"string"},"segment_items":{"items":{"properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"segment_type":{"type":"string"}},"type":"object"},"editable":{"nullable":true,"type":"boolean"},"enable_lump_sum_manual_entries":{"nullable":true,"type":"boolean"},"format":{"type":"string"},"id":{"type":"string"},"importable":{"nullable":true,"type":"boolean"},"label":{"type":"string"},"position":{"type":"number"},"show_cell_details":{"nullable":true,"type":"boolean"},"spreadable":{"nullable":true,"type":"boolean"},"type":{"type":"string"}},"type":"object"},"type":"array"},"created_by":{"nullable":true,"type":"string"},"date_created":{"type":"string"},"groupings":{"items":{"properties":{"label":{"type":"string"},"tier":{"type":"integer"},"type":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"string"},"name":{"type":"string"},"role":{"enum":["budgeting","forecasting"],"type":"string"},"total_projects_count":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"summary":"Get a Budget View","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":false}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/budget_line_items":{"get":{"operationId":"listCompanyProjectBudgetLineItemsV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"filters[wbs_code_id]","required":false,"schema":{"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"calculation_strategy":{"enum":["automatic","manual"],"type":"string"},"company_id":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"currency_configuration":{"allOf":[{"properties":{"base_currency_iso_code":{"nullable":true,"type":"string"},"currency_iso_code":{"nullable":true,"type":"string"}}},{"properties":{"currency_exchange_rate":{"nullable":true,"pattern":"^[-+]?[0-9]*\\.?[0-9]+$","type":"string"}},"type":"object"}],"type":"object"},"id":{"type":"string"},"original_budget_amount":{"type":"string"},"project_id":{"type":"string"},"quantity":{"nullable":true,"type":"number"},"unit_cost":{"nullable":true,"type":"string"},"uom":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"},"wbs_code":{"nullable":true,"properties":{"flat_code":{"nullable":true,"type":"string"},"id":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"}},"type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Page":{"schema":{"type":"integer"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"500":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"summary":"List Budget Line Items","tags":["budget"],"x-os-idempotent":false,"x-os-module":"budget","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/budget_line_items/{id}":{"delete":{"operationId":"deleteCompanyProjectBudgetLineItemV20","parameters":[{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{},"404":{}},"summary":"Delete Budget Line Item","tags":["budget"],"x-os-idempotent":true,"x-os-module":"budget","x-os-paginated":false}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/meetings":{"get":{"description":"Meetings of the project as a flat list: { data: [meeting] }. Supported filters: filters[id], filters[assignee_id], filters[mode], filters[deleted]=true (recycle bin). Other listed filters are accepted and ignored.","operationId":"listCompanyProjectMeetingsV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"filters[id]","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"in":"query","name":"filters[assignee_id]","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"in":"query","name":"filters[title]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[public]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[draft]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[mode]","required":false,"schema":{"enum":["agenda","meetings"],"type":"string"}},{"in":"query","name":"filter[root_id]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[template_id]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[from]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[to]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[roots]","required":false,"schema":{"type":"string"}},{"in":"query","name":"filters[deleted]","required":false,"schema":{"type":"string"}},{"in":"query","name":"view","required":false,"schema":{"enum":["default","meeting_information","compact","mobile"],"type":"string"}},{"in":"query","name":"sort","required":false,"schema":{"enum":["created_at","-created_at","title","-title","updated_at","-updated_at","deleted_at","-deleted_at","id","-id"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by_id":{"nullable":true,"type":"integer"},"distributed_at":{"format":"date-time","type":"string"},"distributed_by":{"nullable":true,"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"ends_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"is_private":{"type":"boolean"},"last_distributed_event":{"enum":["minutes","agenda",null],"nullable":true,"type":"string"},"location":{"nullable":true,"type":"string"},"meeting_template_id":{"nullable":true,"type":"integer"},"meeting_topics_count":{"type":"integer"},"mode":{"enum":["minutes","agenda"],"type":"string"},"occurred":{"type":"boolean"},"parent_id":{"nullable":true,"type":"integer"},"position":{"type":"integer"},"starts_at":{"format":"date-time","type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"List meetings","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":true},"post":{"description":"Create a meeting. The body is the meeting itself (no wrapper); start_time / finish_time are accepted as aliases of starts_at / ends_at. meeting_template_id, custom fields and minutes approvers are not supported and are ignored.","operationId":"createCompanyProjectMeetingV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/meetings_MeetingBody"},{"properties":{"finish_time":{"format":"date-time","type":"string"},"start_time":{"format":"date-time","type":"string"}},"type":"object"}]}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/meetings_Meeting"}},"type":"object"}}},"description":"The created meeting."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"POST Meeting","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/meetings/{id}":{"get":{"operationId":"getCompanyProjectMeetingV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","name":"view","required":false,"schema":{"enum":["mobile","meeting_information"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/meetings_Meeting"}},"type":"object"}}},"description":"The meeting."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"GET Meeting","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/meetings/{id}/categories/{category_id}":{"delete":{"description":"Delete a category of the meeting. Its topics stay on the meeting, uncategorized. Needs meetings edit permission.","operationId":"deleteCompanyProjectMeetingCategoryV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"category_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Delete meeting category","tags":["meetings"],"x-os-idempotent":true,"x-os-module":"meetings","x-os-paginated":false}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/meetings/{id}/change_history":{"get":{"description":"The meeting's audit trail, newest first (sort=created_at for oldest first), one entry per changed field. Events without a field diff (created, recycled, distributed) have column, old_value and new_value null.","operationId":"listCompanyProjectMeetingChangeHistoryV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"sort","required":false,"schema":{"enum":["created_at"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"action":{"type":"string"},"column":{"nullable":true,"type":"string"},"created_at":{"format":"date-time","type":"string"},"created_by":{"nullable":true,"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"id":{"type":"string"},"new_value":{"nullable":true,"type":"string"},"old_value":{"nullable":true,"type":"string"},"summary":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Get Meeting Change History","tags":["meetings"],"x-os-idempotent":false,"x-os-module":"meetings","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/prime_contracts":{"get":{"description":"List the project's prime contracts the caller can see. Same resource, service and checks as the v1.0 prime contract routes (contract privacy, SOV visibility, billing locks, capabilities), with company and project in the path and a `{ data }` envelope.","operationId":"listCompanyProjectPrimeContractsV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"filters[contractor_id]","required":false,"schema":{"oneOf":[{"title":"exact","type":"integer"},{"items":{"type":"integer"},"title":"any of","type":"array"}]}},{"in":"query","name":"filters[id]","required":false,"schema":{"oneOf":[{"title":"exact","type":"integer"},{"items":{"type":"integer"},"title":"any of","type":"array"}]}},{"in":"query","name":"filters[status]","required":false,"schema":{"oneOf":[{"title":"exact","type":"string"},{"items":{"type":"string"},"title":"any of","type":"array"}]}},{"in":"query","name":"filters[updated_at]","required":false,"schema":{"oneOf":[{"format":"date-time","title":"exact","type":"string"},{"items":{"format":"date-time","type":"string"},"title":"any of","type":"array"},{"title":"range","type":"string"}]}},{"in":"query","name":"filters[vendor_id]","required":false,"schema":{"oneOf":[{"title":"exact","type":"integer"},{"items":{"type":"integer"},"title":"any of","type":"array"}]}},{"in":"query","name":"filters[executed]","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/prime_contracts_PrimeContractListItem"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Prime contracts.","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"List Prime Contracts","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":true},"post":{"description":"Create a prime contract. Same resource, service and checks as the v1.0 prime contract routes (contract privacy, SOV visibility, billing locks, capabilities), with company and project in the path and a `{ data }` envelope.","operationId":"createCompanyProjectPrimeContractV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/prime_contracts_PrimeContractV2Body"}],"required":["title"]}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/prime_contracts_PrimeContract"}},"required":["data"],"type":"object"}}},"description":"The created prime contract."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Create Prime Contract","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/prime_contracts/{contract_id}/summary":{"get":{"description":"Financial summary of a prime contract the caller can see. Amounts are decimal strings with two places. Tax amounts and currency configuration are not tracked separately and are not returned.","operationId":"listCompanyProjectPrimeContractSummaryV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"contract_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"approved_change_total":{"format":"decimal","type":"string"},"draft_change_total":{"format":"decimal","type":"string"},"original_contract_amount":{"format":"decimal","type":"string"},"pending_revised_change_total":{"format":"decimal","type":"string"},"percent_paid":{"format":"decimal","type":"string"},"remaining_balance_outstanding":{"format":"decimal","type":"string"},"revised_contract_amount":{"description":"Original + approved change orders.","format":"decimal","type":"string"},"total_invoices_amount":{"description":"Certified billing to date.","format":"decimal","type":"string"},"total_payments_amount":{"format":"decimal","type":"string"}},"type":"object"}},"required":["data"],"type":"object"}}},"description":"Summary."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Show Prime Contract Summary","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/prime_contracts/{prime_contract_id}":{"delete":{"description":"Soft-delete a prime contract. Refused (409) while billing is allocated against it. Same resource, service and checks as the v1.0 prime contract routes (contract privacy, SOV visibility, billing locks, capabilities), with company and project in the path and a `{ data }` envelope.","operationId":"deleteCompanyProjectPrimeContractV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."}},"summary":"Delete Prime Contract","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false},"get":{"description":"Show a prime contract. Same resource, service and checks as the v1.0 prime contract routes (contract privacy, SOV visibility, billing locks, capabilities), with company and project in the path and a `{ data }` envelope.","operationId":"getCompanyProjectPrimeContractV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/prime_contracts_PrimeContract"}},"required":["data"],"type":"object"}}},"description":"The prime contract."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Show Prime Contract","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false},"patch":{"description":"Update a prime contract (only the fields sent change). Same resource, service and checks as the v1.0 prime contract routes (contract privacy, SOV visibility, billing locks, capabilities), with company and project in the path and a `{ data }` envelope.","operationId":"updateCompanyProjectPrimeContractV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prime_contracts_PrimeContractV2Body"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/prime_contracts_PrimeContract"}},"required":["data"],"type":"object"}}},"description":"The updated prime contract."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Update Prime Contract","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/prime_contracts/{prime_contract_id}/attachments":{"get":{"description":"Attachments of a prime contract the caller can see (paginated).","operationId":"listCompanyProjectPrimeContractAttachmentsV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"can_be_viewed":{"type":"boolean"},"content_type":{"nullable":true,"type":"string"},"filename":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Attachments.","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"List Prime Contract Attachments","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/prime_contracts/{prime_contract_id}/line_items":{"get":{"description":"Schedule of values lines of a prime contract (needs SOV visibility). Same resource, service and checks as the v1.0 prime contract routes (contract privacy, SOV visibility, billing locks, capabilities), with company and project in the path and a `{ data }` envelope.","operationId":"listCompanyProjectPrimeContractLineItemsV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/prime_contracts_PrimeContractLineItem"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Line items.","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"List Prime Contract Line Items","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":true},"post":{"description":"Add a schedule of values line. Same resource, service and checks as the v1.0 prime contract routes (contract privacy, SOV visibility, billing locks, capabilities), with company and project in the path and a `{ data }` envelope.","operationId":"createCompanyProjectPrimeContractLineItemV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prime_contracts_PrimeContractLineItemV2Body"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/prime_contracts_PrimeContractLineItem"}},"required":["data"],"type":"object"}}},"description":"The created line."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Create Prime Contract Line Item","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/prime_contracts/{prime_contract_id}/line_items/{id}":{"delete":{"operationId":"deleteCompanyProjectPrimeContractLineItemV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"204":{"description":"Deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."}},"summary":"Delete Prime Contract Line Item","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false},"get":{"operationId":"getCompanyProjectPrimeContractLineItemV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/prime_contracts_PrimeContractLineItem"}},"required":["data"],"type":"object"}}},"description":"The line."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Show Prime Contract Line Item","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false},"patch":{"operationId":"updateCompanyProjectPrimeContractLineItemV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prime_contracts_PrimeContractLineItemV2Body"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/prime_contracts_PrimeContractLineItem"}},"required":["data"],"type":"object"}}},"description":"The updated line."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Update Prime Contract Line Item","tags":["prime_contracts"],"x-os-idempotent":true,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/prime_contracts/{prime_contract_id}/pdf":{"get":{"description":"The prime contract as a PDF (general information, parties, dates, schedule of values), generated synchronously.","operationId":"listCompanyProjectPrimeContractPdfV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"prime_contract_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"PDF document."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Download prime contract PDF","tags":["prime_contracts"],"x-os-idempotent":false,"x-os-module":"prime_contracts","x-os-paginated":false}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/punch_list/assignee_companies":{"get":{"description":"Built from the punch items the caller can see; query filters by name. per_page defaults to 10 (max 100).","operationId":"listCompanyProjectPunchListAssigneeCompaniesV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"query","required":false,"schema":{"type":"string"}},{"in":"query","name":"view","required":false,"schema":{"enum":["recycle_bin"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"allOf":[{"properties":{"is_active":{"type":"boolean"},"logo":{"nullable":true,"type":"string"}},"title":"minimal view","type":"object"},{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"title":"name view","type":"object"}]},"type":"array"}},"type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"summary":"List Punch Item Assignee Company Filter Options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/punch_list/assignees":{"get":{"description":"Built from the punch items the caller can see; query filters by name. per_page defaults to 10 (max 100).","operationId":"listCompanyProjectPunchListAssigneesV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"query","required":false,"schema":{"type":"string"}},{"in":"query","name":"view","required":false,"schema":{"enum":["recycle_bin"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login"],"type":"object"},"type":"array"}},"type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"summary":"List Punch Item Assignee Filter Options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/punch_list/ball_in_court":{"get":{"description":"Built from the punch items the caller can see; query filters by name. per_page defaults to 10 (max 100).","operationId":"listCompanyProjectPunchListBallInCourtV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login"],"type":"object"},"type":"array"}},"type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"summary":"List Punch Item Ball In Court Filter Options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/punch_list/closed_by_contacts":{"get":{"description":"Built from the punch items the caller can see; query filters by name. per_page defaults to 10 (max 100).","operationId":"listCompanyProjectPunchListClosedByContactsV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login"],"type":"object"},"type":"array"}},"type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"summary":"List Punch Item Closed By Contact Filter Options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/punch_list/creators":{"get":{"description":"Built from the punch items the caller can see; query filters by name. per_page defaults to 10 (max 100).","operationId":"listCompanyProjectPunchListCreatorsV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login"],"type":"object"},"type":"array"}},"type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"summary":"List Punch Item Creator Filter Options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/punch_list/final_approvers":{"get":{"description":"Built from the punch items the caller can see; query filters by name. per_page defaults to 10 (max 100).","operationId":"listCompanyProjectPunchListFinalApproversV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login"],"type":"object"},"type":"array"}},"type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"summary":"List Punch Item Final Approver Filter Options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/punch_list/locations":{"get":{"description":"Built from the punch items the caller can see; query filters by name. per_page defaults to 10 (max 100).","operationId":"listCompanyProjectPunchListLocationsV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}},"type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"summary":"List Punch Item Location Filter Options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/punch_list/punch_item_managers":{"get":{"description":"Built from the punch items the caller can see; query filters by name. per_page defaults to 10 (max 100).","operationId":"listCompanyProjectPunchListPunchItemManagersV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"company_name":{"type":"string"},"id":{"type":"string"},"login":{"type":"string"},"name":{"type":"string"}},"required":["id","login"],"type":"object"},"type":"array"}},"type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"summary":"List Punch Item Manager Filter Options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/punch_list/types":{"get":{"description":"Built from the punch items the caller can see; query filters by name. per_page defaults to 10 (max 100).","operationId":"listCompanyProjectPunchListTypesV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"type":"object"},"type":"array"}},"type":"object"}}},"headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"items":{"properties":{"message":{"type":"string"},"reason_code":{"type":"string"},"source":{"type":"string"}},"required":["reason_code","message"],"type":"object"},"type":"array"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"summary":"List Punch Item Type Filter Options","tags":["punch_list"],"x-os-idempotent":false,"x-os-module":"punch_list","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/specification_section_divisions":{"get":{"description":"Live divisions.","operationId":"listCompanyProjectSpecificationSectionDivisionsV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"description":{"type":"string"},"id":{"type":"string"},"number":{"type":"string"}},"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"List Specification Sections Divisions","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/specification_section_revisions":{"get":{"description":"Every live revision of live sections, ordered by section number.","operationId":"listCompanyProjectSpecificationSectionRevisionsV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/specifications_SpecificationRevisionV2"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"List Specification Sections Revisions for a Project","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/specification_sections":{"get":{"description":"Live sections with their current division. Filters: filter_set_id, filter_division_id, filters[division_ids], search_string.","operationId":"listCompanyProjectSpecificationSectionsV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filter_set_id","schema":{"type":"integer"}},{"in":"query","name":"filter_division_id","schema":{"type":"integer"}},{"in":"query","name":"filters[division_ids]","schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"search_string","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"current_revision_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"number":{"type":"string"},"specification_section_division_id":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"List Specification Sections for a Project","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true}},"/rest/v2.0/companies/{company_id}/projects/{project_id}/specification_sets":{"get":{"description":"Specification sets. is_recycle_bin=true lists deleted sets. `deletable` is false while a set holds revisions.","operationId":"listCompanyProjectSpecificationSetsV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"is_recycle_bin","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/specifications_SpecificationSetV2"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"List Specification Sets for a Project","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true},"patch":{"description":"Create, update and delete sets in one request. Updates and deletes run in one transaction; deleting a set that still holds revisions returns 409. Returns the project's sets. Requires Specifications admin.","operationId":"updateCompanyProjectSpecificationSetsV20","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"creation_params":{"items":{"properties":{"date":{"format":"date","nullable":true,"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"}},"required":["name"],"type":"object"},"maxItems":100,"type":"array"},"deletion_params":{"items":{"properties":{"id":{"type":"integer"}},"required":["id"],"type":"object"},"maxItems":100,"type":"array"},"updation_params":{"items":{"properties":{"date":{"format":"date","nullable":true,"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"}},"required":["id"],"type":"object"},"maxItems":100,"type":"array"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/specifications_SpecificationSetV2"},"type":"array"}},"required":["data"],"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Bulk update for Specification Sets for a Project","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_configuration/distribution_groups":{"get":{"description":"The project's distribution groups (Directory) with member user ids.","operationId":"listCompanyProjectSpecificationConfigurationDistributionGroupsV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"description":{"nullable":true,"type":"string"},"id":{"type":"integer"},"member_ids":{"items":{"type":"integer"},"type":"array"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"List distribution groups for Specifications","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_configuration/potential_distribution_members":{"get":{"description":"Active project members a specification revision can be emailed to.","operationId":"listCompanyProjectSpecificationConfigurationPotentialDistributionMembersV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"id":{"type":"integer"},"login":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"List potential distribution members for Specifications","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_section_divisions":{"get":{"description":"Live divisions with the live sections and revisions classified under them (`deletable` when none).","operationId":"listCompanyProjectSpecificationSectionDivisionsV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"id","schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"search_string","schema":{"type":"string"}},{"in":"query","name":"specification_set_ids","schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/specifications_SpecificationDivisionV2"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"List Specification Section Divisions","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true},"patch":{"description":"Create, update and delete divisions in one transaction. Deleting a division that still classifies live sections returns 409. Returns the project's divisions. Requires Specifications admin.","operationId":"updateCompanyProjectSpecificationSectionDivisionsV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"creation_params":{"items":{"properties":{"description":{"type":"string"},"number":{"type":"string"}},"required":["number"],"type":"object"},"maxItems":100,"type":"array"},"deletion_params":{"items":{"properties":{"id":{"type":"integer"}},"required":["id"],"type":"object"},"maxItems":100,"type":"array"},"updation_params":{"items":{"properties":{"description":{"type":"string"},"id":{"type":"integer"},"number":{"type":"string"}},"required":["id"],"type":"object"},"maxItems":100,"type":"array"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/specifications_SpecificationDivisionV2"},"type":"array"}},"required":["data"],"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Update Specification Section Divisions","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false},"post":{"description":"Create a division. description defaults to the number.","operationId":"createCompanyProjectSpecificationSectionDivisionV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"specification_section_division":{"properties":{"description":{"nullable":true,"type":"string"},"number":{"type":"string"}},"required":["number"],"type":"object"}},"required":["specification_section_division"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"description":{"type":"string"},"id":{"type":"string"},"number":{"type":"string"}},"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Create a Specification Section Division","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_section_revisions":{"get":{"description":"Every live revision grouped division → section → set.","operationId":"listCompanyProjectSpecificationSectionRevisionsV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"filter_division_id","schema":{"type":"integer"}},{"in":"query","name":"search_string","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"divisions":{"items":{"properties":{"description":{"nullable":true,"type":"string"},"id":{"nullable":true,"type":"string"},"number":{"nullable":true,"type":"string"},"sections":{"items":{"properties":{"current_revision":{"nullable":true,"properties":{"id":{"type":"string"},"revision":{"type":"string"}},"type":"object"},"current_revision_id":{"nullable":true,"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"number":{"type":"string"},"specification_sets":{"items":{"properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"specification_section_revisions":{"items":{"properties":{"current":{"type":"boolean"},"id":{"type":"string"},"revision":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"}},"type":"object"}},"required":["data"],"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"List Specification Sections Revisions for a Project","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_section_revisions/bulk_update":{"post":{"description":"Update up to 100 revisions. Items run in order; a failing item does not undo the others. Each result has status updated or failed.","operationId":"createCompanyProjectSpecificationSectionRevisionsBulkUpdateV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"properties":{"id":{"type":"integer"},"issued_date":{"format":"date","nullable":true,"type":"string"},"received_date":{"format":"date","nullable":true,"type":"string"},"revision":{"type":"string"},"specification_set_id":{"nullable":true,"type":"integer"}},"required":["id"],"type":"object"},"maxItems":100,"minItems":1,"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"message":{"type":"string"},"results":{"items":{"properties":{"errors":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"status":{"enum":["updated","failed"],"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}},"required":["data"],"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Bulk Update Specification Section Revisions","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_section_revisions/create_zip_download":{"post":{"description":"A ZIP of the listed revisions' original PDFs (at most 100 revisions and 200 MB). has_public_markup is accepted and ignored: markups are not burned into downloads.","operationId":"createCompanyProjectSpecificationSectionRevisionsCreateZipDownloadV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"has_public_markup":{"type":"boolean"},"specification_section_revision_ids":{"description":"Revision ids (array, or a comma-separated string), at most 100.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"type":"array"}},"required":["specification_section_revision_ids"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"File."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Too many or too large."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Download zip of Specification Section Revisions","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_section_revisions/single_pdf_download":{"post":{"description":"The listed revisions' original PDFs combined into one PDF in the order given (at most 100 revisions and 200 MB). 422 when a revision has no uploaded PDF or its PDF cannot be combined.","operationId":"createCompanyProjectSpecificationSectionRevisionsSinglePdfDownloadV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"specification_section_revision_ids":{"description":"Revision ids (array, or a comma-separated string), at most 100.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"type":"array"}},"required":["specification_section_revision_ids"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"File."},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"413":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Too many or too large."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Download single pdf of Specification Section Revisions","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_section_revisions/{id}":{"delete":{"description":"Delete the revision. When it was current, the latest remaining revision becomes current. Deleting a section's only revision returns 409 (recycle the section instead).","operationId":"deleteCompanyProjectSpecificationSectionRevisionV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"current_revision_id":{"nullable":true,"type":"string"},"message":{"type":"string"}},"type":"object"}},"required":["data"],"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"409":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Conflict."}},"summary":"Destroy Specification Section Revision","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false},"get":{"description":"The revision and every live revision of its section.","operationId":"getCompanyProjectSpecificationSectionRevisionV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"all_revisions":{"items":{"$ref":"#/components/schemas/specifications_SpecificationRevisionV2"},"type":"array"},"selected_revision":{"$ref":"#/components/schemas/specifications_SpecificationRevisionV2"}},"type":"object"}},"required":["data"],"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Show Specification Section Revision","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":false},"put":{"description":"Update the revision and its section. Same body as PATCH /rest/v1.0/specification_section_revisions/{id}. Changes are recorded in change_history.","operationId":"replaceCompanyProjectSpecificationSectionRevisionV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"specification_section":{"properties":{"description":{"nullable":true,"type":"string"},"number":{"type":"string"},"specification_section_division_id":{"type":"integer"}},"type":"object"},"specification_section_revision":{"properties":{"current":{"type":"boolean"},"issued_date":{"format":"date","nullable":true,"type":"string"},"position":{"type":"integer"},"received_date":{"format":"date","nullable":true,"type":"string"},"revision":{"type":"string"},"specification_section_division_id":{"type":"integer"},"specification_set_id":{"nullable":true,"type":"integer"}},"type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/specifications_SpecificationRevisionV2"},"type":"array"}},"required":["data"],"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Update Specification Section Revision","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_section_revisions/{id}/change_history":{"get":{"description":"Audit history of the revision, newest first.","operationId":"listCompanyProjectSpecificationSectionRevisionChangeHistoryV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"action":{"type":"string"},"actor":{"properties":{"id":{"type":"integer"},"name":{"nullable":true,"type":"string"}},"type":"object"},"changes":{"items":{"properties":{"field":{"type":"string"},"from":{},"label":{"type":"string"},"to":{}},"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"summary":{"type":"string"}},"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Change History of Specification Section Revision","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_section_revisions/{id}/download":{"get":{"description":"Where to download the revision's original PDF: an authenticated /rest/v1.0/uploads URL. 422 when the revision has no uploaded PDF.","operationId":"listCompanyProjectSpecificationSectionRevisionDownloadV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"download_url":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"required":["data"],"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Download Specification Section Revision","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_sections":{"get":{"description":"The current revision of each live section, with division and set.","operationId":"listCompanyProjectSpecificationSectionsV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}},{"in":"query","name":"filter_set_id","schema":{"type":"integer"}},{"in":"query","name":"filter_division_id","schema":{"type":"integer"}},{"in":"query","name":"filters[division_ids]","schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"search_string","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/specifications_SpecificationRevisionV2"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"List Specification Sections for a Project","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true},"post":{"description":"Create a section with its first (current) revision. Same `specification_section` body as POST /rest/v1.0/specification_sections. Returns the new revision.","operationId":"createCompanyProjectSpecificationSectionV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"specification_section":{"properties":{"description":{"nullable":true,"type":"string"},"issued_date":{"format":"date","nullable":true,"type":"string"},"number":{"type":"string"},"received_date":{"format":"date","nullable":true,"type":"string"},"revision":{"nullable":true,"type":"string"},"specification_section_division_id":{"type":"integer"},"specification_set_id":{"nullable":true,"type":"integer"}},"required":["number","specification_section_division_id"],"type":"object"}},"required":["specification_section"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/specifications_SpecificationRevisionV2"},"type":"array"}},"required":["data"],"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Create a Specification Section","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_sections/bulk_edit_collection":{"post":{"description":"Apply one division and/or dates and set to the listed revisions (the division applies to every revision of each affected section). All or nothing.","operationId":"createCompanyProjectSpecificationSectionsBulkEditCollectionV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"specification_section_revision_ids":{"description":"Revision ids (array, or a comma-separated string), at most 100.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"type":"array"},"specification_section_revisions":{"properties":{"issued_date":{"format":"date","nullable":true,"type":"string"},"received_date":{"format":"date","nullable":true,"type":"string"},"specification_set_id":{"nullable":true,"type":"integer"}},"type":"object"},"specification_sections":{"properties":{"specification_section_division_id":{"type":"integer"}},"type":"object"}},"required":["specification_section_revision_ids"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"message":{"type":"string"}},"type":"object"}},"required":["data"],"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Bulk edit specification sections","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_sections/create_submittals_from_specs":{"post":{"description":"Create one DRAFT submittal per selected section, linked to it and numbered by the project's submittal sequence. Nothing is sent for review. Needs Submittals create permission. user_instructions becomes each draft's description.","operationId":"createCompanyProjectSpecificationSectionsCreateSubmittalsFromSpecV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"specification_section_revision_ids":{"description":"Revision ids (array, or a comma-separated string), at most 100.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"type":"array"},"user_instructions":{"maxLength":10000,"nullable":true,"type":"string"}},"required":["specification_section_revision_ids"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"message":{"type":"string"},"submittal_ids":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"required":["data"],"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."},"422":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Validation failed."}},"summary":"Create submittals from specs","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_sections/deletion_log":{"get":{"description":"Recycled sections, most recently deleted first. Restore with PATCH /rest/v1.0/specification_sections/{id}/restore.","operationId":"listCompanyProjectSpecificationSectionsDeletionLogV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}},{"in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"deleted_at":{"format":"date-time","type":"string"},"description":{"type":"string"},"division":{"nullable":true,"properties":{"description":{"type":"string"},"id":{"type":"string"},"number":{"type":"string"}},"type":"object"},"id":{"type":"string"},"number":{"type":"string"},"revision":{"nullable":true,"type":"string"},"specification_section_id":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK","headers":{"Link":{"schema":{"type":"string"}},"Per-Page":{"schema":{"type":"integer"}},"Total":{"schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Get list of deleted specification sections for a Project","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":true}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_sections/destroy_collection":{"delete":{"description":"Recycle the sections of the listed revisions. All or nothing (404 if any id is unknown).","operationId":"deleteCompanyProjectSpecificationSectionsDestroyCollectionV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Optional. A unique key (1-255 visible ASCII characters, e.g. a UUID) that makes a retry safe. The first request with a key runs; a 2xx response is stored for 24 hours and a retry with the same key, token and path gets that response again with `Idempotent-Replayed: true`. The same key with a different request returns 422; while the first request is still running, 409. A non-2xx response releases the key.","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":255,"minLength":1,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"specification_section_revision_ids":{"description":"Revision ids (array, or a comma-separated string), at most 100.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"type":"array"}},"required":["specification_section_revision_ids"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"recycled_section_ids":{"items":{"type":"string"},"type":"array"},"success":{"type":"boolean"}},"type":"object"}},"required":["data"],"type":"object"}}}},"400":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Bad request."},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Bulk delete specification sections","tags":["specifications"],"x-os-idempotent":true,"x-os-module":"specifications","x-os-paginated":false}},"/rest/v2.1/companies/{company_id}/projects/{project_id}/specification_sections/divisions_and_sets":{"get":{"description":"Division and set options for section forms.","operationId":"listCompanyProjectSpecificationSectionsDivisionsAndSetsV21","parameters":[{"in":"header","name":"OS-Company-Id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"company_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"division_options":{"properties":{"all_divisions":{"items":{"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"sets_options":{"properties":{"all_sets":{"items":{"properties":{"label":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"}},"required":["data"],"type":"object"}}}},"401":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Authentication required."},"403":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Forbidden."},"404":{"content":{"application/json":{"schema":{"properties":{"errors":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}]}},"type":"object"}}},"description":"Not found."}},"summary":"Get divisions and sets options for specification sections for a Project","tags":["specifications"],"x-os-idempotent":false,"x-os-module":"specifications","x-os-paginated":false}}},"security":[{"bearerAuth":[]}],"servers":[{"description":"Production","url":"https://app.os.construction"}],"tags":[{"description":"Accounting","name":"accounting"},{"description":"Action Plans","name":"action_plans"},{"description":"Admin","name":"admin"},{"description":"Analytics","name":"analytics"},{"description":"Approvals","name":"approvals"},{"description":"Automations","name":"automations"},{"description":"Bidding","name":"bidding"},{"description":"Budget","name":"budget"},{"description":"Change Events","name":"change_events"},{"description":"Change Orders","name":"change_orders"},{"description":"Commitments","name":"commitments"},{"description":"Company Admin","name":"company_admin"},{"description":"Connectors","name":"connectors"},{"description":"Conversations","name":"conversations"},{"description":"Coordination Issues","name":"coordination_issues"},{"description":"Correspondence","name":"correspondence"},{"description":"CRM","name":"crm"},{"description":"Daily Log","name":"daily_log"},{"description":"Direct Costs","name":"direct_costs"},{"description":"Direct Uploads","name":"direct_uploads"},{"description":"Directory","name":"directory"},{"description":"Documents","name":"documents"},{"description":"Drawings","name":"drawings"},{"description":"Email Intake","name":"email_intake"},{"description":"Emails","name":"emails"},{"description":"Equipment","name":"equipment"},{"description":"Expense Reports","name":"expense_reports"},{"description":"Forms","name":"forms"},{"description":"Identity","name":"identity"},{"description":"Incidents","name":"incidents"},{"description":"Inspections","name":"inspections"},{"description":"Locations","name":"locations"},{"description":"Materials","name":"materials"},{"description":"Meetings","name":"meetings"},{"description":"Models","name":"models"},{"description":"Notifications","name":"notifications"},{"description":"Observations","name":"observations"},{"description":"Owner Reports","name":"owner_reports"},{"description":"Payment Applications","name":"payment_applications"},{"description":"Permits","name":"permits"},{"description":"Photos","name":"photos"},{"description":"Portfolio","name":"portfolio"},{"description":"Prequalification","name":"prequalification"},{"description":"Prime Contracts","name":"prime_contracts"},{"description":"Project Archive","name":"project_archive"},{"description":"Punch List","name":"punch_list"},{"description":"Purchase Requests","name":"purchase_requests"},{"description":"Reporting","name":"reporting"},{"description":"RFIs","name":"rfis"},{"description":"RFQs","name":"rfqs"},{"description":"Schedule","name":"schedule"},{"description":"Specifications","name":"specifications"},{"description":"Submittals","name":"submittals"},{"description":"Tasks","name":"tasks"},{"description":"Timesheets","name":"timesheets"},{"description":"T&M Tickets","name":"tm_tickets"},{"description":"Transmittals","name":"transmittals"},{"description":"Work Breakdown Structure","name":"wbs"},{"description":"Webhooks","name":"webhooks"},{"description":"Workforce Planning","name":"workforce"}]}