postCreate an inquiry

❗

Authorization Required

This endpoint requires authentication via the Core API Auth server.
Learn about authentication →

If you plan on fetching data that requires prior consent from the user, then you must create an inquiry via this endpoint, and send the user to the inquiry url first. See the GET /persons/{ssn} endpoint documentation to see what data you can fetch with/without prior consent from the user.


This endpoint returns a link to Neobits' app where Neobits will take the person through the steps necessary to provide their consent and share their data. After the user consents to share their data, they will be redirected to the URL(s) you decide as part of the request body to this endpoint (see request body schema).


Error handling

Errors are attached to the error redirect URL as query parameters. When the user is redirected, the consumer of the API can read the error details to handle it appropriately.

Example error redirect:

https://redirect.example.com/error?name=InternalServerError&code=500-001&message=An+internal+server+error+occurred

The redirect URL includes three query parameters:

  • name - The error type identifier (e.g., InternalServerError, BadRequestError)
  • code - A unique error code in the format HTTP_STATUS-SEQUENCE
  • message - A URL-encoded human-readable description of the error
📖

Complete Error Reference

For a complete list of all possible error codes and their descriptions, see the error documentation.
View all error codes →
curl --request POST \
  --url https://api.test.neobits.no/fuse/v2/inquiries \
  --header 'Authorization: Basic REPLACE_BASIC_AUTH' \
  --header 'Content-Type: application/json' \
  --data '{"ssn":"01029413157","externalId":"CAN_BE_ANY_STRING","skipConsentMessages":true,"notifications":[{"type":"SMS","message":"Hei. For å dele din informasjon med Bank Bankersen ASA, vennligst gå til denne lenken $link","to":"12345678"}],"redirect":{"onSuccess":"https://your.frontend.com/success","onError":"https://your.frontend.com/error"}}'

Request

Headers

  • Authorization•string

    Basic authentication, base64 encoded username:password.

Body

  • ssn•string

    The unique identifier for the person

  • externalId•string

    Optional identifier the consumer of the API can provide.

  • skipConsentMessages•boolean

    Will skip messages explaining to the user which consents are needed to complete the flow.

  • notifications•array<object>

    The notification array allows the consumer of the API to trigger text message and emails to alert the customer

    • type•string

    • message•string

      The consumer of the API can decide where to place the link to initate the process by passing in $link (see example)

    • to•string

      The phone number you want the text message to be sent to

  • redirect•object

    URL's provided here will decide where the user should be sent on flow completion

    • onSuccess•string<url>

      URL to send the user to after the data is fetched

    • onError•string<url>

      URL to send the user to when an error occurs. See the "Error handling" section above for more info.

Response

Headers

  • Content-Type•string

    The content type of the response.

  • Location•string<url>

    The location of the created inquiry in the form of a resource url

  • X-Request-ID•string<uuid>

    UUID generated on each request. Provide this id to customer support if an error occurs.

Body

  • id•string<uuid>

  • ssn•string

    The unique identifier for the person the inquiry is for.

  • url•string<uri>

    Give this URL to the user so they can start the flow.

  • externalId•string

    Optional identifier the consumer of the API can provide. Will be added to the event callback.

  • skipConsentMessages•boolean

    Will skip messages explaining to the user which consents are needed to complete the flow.

  • isCompleted•boolean

    Indicates if the inquiry is completed or not by the user.

  • createdAt•string<date-time>

    Inquiry created date

  • updatedAt•string<date-time>

    Inquiry last updated date

  • notifications•array<object>

    The notification options set for the inquiry.

    • type•string

    • message•string

      The consumer of the API can decide where to place the link to initate the process by passing in $link (see example)

    • to•string

      The phone number you want the text message to be sent to

  • redirect•object

    URL's provided here will decide where the user should be sent on flow completion

    • onSuccess•string<url>

      URL to send the user to after the data is fetched

    • onError•string<url>

      URL to send the user to when an error occurs. See the "Error handling" section above for more info.

  • metadata•object

    • sbl•object

      • authCode•string

        Auhtorization code received from Altinn. Used to retrieve the customers data from Skatteetaten.

  • prerequisites•array<object>

    Prerequisites are actions that the user must complete before the data can be fetched. They can either be consents that must be given, or flows that must be completed.

    • name•string

    • isCompleted•boolean

      Whether the prerequisite has been completed or not. When the prerequisite requires the user to give prior consent, this field will be true if the user has given consent.

    • consentUrl•string<uri>

      The URL neobits will redirect the user to internally, so the user can complete the prerequisite.