Skip to main content

Get Collections by Platform

This endpoint retrieves all collections associated with a specific platform.

Endpoint

GET /api/collection/:PlatformId

Authentication

No authentication required.

Path Parameters

ParameterTypeDescription
PlatformIdIntegerID of the platform to retrieve collections for

Query Parameters

ParameterTypeDescription
showHiddenStringSet to "true" to include hidden collections

Response

Success Response

  • Status Code: 200 OK
  • Content: Array of collection objects with their associated platform, content, and ad information
[
{
"id": 541,
"name": "Monthly Coaching Sessions",
"description": null,
"slug": "Monthly-Coaching-Sessions",
"collectionBGImage": null,
"position": 0,
"expireDate": null,
"publishedDate": null,
"collectionType": "default",
"sortPreference": "most recent first",
"createdAt": "2022-04-01T21:23:32.000Z",
"updatedAt": "2022-04-01T21:23:32.000Z",
"PlatformId": 36,
"UserId": 4816,
"Platform": {
"id": 36,
"name": "KingdomMessenger Tv",
"slug": "kmw",
"description": "Welcome to the Kingdom Messenger Workshop membership site."
// Additional platform properties...
},
"Contents": [
{
"id": 4473,
"title": "Roadmap Open Coaching - March 3, 2022",
"slug": "Roadmap-Open-Coaching-March-3-2022",
// Additional content properties...
"User": {
// User properties...
}
}
// Additional content items...
],
"Ads": [
// Ad objects if present
]
}
// Additional collections...
]

Error Response

  • Status Code: 500 Internal Server Error
  • Content: Error message
{
"error": "Something went wrong"
}

Notes

  • This endpoint returns potentially large amounts of data, especially for platforms with many collections and content items.
  • By default, content with visibility set to "hidden" is excluded unless the showHidden parameter is set to "true".
  • The response includes the full platform information (excluding sensitive credentials) and all content items within each collection.
  • Content items include the associated user information.

Example

curl -X GET "https://api.tribesocial.io/api/collection/36"