> For the complete documentation index, see [llms.txt](https://docs.navigaglobal.com/naviga-subscribe-api/MhIk9TtEtuSKzip2tsSt/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.navigaglobal.com/naviga-subscribe-api/MhIk9TtEtuSKzip2tsSt/users-orchestrator-api/migration-to-usersorchestrator-api/get-by-id.md).

# Get By Id

## **Introduction** <a href="#migrationtopaymentsapi-applypayment" id="migrationtopaymentsapi-applypayment"></a>

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

With the input parameter Customer Registration ID (CRID), the API gets the user's information from both the integration service and the subscribe registration. The response displays the combined information.

Based on the value of **Flow\.UserProvider** and the **IgnoreProvider** input parameter, the API gives user information in the following way:

1. If no valid value is provided in **Flow\.UserProvider**, the API retrieves user information from the Subscribe Registration API.
2. If a valid value is provided in **Flow\.UserProvider** and the input parameter **IgnoreProvider** is set to *True*, the API retrieves user information from the Subscribe Registration API.
3. If a valid value is provided in **Flow\.UserProvider** and the input parameter **IgnoreProvider** is set to *False*, the user's details are retrieved from both the integration service and the subscribe registration. The combined information is displayed in the response.

{% hint style="warning" %}
**Note**

* MG2 control flow setting: **Flow\.UserProvider** value should be set to "Auth0," "Gigya," "SSOR", or "Firefly", depending on the third-party system or integration service being used.
* MG2 control flow setting, "**Flow\.Users.RedirectToOrchestrator**", value has to be set to 1 for the ProxyAPI redirection to the UsersOrchestratorAPI instead of the UserAPI.
  {% endhint %}

## **Comparison** <a href="#migrationfromusertousersorchestrator-comparison" id="migrationfromusertousersorchestrator-comparison"></a>

#### **Parameters** <a href="#migrationfromusertousersorchestrator-parameters" id="migrationfromusertousersorchestrator-parameters"></a>

* The parameter, **Type**, has been deprecated.
* A new parameter, **IgnoreProvider**, has been added.

**Note:** *The old model is in PascalCase, while the new model is in CamelCase.*

<table data-full-width="true"><thead><tr><th width="148.33333333333337"> </th><th width="438">User API</th><th>Users Orchestrator API</th></tr></thead><tbody><tr><td>URL</td><td>/User/<strong>{customerRegistrationId}</strong>/<strong>{type}</strong></td><td>/v4/Users/<strong>{customerRegistrationId}</strong>/?ignoreProvider=<strong>{boolean}</strong></td></tr><tr><td>Method</td><td>GET</td><td>GET</td></tr><tr><td>Response</td><td><pre class="language-json" data-overflow="wrap"><code class="lang-json">{
  "Code": 0,
  "Errors": [
    {
      "Message": "string",
      "Code": "string",
      "Type": {
        "Id": 0,
        "Code": "string"
      },
      "ErrorSource": "string"
    }
  ],
  "Result": {
    "User": {
      "RegistrationId": 0,
      "LoginName": "string",
      "LoginPassword": "string",
      "CustomerRegistrationId": "string",
      "EncryptedCustomerRegistrationId": "string",
      "FirstName": "string",
      "LastName": "string",
      "Email": "string",
      "Gender": "string",
      "Phone": "string",
      "MobilePhone": "string",
      "OptInEVantageSubscriberRewards": true,
      "OptInSpecialOffers": true,
      "OptInContestAndPromotions": true,
      "OptInPaperlessBilling": true,
      "OptInEEdition": true,
      "OptInEEditionEmailNotification": true,
      "OptInSubscriberDiscounts": true,
      "OptInAdvertiserEmails": true,
      "MemberEvent": true,
      "ContentEngagement": true,
      "SUBCOM": true,
      "Survey": true,
      "AccountUpdates": true,
      "DateOfBirth": "string",
      "BirthYear": "string",
      "AcceptsEmailOffers": 0,
      "AcceptsEmailAds": 0,
      "AcceptsEmailPromotions": 0,
      "IsOkToEmail": 0,
      "IsOkToPhone": 0,
      "IsOkToMail": 0,
      "AcceptsEENotification": 0,
      "ChangeDate": "2023-06-05T18:43:26.748Z",
      "DateRegistered": "2023-06-05T18:43:26.748Z",
      "AddDate": "2023-06-05T18:43:26.748Z",
      "Photos": [
        {
          "Id": "string",
          "Value": "string",
          "Type": "string"
        }
      ],
      "IsSocial": true,
      "DisplayName": "string",
      "AgreeToTerms": true,
      "OptOutMarketing": true,
      "Photo": "string",
      "VerificationCode": "string",
      "Verified": true,
      "AuthSystem": {
        "AuthSystemId": 0,
        "AuthSystemCode": "string",
        "AuthSystemName": "string"
      },
      "UserState": {
        "UserStateId": 0,
        "UserStateCode": "string"
      },
      "BounceType": "string",
      "LastLogoutDate": "2023-06-05T18:43:26.748Z",
      "UrlPasswordChangeTicket": "string",
      "Metadata": {}
    }
  },
  "SessionId": "string",
  "RequestId": "string"
}
</code></pre></td><td><pre class="language-json" data-overflow="wrap"><code class="lang-json">{
    "message": {
        "code": "string",
        "text": "string",
        "type": 0
    },
    "meta": object,
    "data": {
        "customerRegistrationId": "string",
        "encryptedCustomerRegistrationId": "string",
        "email": "string",
        "verified": true,
        "loginPassword": "string",
        "lastLogoutDate": "2023-06-05T19:08:58.949Z",
        "firstName": "string",
        "lastName": "string",
        "state": UserState,
        "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-05T19:08:58.949Z",
    "changeSource": "string",
    "changeDate": "2023-06-05T19:08:58.949Z"
}
}
</code></pre></td></tr></tbody></table>

***

## Get User by Id

<mark style="color:blue;">`GET`</mark> `/v4/Users/{customerRegistrationId}/?ignoreProvider={boolean}`

This endpoint is used to gets the user's information from both the integration service and the subscribe registration based on the CustomerRegistrationId.

**Note:** *The parameters marked with an asterisk* (<mark style="color:red;">\*</mark>) *are mandatory and must be included in the input model.*

#### Path Parameters

| Name                                                     | Type   | Description                                                    |
| -------------------------------------------------------- | ------ | -------------------------------------------------------------- |
| CustomerRegistrationId<mark style="color:red;">\*</mark> | String | Unique identifier for the user in the authentication provider. |

#### Query Parameters

| Name           | Type    | Description                                                                  |
| -------------- | ------- | ---------------------------------------------------------------------------- |
| IgnoreProvider | Boolean | Indicates whether to retrieve the user details from the integration service. |

#### Headers

| Name                                                | Type   | Description                                   |
| --------------------------------------------------- | ------ | --------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark>     | String | JSON Web Token used for security purposes     |
| X-SourceSystem<mark style="color:red;">\*</mark>    | String | To identify the consumer or the Source System |
| X-ClientCode<mark style="color:red;">\*</mark>      | String | Client Code of the Tenant                     |
| X-PaperCode<mark style="color:red;">\*</mark>       | String | Paper Code of the Tenant                      |
| X-ClientGroupCode<mark style="color:red;">\*</mark> | String | Client Group Code of the Tenant               |

{% tabs %}
{% tab title="200" %}

```json
{
    "message": {
        "code": "UsersOrchestrator_S200_01",
        "text": "GetById completed.",
        "type": "Success"
    },
    "data": {
        "customerRegistrationId": "string",
        "encryptedCustomerRegistrationId": "string",
        "email": "string",
        "verified": true,
        "state": "UserStates",
        "lastLogoutDate": "Date",
        "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": "Date",
        "addSource": "string",
        "changeDate": "Date",
        "changeSource": "string"
    }
}
```

{% endtab %}

{% tab title="400" %}

1. **Error Code:** UsersOrchestrator\_E400\
   **Error Message:** Bad Request
2. **Error Code:** UsersOrchestrator\_E400\_01

   **Error Message:** Invalid Id
   {% endtab %}

{% tab title="500" %}

1. **Error Code:** UsersOrchestrator\_E500\
   **Error Message:** Internal Server Error
2. **Error Code:** UsersOrchestrator\_E500\_01

   **Error Message:** There was a problem during the GetById workflow.
   {% endtab %}
   {% endtabs %}

## Events <a href="#events" id="events"></a>

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

<table><thead><tr><th width="195">Current</th><th width="289">New</th><th>Note</th></tr></thead><tbody><tr><td>CREATELOGIN (68)</td><td>-</td><td>No user will be created but synchronized in our database</td></tr><tr><td>GETUSERBYID (1042)</td><td><strong>AUTHSYSTEM_USER_GETBYID (4601)</strong></td><td><p>Renamed.</p><p>This event retrieves a User by Id from AuthSystem.</p></td></tr><tr><td>-</td><td><strong>SUBSCRIBE_USER_GETBYID (4001)</strong></td><td>New event created to get User By Id from Subscribe</td></tr><tr><td>-</td><td><strong>SUBSCRIBE_USER_UPDATE (4004)</strong></td><td>New event created to update User in Subscribe</td></tr></tbody></table>
