Swagger UI - Agent Notification Callbacks

Notification callbacks are used to notify a broker about the status of an application.

Broker API Service Implementation

As a broker, you have to implement an API choosing one of the callback notifications adapters described below where the noticiations will be sent.

Notification Callbacks Adapters

There are two types of adpaters that a broke can choose from and should implement as an API.

MultiEndpoint : allow to send a notification where a different endpoint should exist for every event types

SingleEndpoint : allow to send callback notifications to a unique endpoint, where the event type is sent as part of the paylod.

API Service authentication

We support the following authentication methods. It is up to you as a broker to decide which one of them to use.

  • Basic access authentication : Agent is providing a username and password, add as Authorization-header with Basic scheme, containing username:pasword as a base64 encoded string.

    PropertyValueDescription
    usernamestringthe user name
    passwordstringthe password

    Result header : Authorization: Basic base64(username:password)

  • API Key Auth : Agent is providing a token / apikey, and optionally a scheme, to add as Authorization-header with optional scheme, containing token.

    PropertyValueDescription
    tokenstringToken or ApiKey provided by agent
    schemestring?Name of scheme, could be Bearer. If left out, then schemeless.

    Result header : Authorization: Bearer 6736bbb4f4b4ebab8c0df4b139395b9

  • Header ApiKey: Agent is providing an ApiKey, and optionally an apiKeyName, to add as custom header value.

    PropertyValueDescription
    apiKeystringApiKey
    apiKeyNamestringOptional header name, if left out 'API-KEY' is used.

    Result header : API-KEY: 6736bbb4f4b4ebab8c0df4b139395b9

    Query String Api Key : Agent is providing a apikey, to be added to the endpoint request as querystring parameter.

    PropertyValueDescription
    apiKeystringApiKey provided by agent
    apiKeyNamestringOptional querystring parameter name, if left out 'API-KEY' is used.

    Result endpoint : https://api.example.com/callbacks?API-KEY=6736bbb4f4b4ebab8c0df4b139395b9

Example API and Endpoints

Loading Swagger UI...

Event types

  • Name
    approved
    Description

    Event indicating application has been approved.

  • Name
    declined
    Description

    Event indicating application has been declined.

  • Name
    canceled
    Description

    Event incicating application has been manually cancelled by Avida.

  • Name
    document-sent
    Description

    Event indicating documents have been sent to customer for singing.

  • Name
    document-signed
    Description

    Event indicating documents have been signed by the customer.

  • Name
    ready-for-disbursement
    Description

    Event indicating application is ready to be disbursed.

  • Name
    disbursed
    Description

    Event indicating application has been disbursed.

Example approved event

  {
    "applicationId": "string",
    "externalApplicationId": "string",
    "agentId": "string",
    "timestamp": "2024-10-24T17:21:35.531Z",
    "payload": {
      "product": "string",
      "approvedAmount": 0,
      "duration": 0,
      // ...
  }

Was this page helpful?