consents

Create or update informed consent (v2)

Submit informed consent form without the tax data transmission consent, which is handled by PUT /patients/tax-deduction-consent.

post/api/consents/v2

Request body

consent_type'psychological' | 'nutritional' required

Informed consent type constants.

operator_idstring uuid required

Operator UUID

Example request

{
  "consent_type": "psychological",
  "form_data": {
    "birth_date": "15/03/1990",
    "birth_place": "Milano",
    "consent_given": true,
    "first_name": "Mario",
    "last_name": "Rossi",
    "residence": "Via Roma 123, Milano (MI)",
    "tax_code": "RSSMRA90C15F205X"
  },
  "operator_id": "123e4567-e89b-12d3-a456-426614174000"
}

Response

Successful Response

consent_idstring uuid required

Consent UUID

status'draft' | 'pending_otp' | 'pending_approval' | 'revision_required' | 'verified' | 'expired' | 'revoked' required

Informed consent status constants.

messagestring required

Success message

next_action'none' | 'upload_documents' | 'sign_pdf' | 'wait_approval' | 'verify_otp' | 'complete_form' | 'renew' required

Next action for consent flow.

Example response

{
  "consent_id": "123e4567-e89b-12d3-a456-426614174001",
  "message": "Modulo consenso inviato. OTP inviato alla tua email.",
  "next_action": "verify_otp",
  "status": "pending_otp"
}

Changes