POST /api/operator/professionals/:id/approve

Opens the pool to a professional we have vetted, as a contractor who earns per document or an employee on salary who earns nothing here. Approving again changes the engagement.

Surface: operator. Who may call: operator. Key: operator.professionals.approve.

Example request

curl -X POST https://caremcp.com/api/operator/professionals/7d1f0a0e-2c4b-4c7e-9a6e-000000000001/approve \
  -H "Authorization: Bearer <operator token>" \
  -H "Content-Type: application/json" \
  -d '{"employment":"contractor"}'

Example input

{
  "id": "7d1f0a0e-2c4b-4c7e-9a6e-000000000001",
  "employment": "contractor"
}

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)$"
  },
  "employment": {
   "default": "contractor",
   "type": "string",
   "enum": [
    "contractor",
    "employee"
   ]
  }
 },
 "required": [
  "id"
 ]
}

Output schema

{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "id": {
   "type": "string"
  },
  "email": {
   "type": "string"
  },
  "name": {
   "type": "string"
  },
  "location": {
   "type": "object",
   "properties": {
    "country": {
     "type": "string",
     "pattern": "^[A-Z]{2}$"
    },
    "region": {
     "type": "string",
     "pattern": "^[A-Z0-9]{1,3}$"
    }
   },
   "required": [
    "country"
   ],
   "additionalProperties": false
  },
  "languages": {
   "type": "array",
   "items": {
    "type": "string",
    "pattern": "^[a-z]{2}(-[A-Z]{2})?$"
   }
  },
  "professions": {
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "licensedIn": {
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "active": {
   "type": "boolean"
  },
  "approvedAt": {
   "type": [
    "string",
    "null"
   ]
  },
  "employment": {
   "type": "string",
   "enum": [
    "contractor",
    "employee"
   ]
  },
  "createdAt": {
   "type": "string"
  }
 },
 "required": [
  "id",
  "email",
  "name",
  "location",
  "languages",
  "professions",
  "licensedIn",
  "active",
  "approvedAt",
  "employment",
  "createdAt"
 ],
 "additionalProperties": false
}