Skip to content

PartnerLevelPointsController API Documentation

Lee Sambridge edited this page Mar 21, 2025 · 1 revision

Partner Level Points API Documentation

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

Table of Contents

Authentication

All endpoints in the Partner Level Points API require JWT Bearer authentication. Include the JWT token in the Authorization header of your requests:

Authorization: Bearer {your_jwt_token}

Endpoints

Add or Edit Partner Level Point

Creates a new partner level point or updates an existing one.

URL: /api/PartnerLevelPoints/{partnerId}

Method: POST

Auth required: Yes (JWT Bearer token)

URL Parameters:

  • partnerId (long) - ID of the partner

Request Body:

{
  "id": 0,
  "levelId": 1,
  "pointsRequired": 1000,
  "description": "Gold level rewards",
  "isActive": true
}

Success Response:

  • Code: 200 OK
  • Content: Created or updated partner level point

Example Request:

POST /api/PartnerLevelPoints/123 HTTP/1.1
Host: your-api-domain.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json

{
  "id": 0,
  "levelId": 1,
  "pointsRequired": 1000,
  "description": "Gold level rewards",
  "isActive": true
}

Example Response:

{
  "id": 456,
  "levelId": 1,
  "pointsRequired": 1000,
  "description": "Gold level rewards",
  "isActive": true,
  "partnerId": 123
}

Delete Partner Level

Deletes a partner level point.

URL: /api/PartnerLevelPoints/{partnerId}/{id}

Method: DELETE

Auth required: Yes (JWT Bearer token)

URL Parameters:

  • partnerId (long) - ID of the partner
  • id (long) - ID of the partner level point to delete

Success Response:

  • Code: 200 OK
  • Content: Result of the operation

Example Request:

DELETE /api/PartnerLevelPoints/123/456 HTTP/1.1
Host: your-api-domain.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Example Response:

{
  "success": true,
  "message": "Partner level point deleted successfully"
}

Get Partner Points

Retrieves all level points for a partner.

URL: /api/PartnerLevelPoints/{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 partner level points

Example Request:

GET /api/PartnerLevelPoints/123 HTTP/1.1
Host: your-api-domain.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Example Response:

[
  {
    "id": 1,
    "levelId": 1,
    "pointsRequired": 100,
    "description": "Bronze level",
    "isActive": true,
    "partnerId": 123
  },
  {
    "id": 2,
    "levelId": 2,
    "pointsRequired": 500,
    "description": "Silver level",
    "isActive": true,
    "partnerId": 123
  },
  {
    "id": 3,
    "levelId": 3,
    "pointsRequired": 1000,
    "description": "Gold level",
    "isActive": true,
    "partnerId": 123
  }
]

Get Partner Point by ID

Retrieves a specific partner level point by ID.

URL: /api/PartnerLevelPoints/{partnerId}/{id}

Method: GET

Auth required: Yes (JWT Bearer token)

URL Parameters:

  • partnerId (long) - ID of the partner
  • id (long) - ID of the partner level point

Success Response:

  • Code: 200 OK
  • Content: Partner level point details

Example Request:

GET /api/PartnerLevelPoints/123/456 HTTP/1.1
Host: your-api-domain.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Example Response:

{
  "id": 456,
  "levelId": 3,
  "pointsRequired": 1000,
  "description": "Gold level",
  "isActive": true,
  "partnerId": 123
}

Get Partner Points by Level

Retrieves partner level points for a specific level.

URL: /api/PartnerLevelPoints/{partnerId}/level/{levelId}

Method: GET

Auth required: Yes (JWT Bearer token)

URL Parameters:

  • partnerId (long) - ID of the partner
  • levelId (long) - ID of the level

Success Response:

  • Code: 200 OK
  • Content: Partner level points for the specified level

Example Request:

GET /api/PartnerLevelPoints/123/level/3 HTTP/1.1
Host: your-api-domain.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Example Response:

{
  "id": 456,
  "levelId": 3,
  "pointsRequired": 1000,
  "description": "Gold level",
  "isActive": true,
  "partnerId": 123
}

Clone this wiki locally