Skip to main content
Skip table of contents

Non-licensed User Integration

Register as non-licensed user

Use cases:

  • When a non-licensed user wants to register a new account

  • When a non-licensed user logins with an email that have not been registered -> he will be required to register

They will need to make an API call:

POST {eecdAPI}/non-license-user/register

CODE
{
  “email”: “user@email.com”,
  “firstName”: ”First Name”,
  “lastName”: ”Last Name”,
  “organisationName”: ”Organisation Name”,
  “cleaningId”: “some-guid-here”
}

 

Response status code :

  • 201: If email address was not yet used as a non-registered user, non-license user account will be created. System will send email to the user, the email contains an encoded URL to the front end that will perform the account activation. After activation, user will receive an UserToken and use it to identify.

  • 400 with error messages: If the request body is not valid

  • 409: An account with provided email has already existed

Activate account as non-licensed user

Use cases

When non-licensed users receive an email for account confirmation / (re)activation containing a link to UI -> Client should automatically call this API to activate the account

POST {eecdapi}/non-license-user/activate

Input

CODE
{
  “ConfirmationToken”: “Confirmation token from the link”
}

Response

CODE
{
  “UserToken”: “The user token which is used to identify the user”
}

Other response status:

  • 400: No confirmation token

  • 403: Token could not be decrypted

  • 409: Token is expired

  • 404: User email not found

Sign in as non-licensed user

Use cases

When a non-licensed user wants to sign in

POST {eecdapi}/non-license-user/sign-in

Input

CODE
{
  “Email”: “john.doe@test.com”
  “CleaningId”: “The Id of eECD that will be automatically opened after signing in”
}

Request body validation:

  • Email is required and must be in the right format.

  • CleaningId is optional, use when user want to go to accept/reject load after sign-in

Response

CODE
{
  “UserToken”: “The user token which is used to identify the user”
}

Other response status:

  • 404:  account not found, requires registering

  • 403: account is not confirmed/activated or needs to re-activate -> Prompt user to check the mailbox. System will send email to the user; the email contains an HTML-encoded URL to the front end that will perform the account activation

  • 400: Request body is not valid

  • 201: OK, a user token will be sent in response body. Add token to later request’s header to identify the user: X-NALLIAN-TOKEN: <token>

Request eECD per email as non-licensed user

A non-licensed user can request for the eECD to be sent to their email by invoking this API

GET {eecdAPI}/non-license-user/cleanings/{cleaningActionId}/email

The request also needs to contain a header parameter “X-NALLIAN- TOKEN” which is the result from the sign-in call for an non-registered user.

An email will be sent to the registered email of the non-licensed user.

Accept and complete load as non-licensed user

When a non-licensed user accepts and completes load, they will then need to input the product name and comments. The API to confirm:

PUT {eecdAPI}/non-license-user/loads/{cleaningActionId}/complete

Input

CODE
{
   “ProductName”: “Name of Product”,
   “Comment”: ”User comment”
}

The request also needs to contain a header parameter “X-NALLIAN- TOKEN” which is the result from the sign-in call for an non-registered user. This will be used to identify the non-license user. The cleaning action Id will also be sent via the url so that it can be used to retrieve the booklet that will be used.

Reject load as non-licensed user

When a non-licensed user rejects an eECD, they will then need to input the reject reason. The API call to process the rejection:

PUT {eecdAPI}/non-license-user/loads/{cleaningActionId}/reject

Input

CODE
{
   “Comment”: “Reason of rejection”
}

The request also needs to contain a header parameter “X-NALLIAN- TOKEN” which is the result from the sign-in call for an non-registered user. This will be used to identify the non-license user. The cleaning action Id will also be sent via the url so that it can be used to retrieve the booklet that will be used.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.