👨💻For Developers
In this guide, we provide detailed instructions for connecting a Data Holder to MyDataCoin Bridge and receiving requests.
ProfileDisclaimer: The development team is working diligently, and the documentation will be updated with each new release.
Table of contents:
System Requirements
Hardware: CPU: Intel Core i3 or AMD Ryzen 3.
RAM: At least 4GB.
HDD: 20GB free space. 64-bit kernel and CPU support for virtualization.
Overview
This guide provides a comprehensive explanation of how to effectively interact with the MyDataCoin ecosystem. To integrate successfully, you will need to set up an endpoint that can receive POST requests, which will, in turn, return the response described in the sections below.
Install Docker
Please select the appropriate link for your operation system and follow the provided instructions to install Docker:
For Linux: Docker Installation Instructions for Linux
If you use Ubuntu, and have a following error:
please visit: Link.
For Windows: Docker Installation Instructions for Windows
For macOS: Docker Installation Instructions for macOS
Installing Docker Compose
To make sure you obtain the most updated stable version of Docker Compose, you’ll download this software from its official Github repository.
First, confirm the latest version available in their releases page. At the time of this writing, the most current stable version is 1.29.2
.
The following command will download the 1.29.2
release and save the executable file at /usr/local/bin/docker-compose
, which will make this software globally accessible as docker-compose
:
Next, set the correct permissions so that the docker-compose
command is executable:
To verify that the installation was successful, you can run:
Setup Docker
Before you begin, make sure that you have an Secret Token. You should have received this token after completing the registration process, as described here.
After Docker successfully installed, you need to download docker-compose.yml from our official repository:
Open docker-compose.yml file to make changes;
Get your Secret Token from https://app.mydatacoin.io/settings. You will find it in Settings tab;
Put the token in AUTH_TOKEN env variable.
After you made changes, save the file and run the following command in terminal:
Be sure, that port 8000 is open and ready for inbound connections. To change the settings, run the command: sudo ufw allow 8000/tcp
Upload a DataSet
Please ensure that you create a DataProvider entity in the Marketplace before uploading any datasets. To proceed, please provide your company information here.
Important! The data you upload will not be transferred to us or any third parties; it will be stored in your Docker container.
To prepare the data monetization process, you need to prepare a JSON file with data in the format User Model shown below.
After docker successfully started, you need to open browser and input the following url: http://your_server_address:8000/upload, then you'll see following page:
Put your Secret Token in the Secret Token field and give your dataset a name, choose a dataset you've prepared and press Upload.
Now you ready to go! Please feel free to ask any questions about integration process. Send us email to as@mydatacoin.io
User model sample
Model details:
Parameter | Data Type | Nullable |
---|---|---|
Profile | ||
BasicData | ||
Contacts | ||
WorkAndEducation | ||
PlaceOfResidence | ||
PersonalInterests | ||
DeviceInformation | ||
Cookies |
Profile
Parameter | Data Type | Comment | Nullable |
---|---|---|---|
recordId | string | Unique identifier of record, you can use your database identifier | |
firstName | string | ||
lastName | string | ||
dateOfBirth | DateTime | Format(1999-09-09T00:00:00Z) | |
gender | int | Enum | |
string | |||
phone | string | ||
maritalStatus | int | ||
income | decimal | Income refers to the amount of money a user earns within a certain period of time. |
BasicData
Parameter | Data Type | Nullable |
---|---|---|
interests | string[] | |
languages | string[] | |
religionViews | string[] | |
politicalViews | string[] |
Contacts
Parameter | Data Type | |
---|---|---|
mobilePhone | string | |
address | string | |
linkedAccounts | string[] | |
website | string |
WorkAndEducation
Parameter | Data Type | Nullable |
---|---|---|
placeOfWork | string | |
skills | string[] | |
university | string | |
faculty | string |
PlaceOfResidence
Parameter | Data Type | Nullable |
---|---|---|
currentCity | string | |
birthPlace | string | |
otherCities | string[] |
PersonalInterests
Parameter | Data Type | Nullable |
---|---|---|
breifDescription | string | |
hobby | string[] | |
sport | string[] |
DeviceInformation
Parameter | Data Type | Comments | Nullable |
---|---|---|---|
deviceName | string | Device used to access the internet | |
deviceId | string | DeviceId is a parameter that refers to a unique identifier for a device. | |
operatingSystem | string | Operating system and its version | |
displayResolution | string | Screen resolution | |
browser | string | Used browser and its version | |
iSP | string | Information about the internet service provider and type of connection | |
adBlock | bool | Presence of ad blockers |
Cookies
Parameter | Data Type | Comment | Nullable |
---|---|---|---|
id | string | User identifier | |
sessionState | string | Session state | |
language | string | Language settings | |
region | string | Preferred region settings | |
recentPages | string[] | Recently visited pages | |
shoppingCart | Shopping cart items |
ShoppingCart
Parameter | Data Type | Comments | |
---|---|---|---|
productId | string | unique identifier of the product in the shopping cart | |
productName | string | name of the product in the shopping cart | |
productPrice | string | price of the product in the shopping cart | |
quantity | string | the number of units of a product in the shopping cart | |
subTotal | string | the total cost of a particular product in the shopping cart (quantity x price) | |
total | string | the total cost of all products in the shopping cart | |
couponCode | string | any applied discounts or coupons to the shopping cart | |
shippingInformation | string | shipping method and cost for the items in the shopping cart | |
taxInformation | string | applicable taxes for the items in the shopping cart |
MaritalStatus
Marital status is a characteristic that reflects a person's marital status. Depending on the country and culture, there are different categories of marital statuses. Some of them may include:
Value | |
---|---|
Single | Single - a person who is not married and does not have an official partner. |
Married | Married - a person who is in an official marriage. |
Divorced | Divorced - a person who was in an official marriage but got divorced. |
Bachelor | Bachelor/Spinster - a person who lives alone, regardless of their marital status. |
Widow | Widower/Widow - a person who lost their spouse. |
Cohabiting | Cohabiting - two people who live together but are not in an official marriage. |
Separated | Separated - a person who was in an official marriage but is in the process of getting divorced. |
Living_Separately | Living separately - a person who lives separately from their family, for example, in a dormitory or student room. |
Remarried | Remarried - spouses who have already been in an official marriage and have remarried. |
Add Records
These two methods serve to update and add users, add user api/v1/insert
serves so that you do not have to form json every time and fill it with the /upload
method, instead you can simply write a function that will be executed when you add a new user to the database, that is, you simply add to yours and simultaneously make a request to our database data, in the future this will free you from the constant updating of data.
Inserts new user profile
POST
https://your-ip-address:your-port/api/v1/insert
All the body parameters described in User Model
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | there should be an authorization token that was entered in docker-compose.yml |
Request Body
Name | Type | Description |
---|---|---|
profile* | profile | |
basicData | basicData | |
сontacts | contacts | |
workAndEducation | workdAndEducation | |
deviceInformation | deviceInformation | |
personalInterests | personalInterests | |
placeOfResidence | placeOfResidence | |
cookies | cookies |
Update Records
The update method serves to synchronize your database with ours, so that the data is always up to date, you just need to write a function that, when updating your user's data, it simultaneously updates the user in our database to keep personal data up to date
updating an existing user
PUT
https://your-ip-address:your-port/api/v1/update?recordId=55
This method is used to update the data of an existing user, please note that identification occurs by recordId which is located separately outside the data to update
Query Parameters
Name | Type | Description |
---|---|---|
recordId* | String | This string is an identifier by which you will find and update user data |
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | This token is needed for authorization, which is located in docker-compose.yml |
Request Body
Name | Type | Description |
---|---|---|
deviceInformation | deviceInformation | |
personalInterests | personalInterests | |
placeOfresidence | placeOfResidence | |
workAndEducation | workAndEducation | |
contacts | Contacts | |
basicData | BasicData | |
profile | Profile | |
cookies | Cookies |
Last updated