Skip to content

feat: add Cart API endpoints#168

Open
Amoifr wants to merge 1 commit intoPrestaShop:devfrom
Amoifr:feat/cart-api-endpoints
Open

feat: add Cart API endpoints#168
Amoifr wants to merge 1 commit intoPrestaShop:devfrom
Amoifr:feat/cart-api-endpoints

Conversation

@Amoifr
Copy link
Copy Markdown

@Amoifr Amoifr commented Mar 30, 2026

Summary

Add Cart management API endpoints (~18 endpoints).

New endpoints:

  • GET/POST/DELETE /carts - CRUD operations
  • GET/POST/PUT/DELETE /carts/{cartId}/products - Manage products in cart
  • POST/DELETE /carts/{cartId}/cart-rules - Manage cart rules
  • GET /carts/{cartId}/customizations - Get cart customizations
  • PATCH /carts/{cartId}/carrier - Update cart carrier
  • PATCH /carts/{cartId}/currency - Update cart currency
  • PATCH /carts/{cartId}/language - Update cart language
  • GET /carts/{cartId}/order-creations - Get cart info for order creation
  • GET /customers/{customerId}/last-empty-carts - Get last empty cart for customer
  • DELETE /carts/bulk - Bulk delete carts

Key features:

  • Follows existing CQRS patterns
  • Proper API scopes for authorization
  • Consistent with existing API conventions

Test plan

  • Run existing test suite
  • Verify endpoints are properly registered in API Platform
  • Test CRUD operations

Related

Contributes to #39630
Split from #166 as requested by reviewers

Add Cart management endpoints:
- Cart CRUD operations
- CartProduct: add/update/remove products from cart
- CartCartRule: manage cart rules
- CartCustomization: manage customizations
- CartSettings: update carrier, currency, language
- CartForOrderCreation: get cart info for order creation
- CustomerLastEmptyCart: get last empty cart for customer
- BulkCarts: bulk delete carts
@ps-jarvis
Copy link
Copy Markdown

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

2 participants