POST /api/pro/work/:id/submit

Submits the review, one part per profession the order names. Every part is checked; a finding refuses the whole and nothing is delivered. Delivered, the pot is charged, the earning is booked and the client is told.

Surface: professional. Who may call: professional. Key: professional.work.submit.

Example request

curl -X POST https://caremcp.com/api/pro/work/7d1f0a0e-2c4b-4c7e-9a6e-000000000001/submit \
  -H "Authorization: Bearer <session or access token>" \
  -H "Content-Type: application/json" \
  -d '{"review":{"personal-trainer":{"markdown":"# Summary\nThree runs and two dumbbell sessions a week; the wrist stays neutral under load. \n\n# Weeks\n## Week 1\n### Day 1: run\nRPE 3, 30 minutes, easy.\n\n### Day 3: strength\nRPE 7, 45 minutes. Dumbbell row 3 x 10 at 14 kg, rest 90 s. Goblet squat 3 x 10.\n\n# Progression\nAdd five minutes to each run while RPE stays at 3; add one set to the rows in week three.\n\n# Adaptations\nNeutral grip on every press; no push-ups on the palm until the wrist settles.\n\n# Referral\nNone."}}}'

Example input

{
  "id": "7d1f0a0e-2c4b-4c7e-9a6e-000000000001",
  "review": {
    "personal-trainer": {
      "markdown": "# Summary\nThree runs and two dumbbell sessions a week; the wrist stays neutral under load. \n\n# Weeks\n## Week 1\n### Day 1: run\nRPE 3, 30 minutes, easy.\n\n### Day 3: strength\nRPE 7, 45 minutes. Dumbbell row 3 x 10 at 14 kg, rest 90 s. Goblet squat 3 x 10.\n\n# Progression\nAdd five minutes to each run while RPE stays at 3; add one set to the rows in week three.\n\n# Adaptations\nNeutral grip on every press; no push-ups on the palm until the wrist settles.\n\n# Referral\nNone."
    }
  }
}

Input schema

{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "id": {
   "type": "string",
   "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)$"
  },
  "review": {
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {
    "type": "object",
    "properties": {
     "markdown": {
      "type": "string"
     }
    },
    "required": [
     "markdown"
    ]
   }
  }
 },
 "required": [
  "id",
  "review"
 ]
}

Output schema

{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "orderId": {
   "type": "string"
  },
  "status": {
   "type": "string",
   "const": "reviewed"
  },
  "reviewedAt": {
   "type": "string"
  },
  "earnedCents": {
   "type": "integer",
   "minimum": -9007199254740991,
   "maximum": 9007199254740991
  }
 },
 "required": [
  "orderId",
  "status",
  "reviewedAt",
  "earnedCents"
 ],
 "additionalProperties": false
}