GET
/
api
/
loyalty
/
posts
Get social posts
curl --request GET \
  --url https://admin.snagsolutions.io/api/loyalty/posts
{
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "text": "<string>",
      "mediaUrl": "<string>",
      "mediaType": "image",
      "platform": "twitter",
      "postType": "post",
      "externalIdentifier": "<string>",
      "parentPostId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "likeCount": 123,
      "commentCount": 123,
      "repostCount": 123,
      "viewCount": 123,
      "manualRank": 123,
      "dynamicScore": 123,
      "rank": 123,
      "latestReward": 123,
      "loyaltyCurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "loyaltyRuleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "contentQualityScore": 123,
      "postedAt": "2023-11-07T05:31:56Z",
      "isSeen": true,
      "authorId": "<string>",
      "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "userMetadata": {
        "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "logoUrl": "<string>",
        "twitterUser": "<string>",
        "twitterUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "twitterUserFollowersCount": 123,
        "twitterVerifiedAccount": true
      }
    }
  ],
  "hasNextPage": true
}

Query Parameters

websiteId
string<uuid>

UUID of the website to fetch social posts for

Example:

"123e4567-e89b-12d3-a456-426614174000"

organizationId
string<uuid>

UUID of the organization to fetch social posts for

Example:

"123e4567-e89b-12d3-a456-426614174001"

cursor
string

Cursor for pagination

Example:

"123e4567-e89b-12d3-a456-426614174003"

limit
integer
default:20

Number of posts to fetch per page

Required range: 1 <= x <= 100
Example:

10

sortBy
enum<string>
default:rank

Sort posts by createdAt or rank

Available options:
rank,
createdAt
Example:

"rank"

Response

200
application/json

200

Response containing social posts with pagination info