Repository navigation
PartnerActivitiesController API Documentation
This document provides documentation for the Partner Activities API endpoints available in the Points.Api system.
All endpoints in the Partner Activities API require JWT Bearer authentication. Include the JWT token in the Authorization header of your requests:
Authorization: Bearer {your_jwt_token}
The ActivityTypeSmallResponse model represents an activity type with the following fields:
| Field | Type | Description |
|---|---|---|
| id | long | Unique identifier for the activity |
| name | string | Name of the activity (max length: 500 characters) |
| active | boolean | Whether the activity is active (default: true) |
| activityTypeId | long? | Optional reference to a parent activity type |
| showOnEarnPointsPage | boolean | Whether to display this activity on the earn points page |
| earnPointsRedirectUrl | string | URL to redirect to for earning points (optional) |
| earnPointsExtraInfo | string | Additional information about earning points (optional) |
| earnPointsImageUrl | string | URL to an image representing the activity (optional) |
| allowToBeUsedForTimeStreak | boolean | Whether this activity can be used for time streak calculations |
| earnPointsCmsContent | string | CMS content for the earn points display (optional) |
| expireInDaysOfCollecting | long? | Number of days after which collected points expire (optional) |
| displayPointValue | decimal | The point value to display to users (default: 0) |
| pointValue | decimal | The actual point value awarded (default: 0) |
Retrieves details about a specific activity type for a partner.
URL: /api/PartnerActivities/{partnerId}/activity/{activityId}
Method: GET
Auth required: Yes (JWT Bearer token)
URL Parameters:
-
partnerId(long) - ID of the partner -
activityId(long) - ID of the activity
Success Response:
- Code: 200 OK
- Content: Activity type details
Example Request:
GET /api/PartnerActivities/123/activity/456 HTTP/1.1
Host: your-api-domain.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Example Response:
{
"id": 456,
"name": "Running",
"active": true,
"activityTypeId": 123,
"showOnEarnPointsPage": true,
"earnPointsRedirectUrl": "https://example.com/earn/running",
"earnPointsExtraInfo": "Earn points for every kilometer you run",
"earnPointsImageUrl": "https://example.com/images/running.jpg",
"allowToBeUsedForTimeStreak": true,
"earnPointsCmsContent": "<div>Run to earn points!</div>",
"expireInDaysOfCollecting": 30,
"displayPointValue": 10.0,
"pointValue": 10.0
}Retrieves all activity types for a partner.
URL: /api/PartnerActivities/{partnerId}
Method: GET
Auth required: Yes (JWT Bearer token)
URL Parameters:
-
partnerId(long) - ID of the partner
Success Response:
- Code: 200 OK
- Content: List of activity types
Example Request:
GET /api/PartnerActivities/123 HTTP/1.1
Host: your-api-domain.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Example Response:
[
{
"id": 1,
"name": "Running",
"active": true,
"activityTypeId": 101,
"showOnEarnPointsPage": true,
"earnPointsRedirectUrl": "https://example.com/earn/running",
"earnPointsExtraInfo": "Earn points for every kilometer you run",
"earnPointsImageUrl": "https://example.com/images/running.jpg",
"allowToBeUsedForTimeStreak": true,
"earnPointsCmsContent": "<div>Run to earn points!</div>",
"expireInDaysOfCollecting": 30,
"displayPointValue": 10.0,
"pointValue": 10.0
},
{
"id": 2,
"name": "Cycling",
"active": true,
"activityTypeId": 102,
"showOnEarnPointsPage": true,
"earnPointsRedirectUrl": "https://example.com/earn/cycling",
"earnPointsExtraInfo": "Earn points for every kilometer you cycle",
"earnPointsImageUrl": "https://example.com/images/cycling.jpg",
"allowToBeUsedForTimeStreak": true,
"earnPointsCmsContent": "<div>Cycle to earn points!</div>",
"expireInDaysOfCollecting": 30,
"displayPointValue": 5.0,
"pointValue": 5.0
},
{
"id": 3,
"name": "Swimming",
"active": true,
"activityTypeId": 103,
"showOnEarnPointsPage": true,
"earnPointsRedirectUrl": "https://example.com/earn/swimming",
"earnPointsExtraInfo": "Earn points for every kilometer you swim",
"earnPointsImageUrl": "https://example.com/images/swimming.jpg",
"allowToBeUsedForTimeStreak": true,
"earnPointsCmsContent": "<div>Swim to earn points!</div>",
"expireInDaysOfCollecting": 30,
"displayPointValue": 20.0,
"pointValue": 20.0
}
]Creates a new activity type for a partner.
URL: /api/PartnerActivities/{partnerId}/activity/
Method: POST
Auth required: Yes (JWT Bearer token)
URL Parameters:
-
partnerId(long) - ID of the partner
Request Body:
{
"name": "Walking",
"active": true,
"activityTypeId": 104,
"showOnEarnPointsPage": true,
"earnPointsRedirectUrl": "https://example.com/earn/walking",
"earnPointsExtraInfo": "Earn points for every kilometer you walk",
"earnPointsImageUrl": "https://example.com/images/walking.jpg",
"allowToBeUsedForTimeStreak": true,
"earnPointsCmsContent": "<div>Walk to earn points!</div>",
"expireInDaysOfCollecting": 30,
"displayPointValue": 5.0,
"pointValue": 5.0
}Success Response:
- Code: 200 OK
- Content: Newly created activity
Example Request:
POST /api/PartnerActivities/123/activity/ HTTP/1.1
Host: your-api-domain.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
{
"name": "Walking",
"description": "Walking activity",
"pointsPerUnit": 5,
"unit": "km",
"isActive": true
}Example Response:
{
"id": 789,
"name": "Walking",
"active": true,
"activityTypeId": 104,
"showOnEarnPointsPage": true,
"earnPointsRedirectUrl": "https://example.com/earn/walking",
"earnPointsExtraInfo": "Earn points for every kilometer you walk",
"earnPointsImageUrl": "https://example.com/images/walking.jpg",
"allowToBeUsedForTimeStreak": true,
"earnPointsCmsContent": "<div>Walk to earn points!</div>",
"expireInDaysOfCollecting": 30,
"displayPointValue": 5.0,
"pointValue": 5.0
}Updates an existing activity type for a partner.
URL: /api/PartnerActivities/{partnerId}/activity/{activityId}
Method: PATCH
Auth required: Yes (JWT Bearer token)
URL Parameters:
-
partnerId(long) - ID of the partner -
activityId(long) - ID of the activity to update
Request Body:
{
"name": "Fast Walking",
"active": true,
"activityTypeId": 104,
"showOnEarnPointsPage": true,
"earnPointsRedirectUrl": "https://example.com/earn/fast-walking",
"earnPointsExtraInfo": "Earn more points for fast walking",
"earnPointsImageUrl": "https://example.com/images/fast-walking.jpg",
"allowToBeUsedForTimeStreak": true,
"earnPointsCmsContent": "<div>Fast walk to earn more points!</div>",
"expireInDaysOfCollecting": 30,
"displayPointValue": 7.0,
"pointValue": 7.0
}Success Response:
- Code: 200 OK
- Content: Updated activity
Example Request:
PATCH /api/PartnerActivities/123/activity/789 HTTP/1.1
Host: your-api-domain.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
{
"name": "Fast Walking",
"active": true,
"activityTypeId": 104,
"showOnEarnPointsPage": true,
"earnPointsRedirectUrl": "https://example.com/earn/fast-walking",
"earnPointsExtraInfo": "Earn more points for fast walking",
"earnPointsImageUrl": "https://example.com/images/fast-walking.jpg",
"allowToBeUsedForTimeStreak": true,
"earnPointsCmsContent": "<div>Fast walk to earn more points!</div>",
"expireInDaysOfCollecting": 30,
"displayPointValue": 7.0,
"pointValue": 7.0
}Example Response:
{
"id": 789,
"name": "Fast Walking",
"active": true,
"activityTypeId": 104,
"showOnEarnPointsPage": true,
"earnPointsRedirectUrl": "https://example.com/earn/fast-walking",
"earnPointsExtraInfo": "Earn more points for fast walking",
"earnPointsImageUrl": "https://example.com/images/fast-walking.jpg",
"allowToBeUsedForTimeStreak": true,
"earnPointsCmsContent": "<div>Fast walk to earn more points!</div>",
"expireInDaysOfCollecting": 30,
"displayPointValue": 7.0,
"pointValue": 7.0
}- 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