docs.jsonld
type: ApiDocumentation
title: ProCalc 2.0 API
description: Backend API for the ProCalc estimating calculator. The calculation engine returns the same results as the current 1.0 calculator.
entrypoint: /api
supported class: Error
supported class: ConstraintViolation
supported class: Calculation
supported class: Ping
supported class: Entrypoint
supported class: ConstraintViolationList

Error
type: Class
title: Error
supported property: SupportedProperty
  property: Error/id
  title: id
  required: false
  readable: true
  writeable: true
supported property: SupportedProperty
  property: Error/title
  title: title
  required: false
  readable: true
  writeable: false
  description: A short, human-readable summary of the problem.
supported property: SupportedProperty
  property: Error/detail
  title: detail
  required: false
  readable: true
  writeable: false
  description: A human-readable explanation specific to this occurrence of the problem.
supported property: SupportedProperty
  property: Error/instance
  title: instance
  required: false
  readable: true
  writeable: false
  description: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
supported property: SupportedProperty
  property: Error/type
  title: type
  required: false
  readable: true
  writeable: false
  description: A URI reference that identifies the problem type
supported property: SupportedProperty
  property: Error/meta
  title: meta
  required: false
  readable: true
  writeable: true
supported property: SupportedProperty
  property: Error/source
  title: source
  required: false
  readable: true
  writeable: true
supported property: SupportedProperty
  property: Error/description
  title: description
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: Error/trace
  title: trace
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: Error/message
  title: message
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: Error/code
  title: code
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: Error/file
  title: file
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: Error/line
  title: line
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: Error/trace
  title: trace
  required: false
  readable: true
  writeable: false
supported operation: Operation
  type: FindAction
  description: Retrieves a Error resource.
  method: GET
  returns: Error
  title: getError
description: A representation of common errors.
sub class of: Error

Error/id
type: Property
domain: Error
the hydra core vocabulary: id
range: string

Error/title
type: Property
domain: Error
the hydra core vocabulary: title
range: string

Error/detail
type: Property
domain: Error
the hydra core vocabulary: detail
range: string

Error/instance
type: Property
domain: Error
the hydra core vocabulary: instance
range: string

Error/type
type: Property
domain: Error
the hydra core vocabulary: type
range: string

Error/meta
type: Property
domain: Error
the hydra core vocabulary: meta

Error/source
type: Property
domain: Error
the hydra core vocabulary: source

Error/description
type: Property
domain: Error
the hydra core vocabulary: description
range: string

Error/trace
type: Property
domain: Error
the hydra core vocabulary: trace

Error/message
type: Property
domain: Error
the hydra core vocabulary: message
range: string

Error/code
type: Property
domain: Error
the hydra core vocabulary: code
range: integer

Error/file
type: Property
domain: Error
the hydra core vocabulary: file
range: string

Error/line
type: Property
domain: Error
the hydra core vocabulary: line
range: integer

ConstraintViolation
type: Class
title: ConstraintViolation
supported property: SupportedProperty
  property: ConstraintViolation/status
  title: status
  required: false
  readable: true
  writeable: true
supported property: SupportedProperty
  property: ConstraintViolation/errorTitle
  title: errorTitle
  required: false
  readable: false
  writeable: true
supported property: SupportedProperty
  property: ConstraintViolation/violations
  title: violations
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: ConstraintViolation/detail
  title: detail
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: ConstraintViolation/message
  title: message
  required: false
  readable: true
  writeable: true
supported property: SupportedProperty
  property: ConstraintViolation/code
  title: code
  required: false
  readable: true
  writeable: true
supported property: SupportedProperty
  property: ConstraintViolation/file
  title: file
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: ConstraintViolation/line
  title: line
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: ConstraintViolation/description
  title: description
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: ConstraintViolation/type
  title: type
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: ConstraintViolation/title
  title: title
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: ConstraintViolation/instance
  title: instance
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: ConstraintViolation/statusCode
  title: statusCode
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: ConstraintViolation/headers
  title: headers
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: ConstraintViolation/trace
  title: trace
  required: false
  readable: true
  writeable: false
supported property: SupportedProperty
  property: ConstraintViolation/previous
  title: previous
  required: false
  readable: true
  writeable: true
supported operation: Operation
  type: FindAction
  description: Retrieves a ConstraintViolation resource.
  method: GET
  returns: ConstraintViolation
  title: getConstraintViolation
supported operation: Operation
  type: FindAction
  description: Retrieves a ConstraintViolation resource.
  method: GET
  returns: ConstraintViolation
  title: getConstraintViolation
supported operation: Operation
  type: FindAction
  description: Retrieves a ConstraintViolation resource.
  method: GET
  returns: ConstraintViolation
  title: getConstraintViolation
supported operation: Operation
  type: FindAction
  description: Retrieves a ConstraintViolation resource.
  method: GET
  returns: ConstraintViolation
  title: getConstraintViolation
description: Unprocessable entity
sub class of: Error

ConstraintViolation/status
type: Property
domain: ConstraintViolation
the hydra core vocabulary: status
range: integer

ConstraintViolation/errorTitle
type: Property
domain: ConstraintViolation
the hydra core vocabulary: errorTitle
range: string

ConstraintViolation/violations
type: Property
domain: ConstraintViolation
the hydra core vocabulary: violations
range: ConstraintViolationList

ConstraintViolation/detail
type: Property
domain: ConstraintViolation
the hydra core vocabulary: detail
range: string

ConstraintViolation/message
type: Property
domain: ConstraintViolation
the hydra core vocabulary: message
range: string

ConstraintViolation/code
type: Property
domain: ConstraintViolation
the hydra core vocabulary: code
range: string
range: integer

ConstraintViolation/file
type: Property
domain: ConstraintViolation
the hydra core vocabulary: file
range: string

ConstraintViolation/line
type: Property
domain: ConstraintViolation
the hydra core vocabulary: line
range: integer

ConstraintViolation/description
type: Property
domain: ConstraintViolation
the hydra core vocabulary: description
range: string

ConstraintViolation/type
type: Property
domain: ConstraintViolation
the hydra core vocabulary: type
range: string

ConstraintViolation/title
type: Property
domain: ConstraintViolation
the hydra core vocabulary: title
range: string

ConstraintViolation/instance
type: Property
domain: ConstraintViolation
the hydra core vocabulary: instance
range: string

ConstraintViolation/statusCode
type: Property
domain: ConstraintViolation
the hydra core vocabulary: statusCode
range: integer

ConstraintViolation/headers
type: Property
domain: ConstraintViolation
the hydra core vocabulary: headers

ConstraintViolation/trace
type: Property
domain: ConstraintViolation
the hydra core vocabulary: trace

ConstraintViolation/previous
type: Property
domain: ConstraintViolation
the hydra core vocabulary: previous
range: integer

Calculation
type: Class
title: Calculation
supported property: SupportedProperty
  property: Calculation/sum
  title: sum
  required: false
  readable: true
  writeable: true
  description: Engine sum after the regional multiplier, before the result formulas.
supported property: SupportedProperty
  property: Calculation/result
  title: result
  required: false
  readable: true
  writeable: true
  description: Result formulas: low / mid / high (normalized from "hight").
supported operation: Operation
  type: FindAction
  description: Retrieves a Calculation resource.
  method: GET
  returns: owl:Nothing
  title: getCalculation
description: PoC (vertical slice B1 + B2 + API): POST /api/v1/calculate/legacy. Takes input in the 1.0 format (docs/15 section 3.1, the B-INT variant), runs the CalculationEngine against a version config loaded from the database and returns { sum, result: { low, mid, high } }. The key is "high", not "hight": the public 2.0 contract does not keep the 1.0 typo (decision D8). Deliberate PoC shortcuts: TODO B4: we calculate from draft_definition, without the draft -> validate -> publish -> compile pipeline and without mapping input to canonical keys. TODO B5: no rate limiting (Symfony RateLimiter, 429). TODO B6: no auth (endpoint open on dev only).

Calculation/sum
type: Property
domain: Calculation
the hydra core vocabulary: sum
range: decimal

Calculation/result
type: Property
domain: Calculation
the hydra core vocabulary: result
range: decimal

Ping
type: Class
title: Ping
supported property: SupportedProperty
  property: Ping/status
  title: status
  required: false
  readable: true
  writeable: true
supported property: SupportedProperty
  property: Ping/service
  title: service
  required: false
  readable: true
  writeable: true
supported operation: Operation
  type: FindAction
  description: Retrieves a Ping resource.
  method: GET
  returns: Ping
  title: getPing
description: S1 test resource: confirms that API Platform and Swagger UI work. Remove once the first real domain resources exist.

Ping/status
type: Property
domain: Ping
the hydra core vocabulary: status
range: string

Ping/service
type: Property
domain: Ping
the hydra core vocabulary: service
range: string

Entrypoint
type: Class
title: Entrypoint
supported property: SupportedProperty
  property: Entrypoint/calculation
  title: getCalculationCollection
  description: The collection of Calculation resources
  readable: true
  writeable: false
supported operation: Operation
  method: GET
  title: index
  description: The API Entrypoint.
  returns: Entrypoint

Entrypoint/calculation
type: Link
domain: Entrypoint
max cardinality: 1
range: Collection
range:
  equivalent class:
    on property: member
    all values from: Calculation
supported operation: Operation
  type: CreateAction
  description: Creates a Calculation resource.
  expects: Calculation
  method: POST
  returns: Calculation
  title: postCalculation

ConstraintViolationList
type: Class
title: ConstraintViolationList
description: A constraint violation List.
supported property: SupportedProperty
  property: ConstraintViolationList/propertyPath
  title: propertyPath
  description: The property path of the violation
  readable: true
  writeable: false
supported property: SupportedProperty
  property: ConstraintViolationList/message
  title: message
  description: The message associated with the violation
  readable: true
  writeable: false

ConstraintViolationList/propertyPath
type: Property
label: propertyPath
domain: ConstraintViolationList
range: string

ConstraintViolationList/message
type: Property
label: message
domain: ConstraintViolationList
range: string