---
agentTools:
  projectIndex: https://docs.nvecta.com/llms.txt
---

# Fetch Loyalty Activity

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "description": "",
    "version": "1.0.0",
    "title": "Loyalty Program Api ",
    "termsOfService": "http://swagger.io/terms/",
    "contact": {
      "email": "support@notifyvisitors.com"
    }
  },
  "tags": [
    {
      "name": "Loyalty"
    }
  ],
  "paths": {
    "/loyalty/v1/transaction": {
      "post": {
        "tags": [
          "Loyalty"
        ],
        "summary": "This API enables you to fetch data from InviteReferrals to your server regarding actions performed or transactions occurring in a user's loyalty program. It provides detailed insights into points and rewards activity, allowing you to track and manage user engagement effectively.",
        "operationId": "points_transaction",
        "parameters": [
          {
            "name": "x-brand-id",
            "in": "header",
            "description": "Brand id of InviteReferrals account",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "description": "Api key of InviteReferrals",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/transaction"
              }
            }
          },
          "description": "Body Parameter",
          "required": true
        },
        "responses": {
          "200": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_200_3"
                }
              }
            }
          },
          "400": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_400_1"
                }
              }
            }
          },
          "401": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_401"
                }
              }
            }
          },
          "403": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_403"
                }
              }
            }
          },
          "500": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_500"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://www.ref-r.com"
    }
  ],
  "components": {
    "schemas": {
      "transaction": {
        "type": "object",
        "properties": {
          "lp_type": {
            "type": "string",
            "format": "string",
            "description": "The data indicating whether the points are earned or redeemed, which needs to be fetched from the InviteReferrals.",
            "enum": [
              "all",
              "earn",
              "redeem",
              "ledger"
            ]
          },
          "lp_email/lp_mobile/lp_user_id": {
            "type": "string",
            "format": "string",
            "description": "Use lp_email for email as the primary identifier, lp_mobile for mobile, and lp_user_id for user ID."
          }
        }
      },
      "inline_response_401": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Authentication fail",
            "description": "Authentication fail"
          },
          "status_code": {
            "type": "number",
            "example": 401,
            "description": "401"
          }
        }
      },
      "inline_response_403": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Require Parameters Missing",
            "description": "Require Parameters Missing"
          },
          "status_code": {
            "type": "number",
            "example": 403,
            "description": "403"
          }
        }
      },
      "inline_response_500": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Request Fail",
            "description": "Request Fail"
          },
          "status_code": {
            "type": "number",
            "example": 500,
            "description": "500"
          }
        }
      },
      "inline_response_400_1": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Bad Request",
            "description": "Bad Request"
          },
          "status": {
            "type": "number",
            "example": 400,
            "description": "400"
          }
        }
      },
      "inline_response_200_3_records_platformInfo": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "lang": {
            "type": "string"
          }
        }
      },
      "inline_response_200_3_records": {
        "type": "object",
        "properties": {
          "userID": {
            "type": "number"
          },
          "profileData": {
            "type": "object",
            "properties": {}
          },
          "event": {
            "type": "object",
            "properties": {}
          },
          "platformInfo": {
            "$ref": "#/components/schemas/inline_response_200_3_records_platformInfo"
          }
        }
      },
      "inline_response_200_3": {
        "type": "object",
        "properties": {
          "status_code": {
            "type": "number",
            "example": 200,
            "description": "200"
          },
          "records": {
            "$ref": "#/components/schemas/inline_response_200_3_records"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 103,
      "1": 217,
      "2": 115,
      "3": 83,
      "4": 228,
      "5": 35,
      "6": 3,
      "7": 0,
      "8": 60,
      "9": 53,
      "10": 199,
      "11": 250
    }
  }
}
```