Notifications

Notifications inform the ServiceProvider about events or conditions that may affect the Sharing Flow, such as:

  • Missing value for a claim (for technical or functional reasons)
  • Use of a deprecated claim in the requested scope
  • Other process-related information

Notifications are process-level metadata: they never contain personal data and do not modify the content of user_info or post_processed.

It is recommended to at least log these notifications for means of support.

Notifications are activated by default, but may be deactivated upon request by contacting MiTrust support.

Location in the API response

In the final API response, notifications appears as a sibling of user_info (and post_processed when present), inside the data object:

{
  "data": {
    "user_info": {
      "...": "raw claim values from data providers"
    },
    "post_processed": {
      "...": "optional normalized or enriched fields"
    },
    "notifications": [
      {
        "type": "deprecated_claim",
        "message": "Deprecated claim used in scope parameter, please update your configuration",
        "deprecated_claim": "tax.income_tax_return",
        "future_claim": "tax.income.tax_return"
      }
    ]
  },
  "status": "success"
}

If there is no notification, the notifications field may be omitted.

Notification Structure

A notification entry may include the following fields:

FieldDescription
typeCategory of notification (e.g., missing_data, deprecated_claim)
subtypeOptional refinement of type, e.g. missing_claim
messageHuman-readable explanation
Additional context fieldsVary depending on the notification type (code, details, claim_hint, future_claim, etc.)

Example

Use of deprecated claim in scope

If your one element of your Sharing Flow's scope has been deprecated by MiTrust, but is still maintained, you will get a notification.

You should contact your representative to enquirer about the deprecation notice. MiTrust has non-breaking changes guarantees of its API only for a limited time.

{
  "type": "deprected_claim",
  "message": "Deprecated claim used in scope parameter, please update your configuration",
  "deprecated_claim": "{the deprecated scope fragment}",
  "future_claim": "{the replacement to use, if any}"
}

Partially unavailable Data Provider

If a Data Provider is globally available to serve a Sharing Flow, but encounters some partial unavailability, MiTrust will indicate that scope of the known unavailability. This may happen for broad datasources, where only some subset of the data is unavailable.

{
  "type": "data_source_unavailable",
  "message": "DP has a temporary unavailability for some of its scope",
  "claim_hint": "{ the claim for which a partial unavailability is known }"
}

Deprecated scope syntax

For scope fragments that are not claims (e.g. tags, feature flags, ...), a notification will be emitted to indicate that a deprecated syntax has been used. The same backwards compatibility notice applies to claims and syntaxes.

{
  "type": "deprecated_scope_syntax",
  "message": "Deprecated scope syntax",
  "scope_fragment": "{ the deprecated fragment }",
}

Missing claim due to technical unavailability

"notifications": [
  {
    "type": "missing_data",
    "subtype": "missing_claim",
    "message": "The tax notice could not be retrieved due to a temporary data-provider unavailability.",
    "claim_hint": "tax.income.tax_notice",
    "code": "data_source_unavailable",
    "details": "Impots.gouv returned a transient technical error (#documentsindisponibles)."
  }
]

Did this page help you?