# Addressbook

## **Get AddressBook Item Information**

**Introduction**

The `GET /api/Addressbook/Info` endpoint allows you to retrieve information about a specific item in the address book. You can search using a username, email, or mobile number.

**Create Request**

```
curl -X 'GET' \
  'https://wallet.xprizo.com/api/Addressbook/Info?value=John%20Doe' \
  -H 'accept: text/plain' \
  -H 'x-api-version: 1'
```

**Endpoint: Get Information about an AddressBook Item**

- **URL**: `/api/Addressbook/Info`
- **Method**: `GET`
- **Description**: Retrieve information about an AddressBook item by providing a username, email, or mobile number.

<table border="1" id="bkmrk-parameter-descriptio" style="outline-color: var(--color-primary); height: 245.969px; width: 703px;"><tbody style="outline-color: var(--color-primary);"><tr style="outline-color: var(--color-primary); height: 29.7969px;"><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Parameter**</td><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Description**</td></tr><tr style="outline-color: var(--color-primary); height: 46.5938px;"><td style="outline-color: var(--color-primary); width: 351px; height: 46.5938px;">Query</td><td style="outline-color: var(--color-primary); width: 351px; height: 46.5938px;">(string, required): Enter the username, email, or mobile number of the contact you are searching for.</td></tr><tr style="outline-color: var(--color-primary); height: 46.5938px;"><td style="outline-color: var(--color-primary); width: 351px; height: 46.5938px;">Header</td><td style="outline-color: var(--color-primary); width: 351px; height: 46.5938px;">(string, required): Specify the API version.</td></tr></tbody></table>

**Responses**

<p class="callout info">Response (200 Success)</p>

The request was successful, and the information about the AddressBook item is returned.

```
{
  "id": 0,
  "description": "string"
}
```

<p class="callout danger">Errors</p>

- **400 Bad Request** The request could not be understood or was missing required parameters.
- **401 Unauthorized** Authentication failed or the user does not have permission for the requested operation.
- **500 Server Error** An error occurred on the server.

## **Get Active User Count in Address Book**

**Introduction**

The `GET /api/Addressbook/Count` endpoint allows you to retrieve the number of active users in the address book.

**Create Request**

```
curl -X 'GET' \
  'https://wallet.xprizo.com/api/Addressbook/Count?contactId=2131' \
  -H 'accept: text/plain' \
  -H 'x-api-version: 1'
```

**Endpoint: Get Contact Count**

- **URL**: `/api/Addressbook/Count`
- **Method**: `GET`
- **Description**: Retrieve the count of AddressBook contacts based on a specific contact ID.

<table border="1" id="bkmrk-parameter-descriptio-0" style="color: #444444; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Roboto, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 14px; outline-color: var(--color-primary); height: 134.172px; width: 703px;"><tbody style="outline-color: var(--color-primary);"><tr style="outline-color: var(--color-primary); height: 29.7969px;"><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Parameter**</td><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Description**</td></tr><tr style="outline-color: var(--color-primary); height: 46.5938px;"><td style="outline-color: var(--color-primary); width: 351px; height: 46.5938px;">Query</td><td style="outline-color: var(--color-primary); width: 351px; height: 46.5938px;">contactId (integer, required): The ID of the contact for which you want to get the count.</td></tr><tr style="outline-color: var(--color-primary); height: 57.7812px;"><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">Header</td><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">x-api-version (string, required): Specify the API version.

</td></tr></tbody></table>

**Responses**

<p class="callout info">Response (200 Success)</p>

The request was successful, and the information about the AddressBook item is returned.

<p class="callout danger">Errors</p>

- **400 Bad Request** The request could not be understood or was missing required parameters.
- **401 Unauthorized** Authentication failed or the user does not have permission for the requested operation.
- **500 Server Error** An error occurred on the server.

## **Set User KYC Compliant**

**Introduction**

The `SetUserKYCCompliant` API endpoint allows you to update the KYC (Know Your Customer) compliance status of a user in the address book. This endpoint requires proper authentication and versioning headers.

**Create Request**

```
curl -X 'PUT' \
  'https://wallet.xprizo.com/api/Addressbook/SetUserKYCCompliant/123?value=true' \
  -H 'accept: */*' \
  -H 'x-api-version: 1'
```

**Endpoint: Set User KYC Compliant**


- **URL**: `/api/Addressbook/SetUserKYCCompliant/{contactId}`
- **Method**: `PUT`
- **Description**: Update the KYC compliance status of a specific user in the address book.

<table border="1" id="bkmrk-parameter-descriptio-1" style="color: #444444; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Roboto, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 14px; outline-color: var(--color-primary); height: 134.172px; width: 703px;"><tbody style="outline-color: var(--color-primary);"><tr style="outline-color: var(--color-primary); height: 29.7969px;"><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Parameter**</td><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Description**</td></tr><tr><td style="outline-color: var(--color-primary); width: 351px;">Path</td><td style="outline-color: var(--color-primary); width: 351px;">contactId (integer, required): The ID of the contact whose KYC compliance status is being updated.</td></tr><tr style="outline-color: var(--color-primary); height: 46.5938px;"><td style="outline-color: var(--color-primary); width: 351px; height: 46.5938px;">Query</td><td style="outline-color: var(--color-primary); width: 351px; height: 46.5938px;">contactId (integer, required): The ID of the contact for which you want to get the count.</td></tr><tr style="outline-color: var(--color-primary); height: 57.7812px;"><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">Header</td><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">x-api-version (string, required): Specify the API version.

</td></tr></tbody></table>

**Responses**

<p class="callout info">Response (200 Success)</p>

The request was successful, and the information about the AddressBook item is returned.

<p class="callout danger">Errors</p>

- **400 Bad Request** The request could not be understood or was missing required parameters.
- **401 Unauthorized** Authentication failed or the user does not have permission for the requested operation.
- **500 Server Error** An error occurred on the server.

## **Rename Contact in Address Book**

**Introduction**

The `PUT /api/Addressbook/RenameUser` endpoint allows you to rename a contact in the address book.

**Create Request**

```
curl -X 'PUT' \
  'https://wallet.xprizo.com/api/Addressbook/RenameUser' \
  -H 'accept: */*' \
  -H 'x-api-version: 1' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": 0,
  "description": "string"
}'
```

**Endpoint: Rename Contact**

- **URL**: `/api/Addressbook/RenameUser`
- **Method**: `PUT`
- **Description**: Rename a contact in the address book.

<table border="1" id="bkmrk-parameter-descriptio-2" style="color: #444444; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Roboto, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 14px; outline-color: var(--color-primary); height: 134.172px; width: 703px;"><tbody style="outline-color: var(--color-primary);"><tr style="outline-color: var(--color-primary); height: 29.7969px;"><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Parameter**</td><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Description**</td></tr><tr style="outline-color: var(--color-primary); height: 57.7812px;"><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">Header</td><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">x-api-version (string, required): Specify the API version.

</td></tr></tbody></table>

**Responses**

<p class="callout info">Response (200 Success)</p>

The request was successful, and the information about the AddressBook item is returned.

<p class="callout danger">Errors</p>

- **400 Bad Request** The request could not be understood or was missing required parameters.
- **401 Unauthorized** Authentication failed or the user does not have permission for the requested operation.
- **500 Server Error** An error occurred on the server.

## **Disable Contact in Address Book**

**Introduction**

The `DELETE /api/Addressbook/Disable/{contactId}` endpoint allows you to disable a contact in the address book.

**Create Request**

```
curl -X 'DELETE' \
  'https://wallet.xprizo.com/api/Addressbook/Disable/123' \
  -H 'accept: */*' \
  -H 'x-api-version: 1'
```

**Endpoint: Disable Contact**

- **URL**: `/api/Addressbook/Disable/{contactId}`
- **Method**: `DELETE`
- **Description**: Disable a contact in the address book.

<table border="1" id="bkmrk-parameter-descriptio-3" style="color: #444444; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Roboto, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 14px; outline-color: var(--color-primary); height: 134.172px; width: 703px;"><tbody style="outline-color: var(--color-primary);"><tr style="outline-color: var(--color-primary); height: 29.7969px;"><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Parameter**</td><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Description**</td></tr><tr><td style="outline-color: var(--color-primary); width: 351px;">Path</td><td style="outline-color: var(--color-primary); width: 351px;">contactId (integer, required): The ID of the contact whose KYC compliance status is being updated.</td></tr><tr style="outline-color: var(--color-primary); height: 57.7812px;"><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">Header</td><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">x-api-version (string, required): Specify the API version.

</td></tr></tbody></table>

**Responses**

<p class="callout info">Response (200 Success)</p>

The request was successful, and the information about the AddressBook item is returned.

<p class="callout danger">Errors</p>

- **400 Bad Request** The request could not be understood or was missing required parameters.
- **401 Unauthorized** Authentication failed or the user does not have permission for the requested operation.
- **500 Server Error** An error occurred on the server.

## **Enable Contact in Address Book**

**Introduction**

The `DELETE /api/Addressbook/Enable/{contactId}` endpoint allows you to enable a previously disabled contact in the address book.

**Create Request**

```
curl -X 'DELETE' \
  'https://wallet.xprizo.com/api/Addressbook/Enable/123' \
  -H 'accept: */*' \
  -H 'x-api-version: 1'
```

**Endpoint: Enable Contact**

- **URL**: `/api/Addressbook/Enable/{contactId}`
- **Method**: `DELETE`
- **Description**: Enable a previously disabled contact in the address book.

<table border="1" id="bkmrk-parameter-descriptio-4" style="color: #444444; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Roboto, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 14px; outline-color: var(--color-primary); height: 134.172px; width: 703px;"><tbody style="outline-color: var(--color-primary);"><tr style="outline-color: var(--color-primary); height: 29.7969px;"><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Parameter**</td><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Description**</td></tr><tr><td style="outline-color: var(--color-primary); width: 351px;">Path</td><td style="outline-color: var(--color-primary); width: 351px;">contactId (integer, required): The ID of the contact whose KYC compliance status is being updated.</td></tr><tr style="outline-color: var(--color-primary); height: 57.7812px;"><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">Header</td><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">x-api-version (string, required): Specify the API version.

</td></tr></tbody></table>

**Responses**

<p class="callout info">Response (200 Success)</p>

The request was successful, and the information about the AddressBook item is returned.

<p class="callout danger">Errors</p>

- **400 Bad Request** The request could not be understood or was missing required parameters.
- **401 Unauthorized** Authentication failed or the user does not have permission for the requested operation.
- **500 Server Error** An error occurred on the server.

## **Add Contact to Address Book**

**Introduction**

The `POST /api/Addressbook/Add` endpoint allows you to add a new contact to the address book. The contact information can be a phone number, email, or a name.

**Create Request**

```
curl -X 'POST' \
  'https://wallet.xprizo.com/api/Addressbook/Add' \
  -H 'accept: */*' \
  -H 'x-api-version: 1' \
  -H 'Content-Type: application/json' \
  -d '{
  "value": "string"
}'
```

**Endpoint: Add Contact**

- **URL**: `/api/Addressbook/Add`
- **Method**: `POST`
- **Description**: Add a new contact to the address book.

<table border="1" id="bkmrk-parameter-descriptio-5" style="color: #444444; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Roboto, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 14px; outline-color: var(--color-primary); height: 134.172px; width: 703px;"><tbody style="outline-color: var(--color-primary);"><tr style="outline-color: var(--color-primary); height: 29.7969px;"><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Parameter**</td><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Description**</td></tr><tr style="outline-color: var(--color-primary); height: 57.7812px;"><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">Header</td><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">x-api-version (string, required): Specify the API version.

</td></tr></tbody></table>

**Responses**

<p class="callout info">Response (200 Success)</p>

The request was successful, and the information about the AddressBook item is returned.

<p class="callout danger">Errors</p>

- **400 Bad Request** The request could not be understood or was missing required parameters.
- **401 Unauthorized** Authentication failed or the user does not have permission for the requested operation.
- **500 Server Error** An error occurred on the server.

## **Validate a User Using Rules**

**Introduction**

The `POST /api/Addressbook/ValidateUser` endpoint allows you to validate a user based on specific rules. The validation can be performed using a contact name, which can be a phone number, an email address, or a name.

**Create Request**

```
curl -X 'POST' \
  'https://wallet.xprizo.com/api/Addressbook/ValidateUser?ruleName=test' \
  -H 'accept: text/plain' \
  -H 'x-api-version: 1' \
  -H 'Content-Type: application/json' \
  -d '{
  "value": "string"
}'
```

**Endpoint: Validate User**

- **URL**: `/api/Addressbook/ValidateUser`
- **Method**: `POST`
- **Description**: Validate a user using specified rules.

**Endpoint: Set User KYC Compliant**


- **URL**: `/api/Addressbook/SetUserKYCCompliant/{contactId}`
- **Method**: `PUT`
- **Description**: Update the KYC compliance status of a specific user in the address book.

<table border="1" id="bkmrk-parameter-descriptio-6" style="color: #444444; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Roboto, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 14px; outline-color: var(--color-primary); height: 134.172px; width: 703px;"><tbody style="outline-color: var(--color-primary);"><tr style="outline-color: var(--color-primary); height: 29.7969px;"><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Parameter**</td><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Description**</td></tr><tr><td style="outline-color: var(--color-primary); width: 351px;">Request</td><td style="outline-color: var(--color-primary); width: 351px;">value (string, required): The contact information to be validated. This can be a phone number, email, or name.</td></tr><tr style="outline-color: var(--color-primary); height: 46.5938px;"><td style="outline-color: var(--color-primary); width: 351px; height: 46.5938px;">Query</td><td style="outline-color: var(--color-primary); width: 351px; height: 46.5938px;">contactId (integer, required): The ID of the contact for which you want to get the count.</td></tr><tr style="outline-color: var(--color-primary); height: 57.7812px;"><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">Header</td><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">x-api-version (string, required): Specify the API version.

</td></tr></tbody></table>

**Responses**

<p class="callout info">Response (200 Success)</p>

The request was successful, and the information about the AddressBook item is returned.

```
{
  "id": 0,
  "description": "string"
}
```

<p class="callout danger">Errors</p>

- **400 Bad Request** The request could not be understood or was missing required parameters.
- **401 Unauthorized** Authentication failed or the user does not have permission for the requested operation.
- **500 Server Error** An error occurred on the server.

## **Delete an Address Book Contact**

**Introduction**

The `DELETE /api/Addressbook/Delete/{contactId}` endpoint allows you to delete a specific contact from the address book.

**Create Request**

```
curl -X 'DELETE' \
  'https://wallet.xprizo.com/api/Addressbook/Delete/123' \
  -H 'accept: */*' \
  -H 'x-api-version: 1'
```

**Endpoint: Delete Address Book Contact**

- **URL**: `/api/Addressbook/Delete/{contactId}`
- **Method**: `DELETE`
- **Description**: Delete a specific contact from the address book.

<table border="1" id="bkmrk-parameter-descriptio-7" style="color: #444444; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Roboto, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 14px; outline-color: var(--color-primary); height: 134.172px; width: 703px;"><tbody style="outline-color: var(--color-primary);"><tr style="outline-color: var(--color-primary); height: 29.7969px;"><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Parameter**</td><td style="outline-color: var(--color-primary); width: 351px; height: 29.7969px;">**Description**</td></tr><tr><td style="outline-color: var(--color-primary); width: 351px;">Path</td><td style="outline-color: var(--color-primary); width: 351px;">contactId (integer, required): The unique ID of the contact to be deleted.</td></tr><tr style="outline-color: var(--color-primary); height: 57.7812px;"><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">Header</td><td style="outline-color: var(--color-primary); width: 351px; height: 57.7812px;">x-api-version (string, required): Specify the API version.

</td></tr></tbody></table>

**Responses**

- **200 Success** The request was successful, and the information about the AddressBook item is returned.
- **400 Bad Request** The request could not be understood or was missing required parameters.
- **401 Unauthorized** Authentication failed or the user does not have permission for the requested operation.
- **500 Server Error** An error occurred on the server.