Index User
Index User
For you to be able to carry out any transaction via Thepeer, just like in person, you will need to have customers. Or as we call them on Thepeer, users. To index your users on Thepeer, you need to provide identifiers that match the identifier type registered on your business.
What is identifier type?
An identifier type is the primary means of user identification on your platform. There are various identifier types which range from email, username, phone, and account_id to name a few.
However, we currently support username and email.
Endpoint Post
This endpoint allows you add a user to your Thepeer business. 🚴🏽♂️
https://api.thepeer.co/users
Request Body Parameters
| Name | Description | Required | Data type |
|---|---|---|---|
| name | Kind of obvious, but it’s the user’s name | true | String |
| identifier | The user’s identifier. This should match your chosen identifier type at signup (email or username) | true | String |
| The user’s email address | true | String |
Sample request
{
"name": "Steve Jobs",
"identifier": "steve",
"email": "steve@apple.com"
}
Sample response
{
"indexed_user": {
"reference": "the-nothing-the-ghost",
"name": "Trojan Okoh",
"identifier": "trojan",
"identifier_type": "username",
"email": "trojan@thepeer.co",
"created_at": "2023-02-27T13:02:53.000000Z",
"updated_at": "2023-02-27T13:02:53.000000Z"
}
}
The reference is the property of the user that will be required for transactions on Thepeer. We’ll refer to it as user reference.