feat: add Admin API endpoints for CmsPage#165
Open
axel-paillaud wants to merge 8 commits into
Open
Conversation
This was referenced Mar 30, 2026
|
Hello @axel-paillaud! This is your first pull request on ps_apiresources repository of the PrestaShop project. Thank you, and welcome to this Open Source community! |
Author
|
Everything has been tested end-to-end (Bruno API client) and with PHP Unit unit tests |
boherm
approved these changes
Apr 21, 2026
Contributor
|
@axel-paillaud the CI is red, could you have a look please? |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description — Add Admin API endpoints for CmsPage
POST /api/cms-pages?shopId=1with a valid Bearer token and body (see below). Expect201with the created entity. Then callGET /api/cms-pages/{cmsPageId}and expect200with the full entity.Dependencies
This PR requires the following core fixes to be merged first:
GetCmsPageForEditingHandler#41128AbstractObjectModelHandler::associateWithShops()#41130Sample POST body
{ "cmsPageCategoryId": 1, "titles": { "en-US": "My CMS Page", "fr-FR": "Ma page CMS" }, "metaTitles": { "en-US": "Meta title", "fr-FR": "Meta titre" }, "metaDescriptions": { "en-US": "Meta description", "fr-FR": "Meta description" }, "friendlyUrls": { "en-US": "my-cms-page", "fr-FR": "ma-page-cms" }, "contents": { "en-US": "<p>Content</p>", "fr-FR": "<p>Contenu</p>" }, "indexedForSearch": true, "enabled": true, "shopIds": [1] }Endpoints added
POST/cms-pagescms_page_writeGET/cms-pages/{cmsPageId}cms_page_readPATCH/cms-pages/{cmsPageId}cms_page_writePUT/cms-pages/{cmsPageId}/toggle-statuscms_page_writeDELETE/cms-pages/{cmsPageId}cms_page_writeDELETE/cms-pages/bulk-deletecms_page_writePUT/cms-pages/bulk-enablecms_page_writePUT/cms-pages/bulk-disablecms_page_write