Content API
Create and manage news articles, announcements, and editorial content.
GET
/v1/contentList all content items. Results are paginated.
Query Parameters
pagelimitshopIdcontentTypeactiveResponse
{
"success": true,
"data": {
"items": [
{
"id": "uuid",
"contentType": "news",
"title": "Spring Collection Now Available",
"summary": "Our new spring collection has arrived...",
"body": "Full article content here...",
"imageUrl": "https://example.com/spring-collection.jpg",
"imageAlt": "Spring collection preview",
"linkUrl": "https://yourshop.com/spring",
"linkText": "Shop the collection",
"authorName": "Style Team",
"authorAvatarUrl": "https://example.com/avatar.jpg",
"isFeatured": false,
"isPinned": false,
"publishedAt": "2026-02-06T10:00:00Z",
"expiresAt": null,
"isActive": true,
"source": "api",
"createdAt": "2026-02-06T10:00:00Z",
"shop": {
"id": "uuid",
"slug": "your-shop",
"name": "Your Shop"
}
}
],
"total": 50,
"page": 1,
"limit": 20,
"totalPages": 3
}
}POST
/v1/contentCreate a new content item. Content can be associated with a shop or be general (mall-wide).
Request Body
contentTypetitlerequiredsummarybodyimageUrlimageAltlinkUrllinkTextauthorNameauthorAvatarUrlshopIdshopSlugpublishedAtexpiresAtisFeaturedisPinnedExample Request
curl -X POST https://api.thevirtualmall.co.uk/v1/content \
-H "Authorization: Bearer tvm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"contentType": "news",
"title": "Spring Collection Now Available",
"summary": "Our new spring collection has arrived with fresh styles",
"body": "We are excited to announce our spring collection...",
"imageUrl": "https://yourshop.com/images/spring-collection.jpg",
"imageAlt": "Spring 2026 Collection",
"linkUrl": "https://yourshop.com/spring",
"linkText": "Shop Now",
"shopSlug": "your-shop",
"publishedAt": "2026-03-01T00:00:00Z"
}'Response
{
"success": true,
"data": {
"id": "content_abc123",
"contentType": "news",
"title": "Spring Collection Now Available",
"status": "needs_review",
"shop": {
"id": "uuid",
"slug": "your-shop",
"name": "Your Shop"
},
"createdAt": "2026-02-06T10:30:00Z"
}
}GET
/v1/content/:idRetrieve a single content item by ID.
PUT
/v1/content/:idUpdate an existing content item. Only include fields you want to change. Updated content will require re-review before going live.
DELETE
/v1/content/:idDelete a content item. This action cannot be undone.
Content Types
newsGeneral news articles and updatesannouncementImportant announcements and noticesstore_openingNew store opening announcementseditorialEditorial content, guides, and how-tospromotionPromotional content highlighting dealsRequired Scopes
content:readRequired for GET endpointscontent:writeRequired for POST, PUT, DELETE endpoints