Skip to main content

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 emailusernamephone, 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. 🚴🏽‍♂️

Request Body Parameters

NameDescriptionRequiredData type
nameKind of obvious, but it’s the user’s nametrueString
identifierThe user’s identifier.

This should match your chosen identifier type at signup (email or username)
trueString
emailThe user’s email addresstrueString
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.