Skip to main content

Content

The content API exposes merchant-defined content models. See Content Models and Using the Content API for full implementation guidance.


List entries (or get singleton)

GET /access/api/v1/content/:modelSlug

If the model is a collection, returns paginated entries with fields flattened onto each item:

{
"status": "success",
"data": {
"currentPage": 1,
"totalPages": 2,
"totalDocuments": 8,
"limit": 20,
"data": [
{
"_id": "69e79abd788c032f28310446",
"updatedAt": "2024-06-01T00:00:00Z",
"question": "What is your return policy?",
"answer": "30 days, no questions asked."
}
]
}
}

If the model is a singleton, returns the single record with fields flattened directly onto data:

{
"status": "success",
"data": {
"_id": "69e79abd788c032f28310446",
"updatedAt": "2024-06-01T00:00:00Z",
"headline": "Summer Sale",
"image": "https://..."
}
}

data is null if no published entry exists.

Query parameters (collection only):

ParameterDefaultMax
page1
limit2050

Possible errors: CONTENT_MODEL_NOT_FOUND


Get single entry

GET /access/api/v1/content/:modelSlug/:entryId

Returns a single entry with its fields spread directly onto the response object:

{
"status": "success",
"data": {
"_id": "69e79abd788c032f28310446",
"updatedAt": "2024-06-01T00:00:00Z",
"headline": "Summer Sale",
"image": "https://...",
"ctaText": "Shop Now"
}
}

Possible errors: CONTENT_MODEL_NOT_FOUND, CONTENT_ENTRY_NOT_FOUND