WorkItems

Preview the client price for a would-be work item

Computes the price breakdown for a work item of the given type and data, without creating anything. Powers the create wizard's review step. The response always carries the client charges; for an internal (Proof) actor it also includes the seeded performer payout per line and the payout total, so the wizard can pre-fill an editable payout. An unknown or disabled work type is rejected with 422.

post/v2/work-item-price-previews

Request

  • Base URL: https://api-docs.proofserve.com
  • URL: https://api-docs.proofserve.com/v2/work-item-price-previews
  • Auth: none declared

Request body

workTypestring required

Stable identifier for a work type, as registered in the work-type registry. Deliberately an open string rather than an enum: work types are plug-ins, and the set is served by GET /v2/work-types — pinning it here would make adding one a five-artifact change (Go implementation, registry line, this spec, Go regen, webapp regen) and would give clients a literal union that has to be widened in lockstep with the server. Nothing validates it against this schema; an unregistered code is rejected at runtime with 422.

dataobject nullable

The work-type-specific fields entered so far, used to compute the price (same shape as CreateWorkItemRequest.data).

Example request

{
  "workType": "court_pickup"
}

Response

The client price breakdown.

Example response

{
  "data": {
    "charges": [
      {
        "description": "Court pickup"
      }
    ]
  },
  "meta": {
    "requestId": "req_8xKp2mN4"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.