Playbook and FAQs

2min

To add a user to the system, complete the following steps:

  1. Prepare the User Data: Gather the necessary user information, including a unique user_id, email, and any additional attributes you want to include.
  2. Make a POST Request: Send a POST request to the endpoint for creating a user.
  3. Accept the terms and conditions: Using the unique user_id in Step 1 above, the user must accept the terms and conditions for which the user's status will become ACTIVE.

Create a User

Here is an example of how to create a user using cURL:

curl --location 'https://rewards.finfare.com/api/v1/users' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' --header 'x-api-key: secret-key' --data '{ "publisher_user_id": "unique_user_id", "email": "[email protected]", "account_status": "PENDING", "attributes": {}, "created_at": "2023-10-01T12:00:00" }

Response

If the user is successfully created, the API returns a user object with a 200 response code. The response includes the user details that were provided with account_status set to PENDING.

By default, all new users have a PENDING status until they Accept Terms and Conditions, upon which their status will be set to ACTIVE.

Accept terms and conditions

To accept the terms and conditions for a user in the system, Publishers must use the Accept T&Cs for a user endpoint.

Example request

curl --location 'https://rewards.finfare.com/api/v1/terms/accept' \ --header 'Content-Type: application/json' \ --header 'x-api-key: your_api_key' \ --data-raw '{ "publisher_user_id": "example_user_id", "tnc_id": 1 }'

Example response

json{ "publisher_user_id": "example_user_id", "email": "[email protected]", "account_status": "Active" }

Body parameters

Name

Data type

Description

publisher_user_id REQUIRED

string

Publisher's unique identifier for the user. This ID is sent by the publisher to to identify a user in the publisher’s system.

tnc_id REQUIRED

integer

Unique id of the Terms and Conditions object.

Response

Name

Data type

Description

publisher_user_id

string

Publisher's unique identifier for the user. This ID is sent by the publisher to to identify a user in the publisher’s system.

email

string

Email address linked to the user which can be used to directly communicate with the user.

account_status

enum

This indicates the status of the user in the system and is used primarily to determine if a user has accepted the Terms and Conditions. This can also be used to determine if a user is still active in the system.

Possible values:

  • ACTIVE - User has accepted Terms and Conditions.
  • INACTIVE - Indicates that the publisher has deactivated the user.
  • PENDING - User has not accepted the Terms and Conditions.

By following these steps, publishers can successfully accept the terms and conditions for a user in the system.