feat: add ~170 new API endpoints for multiple domains#166
feat: add ~170 new API endpoints for multiple domains#166Amoifr wants to merge 53 commits intoPrestaShop:mainfrom
Conversation
Bumps [symfony/process](https://github.com/symfony/process) from 6.3.4 to 6.4.15. - [Release notes](https://github.com/symfony/process/releases) - [Changelog](https://github.com/symfony/process/blob/7.1/CHANGELOG.md) - [Commits](symfony/process@v6.3.4...v6.4.15) --- updated-dependencies: - dependency-name: symfony/process dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
… whole matrix is used when merging towards main
Add dynamic PHP matrix generation
…Resources allowed types are restricted to scalar inputs, and a closed list of exceptions
… ApiResources mapping to keep a consistency, test logic is also improved on addresses because it did not check the relevant data
…o-project GitHub add issue to project workflow
…ions Add new CI restrictions
Make validTo nullable
add get country single /countries/{countryId}
Fix searchalias endpoints
…oint-creation Add claude skill to generate endpoints
…symfony/process-6.4.15 Bump symfony/process from 6.3.4 to 6.4.15
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.5.38 to 10.5.62. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/10.5.62/ChangeLog-10.5.md) - [Commits](sebastianbergmann/phpunit@10.5.38...10.5.62) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-version: 10.5.62 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [symfony/process](https://github.com/symfony/process) from 6.4.15 to 6.4.33. - [Release notes](https://github.com/symfony/process/releases) - [Changelog](https://github.com/symfony/process/blob/8.1/CHANGELOG.md) - [Commits](symfony/process@v6.4.15...v6.4.33) --- updated-dependencies: - dependency-name: symfony/process dependency-version: 6.4.33 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…/phpunit/phpunit-10.5.62 Bump phpunit/phpunit from 10.5.38 to 10.5.62
…/symfony/process-6.4.33 Bump symfony/process from 6.4.15 to 6.4.33
Expose the GetCategoryIsEnabled query to retrieve the enabled/disabled status of a category via the Admin API.
Add complete Cart domain with 18 endpoints:
- GET/POST/DELETE /carts - main cart operations
- POST/DELETE /carts/{cartId}/products - add/remove products
- PUT /carts/{cartId}/products/quantity - update quantity
- PUT /carts/{cartId}/products/{productId}/price - update price
- POST /carts/{cartId}/customizations - add customizations
- POST/DELETE /carts/{cartId}/cart-rules - manage cart rules
- PUT /carts/{cartId}/addresses - update addresses
- PUT /carts/{cartId}/carrier - update carrier
- PUT /carts/{cartId}/currency - update currency
- PUT /carts/{cartId}/language - update language
- PUT /carts/{cartId}/delivery-settings - update delivery
- DELETE /carts/bulk-delete - bulk delete carts
- GET /carts/{cartId}/order-creation - get cart for order
- GET /customers/{customerId}/last-empty-cart - get last empty cart
Add complete Order domain with 20 endpoints:
- GET /orders/{orderId} - get order for viewing
- GET /orders/{orderId}/preview - get order preview
- GET /orders/{orderId}/products - get order products
- POST /orders - create order from back office
- PUT /orders/{orderId}/status - update order status
- PUT /orders/bulk-update-status - bulk update status
- PUT /orders/{orderId}/delivery-address - change delivery address
- PUT /orders/{orderId}/invoice-address - change invoice address
- PUT /orders/{orderId}/shipping - update shipping details
- PUT /orders/{orderId}/currency - change currency
- PUT /orders/{orderId}/note - set internal note
- POST /orders/{orderId}/cart-rules - add cart rule
- DELETE /orders/{orderId}/cart-rules/{id} - delete cart rule
- POST /orders/{orderId}/resend-email - resend order email
- POST /carts/{cartId}/send-process-order-email - send process email
- POST /orders/{orderId}/duplicate-cart - duplicate cart
- POST /orders/{orderId}/refund/standard - standard refund
- POST /orders/{orderId}/refund/partial - partial refund
- POST /orders/{orderId}/refund/return - return product
- POST /orders/{orderId}/cancel-products - cancel products
SearchEngine (5 endpoints): - GET/POST/PATCH/DELETE /search-engines - DELETE /search-engines/bulk-delete Tag (5 endpoints): - GET/POST/PATCH/DELETE /tags - DELETE /tags/bulk-delete
Add 4 new Customer endpoints:
- PUT /customers/{customerId}/note - set private note
- POST /customers/{customerId}/transform-guest - convert guest to customer
- GET /customers/{customerId}/orders - get customer orders
- GET /customers/{customerId}/carts - get customer carts
Add 24 new Product endpoints:
- DELETE/PUT /products/bulk-delete, bulk-update-status
- POST /products/{id}/duplicate - duplicate product
- PUT/DELETE /products/{id}/categories - manage categories
- GET/POST/PATCH/DELETE /specific-prices - specific price CRUD
- PUT /products/{id}/stock - update stock
- PUT/DELETE /products/{id}/related-products - manage related
- PUT/DELETE /products/{id}/tags - manage tags
- PUT /products/{id}/carriers - set carriers
- PATCH/DELETE /combinations/{id} - update/delete combination
- DELETE /combinations/bulk-delete - bulk delete combinations
- POST /products/{id}/virtual-product-file - add virtual file
- PUT/DELETE /virtual-product-files/{id} - manage virtual files
- PUT/DELETE /products/{id}/features - manage features
|
Hello @Amoifr! This is your first pull request on ps_apiresources repository of the PrestaShop project. Thank you, and welcome to this Open Source community! |
|
Hello @Amoifr, In my opinion, you should divide this into several pull requests to make it easier for the maintainers to test. Also, you clearly haven't tested the endpoints yourself. For example, GET cms-pages needs a fix in the core to work (draft); otherwise, you get a crash and a 500 error with your suggestion. Btw, I specifically mentioned supporting CmsPage here :) Finally, I think you might be comparing the wrong GitHub branch, because we can all see the Git history which doesn't correspond to your commits. |
|
Hey @axel-paillaud! 👋 Thanks a lot for the thorough review and helpful feedback! You were absolutely right about splitting this massive PR - it was definitely too much to digest in one go. I've now split both PRs (#166 and #167) into smaller, domain-focused PRs: From #166 (~170 endpoints):
From #167 (~40 endpoints):
I've also:
I'll close this PR and #167 now. Feel free to review the smaller ones at your own pace! Thanks again for your vigilance - it made the contribution much better! 🙏 |
Summary
This PR adds approximately 170 new API endpoints across multiple domains to help close the gap identified in issue #39630.
Domains implemented:
Key features:
Test plan
🤖 Generated with Claude Code