{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/acculynx/json-schema/acculynx-estimate-schema.json",
  "title": "estimate",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acculynx-estimates-api-openapi.yml#/components/schemas/estimate",
  "allOf": [
    {
      "$ref": "#/$defs/estimateLink"
    },
    {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "description": "The title of the estimate."
        },
        "description": {
          "type": "string",
          "description": "A description of the estimate."
        },
        "estimateNumber": {
          "type": "string",
          "description": "An identifier that can be set to match other internal documentation. By default each new estimate will increment the estimateNumber by 1"
        },
        "isPrimary": {
          "type": "boolean",
          "description": "Whether the estimate is primary for the job."
        },
        "createdBy": {
          "$ref": "#/$defs/companyUserLink"
        },
        "createdDate": {
          "type": "string",
          "description": "The date/time the estimate was created, in UTC format."
        },
        "modifiedBy": {
          "$ref": "#/$defs/companyUserLink"
        },
        "modifiedDate": {
          "type": "string",
          "description": "The date/time the estimate was modified, in UTC format."
        },
        "profitMarginRate": {
          "type": "number",
          "description": "The rate of profit on the estimate total."
        },
        "profitMarginTotal": {
          "type": "number",
          "description": "The total profit for the estimate."
        },
        "notes": {
          "type": "string",
          "description": "Additional notes about the estimate."
        },
        "financials": {
          "$ref": "#/$defs/estimateFinancials"
        },
        "sections": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/estimateSectionLink"
          }
        }
      }
    }
  ],
  "$defs": {
    "companyUserLink": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique GUID of the AccuLynx User.",
          "format": "uuid"
        },
        "_link": {
          "type": "string",
          "description": "The unique URI of the AccuLynx User."
        }
      },
      "description": ""
    },
    "estimateFinancials": {
      "type": "object",
      "properties": {
        "taxRate": {
          "type": "number",
          "description": "The rate of tax for the estimate."
        },
        "taxTotal": {
          "type": "number",
          "description": "The total tax for the estimate."
        },
        "overheadRate": {
          "type": "number",
          "description": "The rate of overhead for the estimate."
        },
        "overheadTotal": {
          "type": "number",
          "description": "The total overhead for the estimate."
        },
        "profitRate": {
          "type": "number",
          "description": "The rate of profit for the estimate."
        },
        "profitTotal": {
          "type": "number",
          "description": "The total profit for the estimate."
        },
        "totalCost": {
          "type": "number",
          "description": "The total cost for the estimate."
        },
        "totalPrice": {
          "type": "number",
          "description": "The total price for the estimate."
        }
      }
    },
    "estimateLink": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the estimate."
        },
        "isPrimary": {
          "type": "boolean",
          "description": "Whether the estimate is the primary estimate for its associated job."
        },
        "job": {
          "$ref": "#/$defs/jobLink"
        },
        "_link": {
          "type": "string",
          "description": "The unique URI of the Estimate for the specified Job."
        }
      }
    },
    "estimateSectionLink": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the estimate section."
        },
        "_link": {
          "type": "string",
          "description": "The unique URI of the Estimate Sction."
        }
      }
    },
    "jobLink": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The job's unique ID."
        },
        "_link": {
          "type": "string",
          "description": "The URI of this Job."
        }
      }
    }
  }
}