User Onboarding flow - Online Cashback

User (as defined by the Sniptech Partner) submits an API request that requires the x-user-id header. For example a GET /transactions or a POST /clicks request to the Sniptech Cashback Partner API.

This then sets the requirement for the Sniptech Partner to submit a POST request in order to register the new user account using a generated UUID on the Partner end and providing a new UUID to be used as the x-user-id header in all further calls.

Picture

Create a user


Create a new Sniptech user by executing a request to POST {{base_url}}/users/v1/users.

Provide your user internal userId as GUID formated partnerUserId.

The response body contains the id which must be used as X-User-Id header or userId in paths in subsequent user related API requests.

Optionally a free format referralCode can be set on user creation. This referralCode is not relevant for online cashback use cases and can be left blank

Sample request:

--header 'Authorization: Bearer <access_token>' 
--header 'Content-Type: application/json'
--data-raw '{
"locale": "es-ES",
"partnerUserId": "962b1134-04b6-43fe-b685-91f3acd5b9b7",
"referralCode": "<string>"
}'

Sample response body:

{ 
"data": {
"user": {
"id": "469d13b6-c0ee-451d-a758-dbf77a6fe368",
"partnerUserId": "962b1134-04b6-43fe-b685-91f3acd5b9b7",
"locale": "es-ES",
"status": "ACTIVE",
"createdAt": "2022-06-13T12:22:57.644693Z",
"updatedAt": "2022-06-13T12:22:57.644693Z",
"referralCode": "<string>"
}
}
}