Repository navigation
FAQ
The EZ Loyalty API allows developers to interact with the EZ Loyalty platform. It provides endpoints for managing users, handling rewards, and accessing various features of the platform.
The API is available in both test and production environments:
- Test: https://api.test.myezrewards.com/{version}/{endpoint}
- Production: https://api.myezrewards.com/{version}/{endpoint}
There are two versions of the API:
- Version 1 (v1): The original API with form-based requests
- Version 2 (v2): The newer API with JSON-based requests and RESTful endpoints
Yes, Swagger documentation is available at:
- Test: https://api.test.myezrewards.com/swagger/index.html?urls.primaryName=v2
- Production: https://api.myezrewards.com/swagger/index.html?urls.primaryName=v2
Version 1 uses form-based requests with a single endpoint (/members) and differentiates operations using a Type parameter. Version 2 follows RESTful principles with distinct endpoints for different operations and uses JSON for request/response payloads.
Authentication is a two-step process:
- Obtain an API key from EZ Loyalty
- Exchange this API key for a Bearer token by calling the
/v2/GetAuthTokenendpoint - Include the Bearer token in the
Authorizationheader for all subsequent requests
Bearer tokens have a lifespan of 5 minutes before they expire. You'll need to generate a new token after expiration.
Endpoints will return a 401 status code if the API key or Bearer token provided is missing, invalid, or expired.
You should implement token refresh logic in your application. When you receive a 401 error, your application should generate a new token using the API key and retry the request.
In v2, you can create a new user by sending a POST request to /v2/users with the required JSON payload containing user details like email address, name, and level.
The available user levels are:
- Basic
- Basic Plus
- Premium
- Premium Plus
In v2, you can update a user's information by sending a PATCH request to /v2/users/{identifier} with the updated user details in JSON format.
To cancel a user's subscription, send a PATCH request to /v2/users/{identifier}/cancel where identifier is the user's unique ID. The endpoint will return a 200 status code on successful cancellation.
-
Renewing: Send a PATCH request to
/v2/renewwith either the user's email address or partner member ID to renew a subscription for one year from the current date. -
Extending: Send a PATCH request to
/v2/users/{identifier}/renewto extend a subscription to a specific date. You can optionally include aRenewDatein UTC format, or it will default to one year from now.
In v2, there are multiple ways to look up a user:
- By email or partner member ID: GET
/v2/users?EmailAddress={email}&PartnerMemberId={id} - By user identifier: GET
/v2/users/{identifier} - By level: GET
/v2/users/{level}/level
A user identifier is a unique numeric ID assigned to each user by the EZ Loyalty system. You can obtain it by:
- Looking up a user by email or partner member ID
- Checking the response when creating a new user
- It's included in most API responses that return user information
Org Unit Levels allow you to categorize users into subgroups of your organization. They're specified as an array of strings when creating or managing users and are only needed if you want to subcategorize your members.
User statuses typically include:
- Active: User has a valid subscription
- Cancelled: User's subscription has been cancelled
- Expired: User's subscription has expired
API responses in v2 are in JSON format. Successful responses include data about the operation performed, while error responses include details about what went wrong.
User lookup responses include:
- identifier: The user's unique ID
- joinDate: When the user joined
- loginUrl: URL for the user to access their account
- level: The user's subscription level
- status: Current status of the account
- firstName/lastName: User's name
- emailAddress: User's email address
- country: User's country
- partnerMemberId: Your identifier for this user
The loginUrl is a personalized URL that allows the user to log into the EZ Loyalty rewards platform directly. This URL contains an authentication token (iframe parameter) and should be provided to the user to access their rewards.
The API requires TLS 1.2 or higher. Less secure versions of TLS are not supported, and calls made over plain HTTP will fail.
Common status codes include:
- 200: Successful operation
- 201: Resource successfully created
- 400: Invalid request or payload
- 401: Unauthorized (invalid or missing authentication)
- 404: Resource not found
- 500: Server error
Each endpoint documentation specifies which status codes to expect for that particular operation.
The API supports most countries worldwide. You can specify countries using their three-digit ISO country codes. Examples include: USA (840), GBR (826), CAN (124), DEU (276), FRA (250), JPN (392), AUS (036), and IND (356). For a complete list of supported countries and their codes, please refer to our Country List documentation.
Yes, use the test environment (https://api.test.myezrewards.com) to test your integration before moving to production.
Check that:
- You're using a valid API key
- Your Bearer token hasn't expired (they only last 5 minutes)
- You're including the Authorization header correctly with the format
Bearer {token}
This typically means the user doesn't exist in the system. Double-check:
- You're using the correct identifier, email address, or partner member ID
- The user hasn't been deleted or removed from the system
- You're using the correct environment (test vs. production)
Contact EZ Loyalty support with details about the issue you're experiencing, including request details and any error responses received.
- Frequently Asked Questions
-
EZ Loyalty Points Api
- Authorization
- Summary
- End Points
- Branding End Points
- Buckets End Points
- Competition End Points
- Country End Points
- Leader Boards End Points
- Machine Learning End Points
- Partner Activities End Points
- Partner End Points
- Partner FAQs End Points
- Partner Level Points End Points
- Reward Points End Points
- Subscriptions End Points
- Users End Points
- User Points End Points
- EZ Loyalty Admin Api