Complete JSON Samples - Posts System
1. Create Regular Post with Everything
{
"content": "Excited to share this collaboration with @alice! Check out our new collection 🔥 #fashion #newlaunch",
"postType": "REGULAR",
"media": [
{
"mediaType": "IMAGE",
"mediaUrl": "https://cdn.nexgate.com/uploads/original_img1.jpg",
"placeholderBase64": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAA...",
"width": 1920,
"height": 1080,
"imageTags": [
{
"tagType": "USER",
"userId": "alice-uuid",
"xPosition": 35.5,
"yPosition": 45.2
},
{
"tagType": "PRODUCT",
"productId": "product-uuid-1",
"xPosition": 65.0,
"yPosition": 70.5
},
{
"tagType": "SHOP",
"shopId": "shop-uuid-1",
"xPosition": 80.0,
"yPosition": 20.0
}
]
},
{
"mediaType": "VIDEO",
"mediaUrl": "https://cdn.nexgate.com/uploads/video1.mp4",
"placeholderBase64": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAA...",
"width": 1920,
"height": 1080
}
],
"attachments": {
"productIds": ["product-uuid-1", "product-uuid-2"],
"shopIds": ["shop-uuid-1"],
"buyTogetherGroupIds": ["group-uuid-1"],
"installmentPlanIds": ["plan-uuid-1"],
"eventIds": ["event-uuid-1"],
"externalLink": {
"url": "https://fashionmagazine.com/new-trends-2024"
}
},
"collaboration": {
"isCollaborative": true,
"collaboratorIds": ["alice-uuid", "bob-uuid"]
},
"privacySettings": {
"visibility": "PUBLIC",
"whoCanComment": "EVERYONE",
"whoCanRepost": "EVERYONE",
"hideLikesCount": false,
"hideCommentsCount": false
},
"status": "PUBLISHED",
"scheduledAt": null
}
2. Create Poll Post
{
"content": "Need your opinion! Which design looks better? 🤔",
"postType": "POLL",
"poll": {
"title": "Best sneaker design for summer?",
"description": "Help me choose which one to launch first. All feedback welcome!",
"options": [
{
"optionText": "Classic White",
"optionImageUrl": "https://cdn.nexgate.com/poll/white_sneaker.jpg"
},
{
"optionText": "Ocean Blue",
"optionImageUrl": "https://cdn.nexgate.com/poll/blue_sneaker.jpg"
},
{
"optionText": "Sunset Orange",
"optionImageUrl": "https://cdn.nexgate.com/poll/orange_sneaker.jpg"
},
{
"optionText": "Midnight Black"
}
],
"allowMultipleVotes": false,
"isAnonymous": false,
"expiresAt": "2024-12-10T23:59:59Z"
},
"attachments": {
"productIds": ["product-uuid-3", "product-uuid-4"],
"shopIds": ["shop-uuid-2"],
"buyTogetherGroupIds": [],
"installmentPlanIds": [],
"eventIds": [],
"externalLink": null
},
"collaboration": {
"isCollaborative": false,
"collaboratorIds": []
},
"privacySettings": {
"visibility": "PUBLIC",
"whoCanComment": "EVERYONE",
"whoCanRepost": "EVERYONE",
"hideLikesCount": false,
"hideCommentsCount": false
},
"status": "PUBLISHED",
"scheduledAt": null
}
3. Create Scheduled Post
{
"content": "🎉 Black Friday MEGA SALE starts NOW! Up to 70% off on selected items! #BlackFriday #Sale",
"postType": "REGULAR",
"media": [
{
"mediaType": "IMAGE",
"mediaUrl": "https://cdn.nexgate.com/uploads/black_friday_banner.jpg",
"placeholderBase64": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAA...",
"width": 1920,
"height": 1080,
"imageTags": []
}
],
"attachments": {
"productIds": ["product-uuid-5", "product-uuid-6", "product-uuid-7"],
"shopIds": ["shop-uuid-1"],
"buyTogetherGroupIds": ["group-uuid-2"],
"installmentPlanIds": ["plan-uuid-2"],
"eventIds": [],
"externalLink": null
},
"collaboration": {
"isCollaborative": false,
"collaboratorIds": []
},
"privacySettings": {
"visibility": "PUBLIC",
"whoCanComment": "EVERYONE",
"whoCanRepost": "EVERYONE",
"hideLikesCount": false,
"hideCommentsCount": false
},
"status": "SCHEDULED",
"scheduledAt": "2024-12-15T00:00:00Z"
}
4. Create Draft Post
{
"content": "Still working on this post... coming soon!",
"postType": "REGULAR",
"media": [],
"attachments": {
"productIds": [],
"shopIds": [],
"buyTogetherGroupIds": [],
"installmentPlanIds": [],
"eventIds": [],
"externalLink": null
},
"collaboration": {
"isCollaborative": false,
"collaboratorIds": []
},
"privacySettings": {
"visibility": "PUBLIC",
"whoCanComment": "EVERYONE",
"whoCanRepost": "EVERYONE",
"hideLikesCount": false,
"hideCommentsCount": false
},
"status": "DRAFT",
"scheduledAt": null
}
5. Create Followers-Only Post (Private)
{
"content": "Personal update for my followers only ðŸ’",
"postType": "REGULAR",
"media": [
{
"mediaType": "IMAGE",
"mediaUrl": "https://cdn.nexgate.com/uploads/personal_photo.jpg",
"placeholderBase64": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAA...",
"width": 1080,
"height": 1080,
"imageTags": []
}
],
"attachments": {
"productIds": [],
"shopIds": [],
"buyTogetherGroupIds": [],
"installmentPlanIds": [],
"eventIds": [],
"externalLink": null
},
"collaboration": {
"isCollaborative": false,
"collaboratorIds": []
},
"privacySettings": {
"visibility": "FOLLOWERS",
"whoCanComment": "FOLLOWERS",
"whoCanRepost": "DISABLED",
"hideLikesCount": true,
"hideCommentsCount": false
},
"status": "PUBLISHED",
"scheduledAt": null
}
6. Regular Post Response (Full Detail)
{
"id": "post-uuid-123",
"author": {
"id": "author-uuid",
"userName": "john_fashion",
"firstName": "John",
"lastName": "Doe",
"profilePictureUrls": ["https://cdn.nexgate.com/profiles/john.jpg"],
"isVerified": true
},
"content": "Excited to share this collaboration with @alice! Check out our new collection 🔥 #fashion #newlaunch",
"contentParsed": {
"text": "Excited to share this collaboration with @alice! Check out our new collection 🔥 #fashion #newlaunch",
"entities": [
{
"type": "MENTION",
"text": "@alice",
"startIndex": 40,
"endIndex": 46,
"user": {
"id": "alice-uuid",
"userName": "alice",
"firstName": "Alice",
"lastName": "Wonder"
}
},
{
"type": "HASHTAG",
"text": "#fashion",
"startIndex": 82,
"endIndex": 90,
"hashtag": "fashion"
},
{
"type": "HASHTAG",
"text": "#newlaunch",
"startIndex": 91,
"endIndex": 101,
"hashtag": "newlaunch"
}
]
},
"postType": "REGULAR",
"media": [
{
"id": "media-uuid-1",
"mediaType": "IMAGE",
"originalUrl": "https://cdn.nexgate.com/uploads/original_img1.jpg",
"variants": {
"thumbnail": "https://cdn.nexgate.com/uploads/thumb_300_img1.jpg",
"small": null,
"medium": null,
"large": null
},
"placeholderBase64": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAA...",
"width": 1920,
"height": 1080,
"order": 1,
"imageTags": [
{
"id": "tag-uuid-1",
"tagType": "USER",
"xPosition": 35.5,
"yPosition": 45.2,
"user": {
"id": "alice-uuid",
"userName": "alice",
"firstName": "Alice",
"lastName": "Wonder",
"profilePictureUrls": ["https://cdn.nexgate.com/profiles/alice.jpg"]
}
},
{
"id": "tag-uuid-2",
"tagType": "PRODUCT",
"xPosition": 65.0,
"yPosition": 70.5,
"product": {
"id": "product-uuid-1",
"name": "Designer Handbag",
"imageUrl": "https://cdn.nexgate.com/products/handbag.jpg",
"price": 299.99
}
},
{
"id": "tag-uuid-3",
"tagType": "SHOP",
"xPosition": 80.0,
"yPosition": 20.0,
"shop": {
"id": "shop-uuid-1",
"name": "Fashion Hub",
"logoUrl": "https://cdn.nexgate.com/shops/fashion_hub_logo.jpg"
}
}
]
},
{
"id": "media-uuid-2",
"mediaType": "VIDEO",
"originalUrl": "https://cdn.nexgate.com/uploads/video1.mp4",
"variants": {
"thumbnail": "https://cdn.nexgate.com/uploads/video1_thumb.jpg",
"small": null,
"medium": null,
"large": null
},
"placeholderBase64": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAA...",
"width": 1920,
"height": 1080,
"duration": 30,
"order": 2,
"imageTags": []
}
],
"attachments": {
"products": [
{
"id": "product-uuid-1",
"name": "Designer Handbag",
"price": 299.99,
"discountPrice": 249.99,
"imageUrl": "https://cdn.nexgate.com/products/handbag.jpg",
"shopName": "Fashion Hub",
"shopId": "shop-uuid-1",
"inStock": true,
"socialContext": {
"friendsCount": 7,
"friends": [
{
"id": "friend-uuid-1",
"userName": "sarah_m",
"profilePictureUrl": "https://cdn.nexgate.com/profiles/sarah.jpg"
},
{
"id": "friend-uuid-2",
"userName": "mike_t",
"profilePictureUrl": "https://cdn.nexgate.com/profiles/mike.jpg"
},
{
"id": "friend-uuid-3",
"userName": "emma_l",
"profilePictureUrl": "https://cdn.nexgate.com/profiles/emma.jpg"
}
],
"message": "sarah_m, mike_t, emma_l and 4 others bought this"
}
},
{
"id": "product-uuid-2",
"name": "Leather Wallet",
"price": 79.99,
"discountPrice": null,
"imageUrl": "https://cdn.nexgate.com/products/wallet.jpg",
"shopName": "Fashion Hub",
"shopId": "shop-uuid-1",
"inStock": true,
"socialContext": null
}
],
"shops": [
{
"id": "shop-uuid-1",
"name": "Fashion Hub",
"logoUrl": "https://cdn.nexgate.com/shops/fashion_hub_logo.jpg",
"description": "Premium fashion accessories",
"rating": 4.8,
"totalProducts": 156,
"isVerified": true
}
],
"buyTogetherGroups": [
{
"id": "group-uuid-1",
"productName": "Designer Handbag Bundle",
"productImageUrl": "https://cdn.nexgate.com/products/bundle.jpg",
"currentCount": 3,
"totalSlots": 5,
"originalPrice": 299.99,
"discountPrice": 249.99,
"savingsAmount": 50.00,
"savingsPercentage": 16.67,
"expiresAt": "2024-12-08T23:59:59Z",
"status": "OPEN",
"socialContext": {
"friendsCount": 2,
"friends": [
{
"id": "friend-uuid-4",
"userName": "lisa_k",
"profilePictureUrl": "https://cdn.nexgate.com/profiles/lisa.jpg"
}
],
"message": "lisa_k and 1 other are in this group"
}
}
],
"installmentPlans": [
{
"id": "plan-uuid-1",
"productId": "product-uuid-1",
"productName": "Designer Handbag",
"productImageUrl": "https://cdn.nexgate.com/products/handbag.jpg",
"monthlyAmount": 62.50,
"duration": 4,
"totalAmount": 250.00,
"interestRate": 0.0,
"downPayment": 0.00,
"isInterestFree": true
}
],
"events": [
{
"id": "event-uuid-1",
"title": "Fashion Week 2024",
"description": "Annual fashion showcase event",
"imageUrl": "https://cdn.nexgate.com/events/fashion_week.jpg",
"date": "2024-12-20T18:00:00Z",
"endDate": "2024-12-22T22:00:00Z",
"location": "New York Convention Center",
"address": "123 Fashion Ave, NYC",
"ticketPrice": 150.00,
"ticketsAvailable": true,
"attendeesCount": 450,
"maxAttendees": 500,
"socialContext": {
"friendsCount": 12,
"friends": [
{
"id": "friend-uuid-5",
"userName": "james_w",
"profilePictureUrl": "https://cdn.nexgate.com/profiles/james.jpg"
},
{
"id": "friend-uuid-6",
"userName": "olivia_p",
"profilePictureUrl": "https://cdn.nexgate.com/profiles/olivia.jpg"
}
],
"message": "james_w, olivia_p and 10 others are attending"
}
}
],
"externalLink": {
"id": "link-uuid-1",
"originalUrl": "https://fashionmagazine.com/new-trends-2024",
"shortUrl": "https://nexgate.link/fM9k2X",
"shortCode": "fM9k2X",
"preview": {
"title": "Top Fashion Trends 2024 - Fashion Magazine",
"description": "Discover the hottest fashion trends that will dominate 2024. From sustainable fashion to bold colors...",
"imageUrl": "https://fashionmagazine.com/og-trends-2024.jpg",
"domain": "fashionmagazine.com",
"favicon": "https://fashionmagazine.com/favicon.ico"
},
"status": "VALIDATED",
"isValidated": true,
"isSafe": true,
"clickCount": 127,
"createdAt": "2024-12-03T10:00:00Z"
}
},
"collaboration": {
"isCollaborative": true,
"collaborators": [
{
"id": "collab-uuid-1",
"user": {
"id": "alice-uuid",
"userName": "alice",
"firstName": "Alice",
"lastName": "Wonder",
"profilePictureUrls": ["https://cdn.nexgate.com/profiles/alice.jpg"],
"isVerified": true
},
"status": "ACCEPTED",
"invitedAt": "2024-12-03T10:00:00Z",
"respondedAt": "2024-12-03T10:05:00Z"
},
{
"id": "collab-uuid-2",
"user": {
"id": "bob-uuid",
"userName": "bob_creative",
"firstName": "Bob",
"lastName": "Smith",
"profilePictureUrls": ["https://cdn.nexgate.com/profiles/bob.jpg"],
"isVerified": false
},
"status": "PENDING",
"invitedAt": "2024-12-03T10:00:00Z",
"respondedAt": null
}
],
"byline": "By john_fashion and alice"
},
"privacySettings": {
"visibility": "PUBLIC",
"whoCanComment": "EVERYONE",
"whoCanRepost": "EVERYONE",
"hideLikesCount": false,
"hideCommentsCount": false
},
"engagement": {
"likesCount": 1542,
"commentsCount": 89,
"repostsCount": 45,
"quotesCount": 12,
"bookmarksCount": 234,
"sharesCount": 67,
"viewsCount": 15340,
"canLike": true,
"canComment": true,
"canRepost": true,
"canShare": true
},
"userInteraction": {
"hasLiked": false,
"hasBookmarked": true,
"hasReposted": false,
"hasCommented": false
},
"status": "PUBLISHED",
"createdAt": "2024-12-03T10:00:00Z",
"publishedAt": "2024-12-03T10:00:00Z",
"scheduledAt": null,
"updatedAt": "2024-12-03T10:30:00Z"
}
7. Poll Post Response (Full Detail)
{
"id": "post-uuid-456",
"author": {
"id": "author-uuid-2",
"userName": "sneaker_king",
"firstName": "Mike",
"lastName": "Jordan",
"profilePictureUrls": ["https://cdn.nexgate.com/profiles/mike.jpg"],
"isVerified": true
},
"content": "Need your opinion! Which design looks better? 🤔",
"contentParsed": {
"text": "Need your opinion! Which design looks better? 🤔",
"entities": []
},
"postType": "POLL",
"media": [],
"poll": {
"id": "poll-uuid-1",
"title": "Best sneaker design for summer?",
"description": "Help me choose which one to launch first. All feedback welcome!",
"options": [
{
"id": "option-uuid-1",
"optionText": "Classic White",
"optionImageUrl": "https://cdn.nexgate.com/poll/white_sneaker.jpg",
"optionOrder": 1,
"votesCount": 340,
"percentage": 45.3,
"hasVoted": true
},
{
"id": "option-uuid-2",
"optionText": "Ocean Blue",
"optionImageUrl": "https://cdn.nexgate.com/poll/blue_sneaker.jpg",
"optionOrder": 2,
"votesCount": 285,
"percentage": 38.0,
"hasVoted": false
},
{
"id": "option-uuid-3",
"optionText": "Sunset Orange",
"optionImageUrl": "https://cdn.nexgate.com/poll/orange_sneaker.jpg",
"optionOrder": 3,
"votesCount": 95,
"percentage": 12.7,
"hasVoted": false
},
{
"id": "option-uuid-4",
"optionText": "Midnight Black",
"optionImageUrl": null,
"optionOrder": 4,
"votesCount": 30,
"percentage": 4.0,
"hasVoted": false
}
],
"totalVotes": 750,
"allowMultipleVotes": false,
"isAnonymous": false,
"expiresAt": "2024-12-10T23:59:59Z",
"hasExpired": false,
"userHasVoted": true,
"userVotedOptions": ["option-uuid-1"],
"createdAt": "2024-12-03T09:00:00Z"
},
"attachments": {
"products": [
{
"id": "product-uuid-3",
"name": "Classic White Sneaker",
"price": 129.99,
"discountPrice": 99.99,
"imageUrl": "https://cdn.nexgate.com/products/white_sneaker.jpg",
"shopName": "Sneaker Paradise",
"shopId": "shop-uuid-2",
"inStock": true,
"socialContext": {
"friendsCount": 15,
"friends": [
{
"id": "friend-uuid-7",
"userName": "tom_r",
"profilePictureUrl": "https://cdn.nexgate.com/profiles/tom.jpg"
}
],
"message": "tom_r and 14 others bought this"
}
},
{
"id": "product-uuid-4",
"name": "Ocean Blue Sneaker",
"price": 129.99,
"discountPrice": null,
"imageUrl": "https://cdn.nexgate.com/products/blue_sneaker.jpg",
"shopName": "Sneaker Paradise",
"shopId": "shop-uuid-2",
"inStock": true,
"socialContext": null
}
],
"shops": [
{
"id": "shop-uuid-2",
"name": "Sneaker Paradise",
"logoUrl": "https://cdn.nexgate.com/shops/sneaker_logo.jpg",
"description": "Premium sneakers for everyone",
"rating": 4.9,
"totalProducts": 423,
"isVerified": true
}
],
"buyTogetherGroups": [],
"installmentPlans": [],
"events": [],
"externalLink": null
},
"collaboration": {
"isCollaborative": false,
"collaborators": [],
"byline": "By sneaker_king"
},
"privacySettings": {
"visibility": "PUBLIC",
"whoCanComment": "EVERYONE",
"whoCanRepost": "EVERYONE",
"hideLikesCount": false,
"hideCommentsCount": false
},
"engagement": {
"likesCount": 892,
"commentsCount": 156,
"repostsCount": 34,
"quotesCount": 8,
"bookmarksCount": 145,
"sharesCount": 23,
"viewsCount": 8920,
"canLike": true,
"canComment": true,
"canRepost": true,
"canShare": true
},
"userInteraction": {
"hasLiked": true,
"hasBookmarked": false,
"hasReposted": false,
"hasCommented": true
},
"status": "PUBLISHED",
"createdAt": "2024-12-03T09:00:00Z",
"publishedAt": "2024-12-03T09:00:00Z",
"scheduledAt": null,
"updatedAt": "2024-12-03T09:15:00Z"
}
8. Vote on Poll Request
{
"optionIds": ["option-uuid-1"]
}
Response:
{
"success": true,
"message": "Vote recorded successfully",
"poll": {
"id": "poll-uuid-1",
"userHasVoted": true,
"userVotedOptions": ["option-uuid-1"],
"options": [
{
"id": "option-uuid-1",
"votesCount": 341,
"percentage": 45.4,
"hasVoted": true
}
],
"totalVotes": 751
}
}
9. Update Post Request
{
"content": "UPDATED: Excited to share this collaboration! New details added 🔥",
"privacySettings": {
"whoCanComment": "FOLLOWERS"
}
}
10. Reschedule Post Request
{
"scheduledAt": "2024-12-20T09:00:00Z"
}
All JSON samples complete! Ready to build entities? 🚀
No comments to display
No comments to display