Onboarding

Base URL: $CONSUMER_API

The object

statusstring · optional

one of not_started, in_progress, complete

profileobject · optional
notification_consentboolean · optional
termsobject · optional
requirementsobject · optional
Show child attributes
currently_duearray of string · optional
eventually_duearray of string · optional
past_duearray of string · optional
pending_verificationarray of string · optional
errorsarray of object · optional
Show child attributes
requirementstring · optional
codestring · optional

one of information_requested, document_rejected

reasonstring · optional
current_terms_versionstring · optional
The object
{
  "status": "not_started",
  "profile": {},
  "notification_consent": true,
  "terms": {},
  "requirements": {
    "currently_due": [
      "currently due"
    ],
    "eventually_due": [
      "eventually due"
    ],
    "past_due": [
      "past due"
    ],
    "pending_verification": [
      "pending verification"
    ],
    "errors": [
      {
        "requirement": "requirement",
        "code": "information_requested",
        "reason": "Leitura confirmada no local."
      }
    ]
  },
  "current_terms_version": "current terms version"
}

Get consumer onboarding status and requirements

Logs

GET /onboarding

Returns the signed-in person's onboarding record: profile, notification consent, accepted terms, the list of requirements still to complete, the computed status and the current terms version. Clients use it to decide which onboarding steps to show.

Returns

200 Consumer onboarding

Show attributes
statusstring · optional

one of not_started, in_progress, complete

profileobject · optional
notification_consentboolean · optional
termsobject · optional
requirementsobject · optional
Show child attributes
currently_duearray of string · optional
eventually_duearray of string · optional
past_duearray of string · optional
pending_verificationarray of string · optional
errorsarray of object · optional
Show child attributes
requirementstring · optional
codestring · optional

one of information_requested, document_rejected

reasonstring · optional
current_terms_versionstring · optional
curl -X GET "$CONSUMER_API/onboarding" \
  -H "Authorization: Bearer sk_test_..."
Response 200
{
  "status": "not_started",
  "profile": {},
  "notification_consent": true,
  "terms": {},
  "requirements": {
    "currently_due": [
      "currently due"
    ],
    "eventually_due": [
      "eventually due"
    ],
    "past_due": [
      "past due"
    ],
    "pending_verification": [
      "pending verification"
    ],
    "errors": [
      {
        "requirement": "requirement",
        "code": "information_requested",
        "reason": "Leitura confirmada no local."
      }
    ]
  },
  "current_terms_version": "current terms version"
}

Update profile, notification consent or terms

Logs

PATCH /onboarding

Updates parts of the caller's onboarding record: profile fields (full_name, email, preferred_language), notification consent, and acceptance of the terms. Accepting terms requires accepted to be true and version to match the current terms version, and records the time and client IP. Invalid fields return a validation error listing each one, and the response is the updated onboarding view with recomputed requirements.

Body application/json

profileobject · optional
Show child attributes
full_namestring · optional
emailstring · optional
preferred_languagestring · optional
notification_consentboolean · optional
termsobject · optional
Show child attributes
acceptedboolean · required
versionstring · required

Returns

200 Updated

Show attributes
statusstring · optional

one of not_started, in_progress, complete

profileobject · optional
notification_consentboolean · optional
termsobject · optional
requirementsobject · optional
Show child attributes
currently_duearray of string · optional
eventually_duearray of string · optional
past_duearray of string · optional
pending_verificationarray of string · optional
errorsarray of object · optional
Show child attributes
requirementstring · optional
codestring · optional

one of information_requested, document_rejected

reasonstring · optional
current_terms_versionstring · optional
curl -X PATCH "$CONSUMER_API/onboarding" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "profile": {
    "full_name": "Ana Matsinhe",
    "email": "ana.matsinhe@example.org",
    "preferred_language": "preferred language"
  },
  "notification_consent": true,
  "terms": {
    "accepted": true,
    "version": "version"
  }
}'
Response 200
{
  "status": "not_started",
  "profile": {},
  "notification_consent": true,
  "terms": {},
  "requirements": {
    "currently_due": [
      "currently due"
    ],
    "eventually_due": [
      "eventually due"
    ],
    "past_due": [
      "past due"
    ],
    "pending_verification": [
      "pending verification"
    ],
    "errors": [
      {
        "requirement": "requirement",
        "code": "information_requested",
        "reason": "Leitura confirmada no local."
      }
    ]
  },
  "current_terms_version": "current terms version"
}