Skip to content

Content Library & Folders

The content library is the creator-facing backend/API surface for browsing and organizing products after upload.

Current backend capabilities

The live backend currently supports:

  • paginated product fetching
  • sorting
  • folder-based filtering
  • an explicit unassigned-products filter
  • folder CRUD
  • per-product folder assignment
  • collection toggling

Product list behavior

The primary content-library endpoint is:

  • GET /api/products

Supported query parameters confirmed in the live backend:

  • page
  • limit
  • sort_by
  • folder_id
  • folder_state=unassigned
  • legacy filterFolder

The current response includes:

  • pages_total
  • collection_link
  • data

Important note:

The current live backend does not expose separate top-level fields such as totalCount, allItemsCount, or folderCounts on this endpoint. Client code should not assume those fields exist unless the backend adds them in a future release.

Sorting

Sort options are exposed through app bootstrap data and product-index handling. The client should prefer backend-supported sort keys instead of inventing new ones.

Folder lifecycle

Create

  • POST /api/content-folders

Rename

  • PATCH /api/content-folders/{contentFolder}

Delete

  • DELETE /api/content-folders/{contentFolder}

Deleting a folder does not delete products. It removes the folder assignment from those products.

Assigning and removing folder membership

Use:

  • PATCH /api/products/{product}/folder

Examples:

Assign to folder 12:

json
{
  "folder_id": 12
}

Remove folder assignment:

json
{
  "folder_id": null
}

The product resource includes both:

  • folder_id
  • folder

so the client can render current folder state without a second lookup.

Unassigned filter

To fetch products without a folder, use:

http
GET /api/products?folder_state=unassigned

This is the preferred explicit backend filter.

Collection behavior

Collection membership is separate from folders.

Use:

  • POST /api/products/{product}/collection

The backend toggles collection membership and creates the collection / short link if needed.

Folders and collections serve different purposes:

  • folders organize the creator library
  • collections affect grouped creator-side / link-side behavior

Search expectations

The current backend contract for the content-library product list does not expose a dedicated full-library search parameter in the same way the creator-search endpoint does. Search UX on the web app should only document parameters that are confirmed in the backend implementation.

If search is added or expanded later, it should be documented as a new contract rather than assumed from UI behavior alone.

Example flow

  1. GET /api/content-folders
  2. GET /api/products?page=1&limit=18
  3. PATCH /api/products/{product}/folder
  4. GET /api/products?folder_id=12
  5. GET /api/products?folder_state=unassigned

Fangate backend developer documentation