Naviga Subscribe API
Naviga
  • Subscribe API
  • Payments API
    • Migration to Payments API
      • Apply Payment
      • EZPay Sign Up
      • Update EZPay Info
      • Restart
      • Create Payment Method
      • Get Payment Method by Id
      • Add Tip
  • Users Orchestrator API
    • Migration to UsersOrchestrator API
      • Get By Id
      • Get By Email
      • Get By Query String
      • Get By Encrypted Email
      • Get By Encrypted Id
      • Get By Token
      • Create User
      • Create Passwordless User
      • Update User
      • Update Password
      • Update Email
      • Authenticate/Authenticate By Token
      • ForgotPassword
      • Verify Email
      • Send Verification Code
  • Entitlements Orchestrator API
    • Migration to EntitlementsOrchestrator API
      • Access
Powered by GitBook
LogoLogo

COPYRIGHT © 2024 NAVIGA

On this page
  • Introduction
  • Comparison
  • Authenticate
  • Events
Export as PDF
  1. Users Orchestrator API
  2. Migration to UsersOrchestrator API

Authenticate/Authenticate By Token

Introduction

This endpoint handles the workflow orchestration between the integration services (such as Auth0, Gigya, SSOR, and Firefly) and Subscribe Registration API to authenticate a user.

Comparison

Note:

  1. The old model is in PascalCase, while the new model is in CamelCase.

  2. Cookie tokens will not be returned by the UsersOrchestrator API.

  3. For custom fields, use Metadata.

User API
Users Orchestrator API

URL

/Authenticate

/AuthenticateByToken

/v4/Users/Authentication

Method

POST

POST

Request

Response


Authenticate

POST /v4/Users/Authentication

This endpoint is used to authenticate a user.

Note: The parameters marked with an asterisk (*) are mandatory and must be included in the input model.

Headers

Name
Type
Description

Authorization*

String

JSON Web Token used for security purposes

X-SourceSystem*

String

To identify the consumer or the Source System

X-ClientCode*

String

Client Code of the Tenant

X-PaperCode*

String

Paper Code of the Tenant

X-ClientGroupCode*

String

Client Group Code of the Tenant

Request Body

Name
Type
Description

Token

String

Access token generated in the consumer application

Password

String

Subscriber’s password.

LoginName

String

Subscriber’s login name.

{
    "data": {
        "user": {
            "customerRegistrationId": "string",
            "encryptedCustomerRegistrationId": "string",
            "email": "string",
            "verified": true,
            "lastLogoutDate": "2023-06-06T17:42:26.256Z",
            "firstName": "string",
            "lastName": "string",
            "metadata": {
                "title": "",
                "phoneNumber": "",
                "gender": "",
                "age": "",
                "dob": "",
                "dobYYYY": "",
                "acceptsEmailOffers": "",
                "acceptsEmailAds": "",
                "acceptsEmailPromotions": "",
                "address": "",
                "city": "",
                "country": "",
                "position": "",
                "isOkToEmail": "",
                "isOkToPhone": "",
                "isOkToMail": "",
                "workPhone": "",
                "timeZone": "",
                "scoreMember": "",
                "companyName": "",
                "postalCode": "",
                "cellPhone": "",
                "acceptsEENotification": "",
                "ebill_flag": "",
                "eadvan_flag": "",
                "eedition_flag": "",
                "ee_email_flag": "",
                "promo_flag": "",
                "feat_flag": "",
                "dealdigger_flag": "",
                "ads_flag": "",
                "member_event_flag": "",
                "contentEngagement_flag": "",
                "subcom_flag": "",
                "survey_flag": "",
                "accountUpdates_flag": "",
                "photo": "",
                "displayName": "",
                "optOutMarketing": "",
                "agreeToTerms": "",
                "bounceType": "",
            },
            "addDate": "2023-06-06T17:42:26.256Z",
            "addSource": "string",
            "changeDate": "2023-06-06T17:42:26.256Z",
            "changeSource": "string"
        },
        "cookieTokens": [
            {
                "name": "string",
                "content": "string",
                "durationDays": "string"
            }
        ]
    },
    "message": {
        "code": "Subscribe_S200_01",
        "text": "Request processed successfully.",
        "type": "Success"
    },
    "meta": null
}
Status Code
Code
Message

400

UsersOrchestrator_E400

Bad Request

400

UsersOrchestrator_E400_00

Invalid InputModel - {Message}

500

UsersOrchestrator_E500

Internal Server Error

500

UsersOrchestrator_E500_01

There was a problem during the GetById workflow.

Events

Note:– The associated Event IDs for the Event Type Codes are specified in parentheses (i.e., EventTypeCode (EventID)) in the table below.

Current
New
Note

LOGIN (60)

  • AUTHSYSTEM_USER_GETBYID (4601)

  • SUBSCRIBE_USER_LOGIN (4006)

  • SUBSCRIBE_USER_GOOGLELOGIN (4012)

For each old LOGIN event, we now create separate events according to the way authentication is handled.

-

SUBSCRIBE_USER_UPDATE (4004)

New event to update User in Subscribe.

GETUSERBYID (1042)

  • SUBSCRIBE_USER_GETBYID (4001)

  • AUTHSYSTEM_USER_LOGIN (4605)

For each GETUSERBYID old event, we now create two events: one for the call to the third-party system and one for the call to our database.

PreviousUpdate EmailNextForgotPassword

Last updated 9 months ago

{
  "LoginName": "string",
  "Password": "string",
  "Token": "string"
}
{
  "loginName": "string",
  "password": "string",
  "token": "string"
}
{
  "Code": 0,
  "Errors": [
    {
      "Message": "string",
      "Code": "string",
      "Type": {
        "Id": 0,
        "Code": "string"
      },
      "ErrorSource": "string"
    }
  ],
  "Result": {
    "Authenticated": true,
    "CookieContent": [
      {
        "Name": "string",
        "Content": "string",
        "CookieDurationDays": "string"
      }
    ],
    "CustomerRegistrationId": "string",
    "EncryptedCustomerRegistrationId": "string"
  },
  "SessionId": "string",
  "RequestId": "string"
}
{
    "message": {
        "code": "string",
        "text": "string",
        "type": 0
    },
    "meta": "string",
    "data": {
        "user": {
            "customerRegistrationId": "string",
            "encryptedCustomerRegistrationId": "string",
            "email": "string",
            "verified": true,
            "loginPassword": "string",
            "lastLogoutDate": "2023-06-06T17:42:26.256Z",
            "firstName": "string",
            "lastName": "string",
            "metadata": {
                "title": "",
                "phoneNumber": "",
                "gender": "",
                "age": "",
                "dob": "",
                "dobYYYY": "",
                "acceptsEmailOffers": "",
                "acceptsEmailAds": "",
                "acceptsEmailPromotions": "",
                "address": "",
                "city": "",
                "country": "",
                "position": "",
                "isOkToEmail": "",
                "isOkToPhone": "",
                "isOkToMail": "",
                "workPhone": "",
                "timeZone": "",
                "scoreMember": "",
                "companyName": "",
                "postalCode": "",
                "cellPhone": "",
                "acceptsEENotification": "",
                "ebill_flag": "",
                "eadvan_flag": "",
                "eedition_flag": "",
                "ee_email_flag": "",
                "promo_flag": "",
                "feat_flag": "",
                "dealdigger_flag": "",
                "ads_flag": "",
                "member_event_flag": "",
                "contentEngagement_flag": "",
                "subcom_flag": "",
                "survey_flag": "",
                "accountUpdates_flag": "",
                "photo": "",
                "displayName": "",
                "optOutMarketing": "",
                "agreeToTerms": "",
                "bounceType": "",
            },
            "addSource": "string",
            "addDate": "2023-06-06T17:42:26.256Z",
            "changeSource": "string",
            "changeDate": "2023-06-06T17:42:26.256Z"
        },
        "cookieTokens": [
            {
                "name": "string",
                "content": "string",
                "durationDays": "string"
            }
        ]
    }
}