# 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.
**Parameter****Description**
Query(string, required): Enter the username, email, or mobile number of the contact you are searching for.
Header(string, required): Specify the API version.
**Responses**

Response (200 Success)

The request was successful, and the information about the AddressBook item is returned. ``` { "id": 0, "description": "string" } ```

Errors

- **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.
**Parameter****Description**
QuerycontactId (integer, required): The ID of the contact for which you want to get the count.
Headerx-api-version (string, required): Specify the API version.
**Responses**

Response (200 Success)

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

Errors

- **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.
**Parameter****Description**
PathcontactId (integer, required): The ID of the contact whose KYC compliance status is being updated.
QuerycontactId (integer, required): The ID of the contact for which you want to get the count.
Headerx-api-version (string, required): Specify the API version.
**Responses**

Response (200 Success)

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

Errors

- **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.
**Parameter****Description**
Headerx-api-version (string, required): Specify the API version.
**Responses**

Response (200 Success)

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

Errors

- **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.
**Parameter****Description**
PathcontactId (integer, required): The ID of the contact whose KYC compliance status is being updated.
Headerx-api-version (string, required): Specify the API version.
**Responses**

Response (200 Success)

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

Errors

- **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.
**Parameter****Description**
PathcontactId (integer, required): The ID of the contact whose KYC compliance status is being updated.
Headerx-api-version (string, required): Specify the API version.
**Responses**

Response (200 Success)

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

Errors

- **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.
**Parameter****Description**
Headerx-api-version (string, required): Specify the API version.
**Responses**

Response (200 Success)

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

Errors

- **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.
**Parameter****Description**
Requestvalue (string, required): The contact information to be validated. This can be a phone number, email, or name.
QuerycontactId (integer, required): The ID of the contact for which you want to get the count.
Headerx-api-version (string, required): Specify the API version.
**Responses**

Response (200 Success)

The request was successful, and the information about the AddressBook item is returned. ``` { "id": 0, "description": "string" } ```

Errors

- **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.
**Parameter****Description**
PathcontactId (integer, required): The unique ID of the contact to be deleted.
Headerx-api-version (string, required): Specify the API version.
**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.