Skip to content

PartnerActivitiesController API Documentation

Lee Sambridge edited this page Mar 21, 2025 · 4 revisions

Partner Activities API Documentation

This document provides documentation for the Partner Activities API endpoints available in the Points.Api system.

Table of Contents

Authentication

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}

Endpoints

Get Activity

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",
  "description": "Running activity",
  "pointsPerUnit": 10,
  "unit": "km",
  "isActive": true
}

Get Activities

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",
    "description": "Running activity",
    "pointsPerUnit": 10,
    "unit": "km",
    "isActive": true
  },
  {
    "id": 2,
    "name": "Cycling",
    "description": "Cycling activity",
    "pointsPerUnit": 5,
    "unit": "km",
    "isActive": true
  },
  {
    "id": 3,
    "name": "Swimming",
    "description": "Swimming activity",
    "pointsPerUnit": 20,
    "unit": "km",
    "isActive": true
  }
]

Clone this wiki locally