Skip to content

Add batch 2 API endpoints (~40 new endpoints)#167

Closed
Amoifr wants to merge 20 commits intoPrestaShop:devfrom
Amoifr:feat/api-endpoints-batch2
Closed

Add batch 2 API endpoints (~40 new endpoints)#167
Amoifr wants to merge 20 commits intoPrestaShop:devfrom
Amoifr:feat/api-endpoints-batch2

Conversation

@Amoifr
Copy link
Copy Markdown

@Amoifr Amoifr commented Mar 30, 2026

Summary

This PR adds approximately 40 new API endpoints covering various domains that were identified as uncovered in issue #39630.

New endpoints by domain:

Product Pack (ProductPack.php)

  • GET /products/{productId}/pack - Get packed products
  • PUT /products/{productId}/pack - Set pack products
  • DELETE /products/{productId}/pack - Remove all products from pack

Product Suppliers (ProductSuppliers.php, ProductDefaultSupplier.php)

  • GET /products/{productId}/suppliers - Get associated suppliers
  • GET /products/{productId}/supplier-options - Get supplier options
  • PUT /products/{productId}/suppliers - Set suppliers
  • PATCH /products/{productId}/suppliers - Update supplier details
  • DELETE /products/{productId}/suppliers - Remove all suppliers
  • PUT /products/{productId}/default-supplier - Set default supplier

Product Attachments (ProductAttachments.php)

  • PUT /products/{productId}/attachments - Set product attachments
  • DELETE /products/{productId}/attachments - Remove all attachments

Product Customizations (ProductCustomizations.php)

  • GET /products/{productId}/customization-fields - Get customization fields
  • PUT /products/{productId}/customization-fields - Set customization fields
  • DELETE /products/{productId}/customization-fields - Remove all fields

Product Queries (ProductQueries.php)

  • GET /products/{productId}/attribute-groups
  • GET /products/{productId}/feature-values
  • GET /products/{productId}/is-enabled
  • GET /products/{productId}/stock-movements
  • GET /products/{productId}/shop-images
  • GET /products/{productId}/related-products
  • GET /products/{productId}/catalog-price-rules

Order Products (OrderProducts.php)

  • PUT /orders/{orderId}/products/{orderDetailId} - Update product in order
  • DELETE /orders/{orderId}/products/{orderDetailId} - Delete product from order

Order Return (OrderReturn.php)

  • GET /order-returns/{orderReturnId} - Get order return
  • PATCH /order-returns/{orderReturnId}/state - Update return state

Category (CategoryQueries.php)

  • GET /categories/tree - Get full category tree
  • PATCH /categories/{categoryId}/position - Update category position

Carrier (CarrierSettings.php)

  • PUT /carriers/{carrierId}/ranges - Set delivery ranges
  • PUT /carriers/{carrierId}/tax-rule-group - Set tax rule group

Currency (CurrencyQueries.php)

  • GET /currencies/exchange-rate/{isoCode} - Get exchange rate
  • GET /currencies/reference/{isoCode} - Get reference currency data

Country (Country.php)

  • GET /countries/{countryId}/required-fields - Get required fields
  • PATCH /countries/{countryId} - Edit country configuration

ImageSettings (ImageSettings.php)

  • GET /image-settings - Get current settings
  • PUT /image-settings - Edit settings

Shop (ShopLogos.php)

  • GET /shop/logos - Get header, email, invoice and favicon logos

Test plan

  • Run existing test suite
  • Test new endpoints via API requests
  • Verify OpenAPI documentation is correct

Related

Contributes to #39630

@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!

Amoifr added 13 commits March 30, 2026 09:29
Add API endpoints for managing product packs:
- GET /products/{productId}/pack - Get packed products
- PUT /products/{productId}/pack - Set pack products
- DELETE /products/{productId}/pack - Remove all products from pack
Add API endpoints for managing product suppliers:
- GET /products/{productId}/suppliers - Get associated suppliers
- GET /products/{productId}/supplier-options - Get supplier options
- PUT /products/{productId}/suppliers - Set suppliers
- PATCH /products/{productId}/suppliers - Update supplier details
- DELETE /products/{productId}/suppliers - Remove all suppliers
- PUT /products/{productId}/default-supplier - Set default supplier
Add API endpoints for managing product attachments:
- PUT /products/{productId}/attachments - Set product attachments
- DELETE /products/{productId}/attachments - Remove all attachments
Add API endpoints for managing product customization fields:
- GET /products/{productId}/customization-fields - Get customization fields
- PUT /products/{productId}/customization-fields - Set customization fields
- DELETE /products/{productId}/customization-fields - Remove all fields
Add various product read-only query endpoints:
- GET /products/{productId}/attribute-groups
- GET /products/{productId}/feature-values
- GET /products/{productId}/is-enabled
- GET /products/{productId}/stock-movements
- GET /products/{productId}/shop-images
- GET /products/{productId}/related-products
- GET /products/{productId}/catalog-price-rules
Add API endpoints for managing products in orders:
- PUT /orders/{orderId}/products/{orderDetailId} - Update product
- DELETE /orders/{orderId}/products/{orderDetailId} - Delete product

Note: AddProductToOrderCommand uses static factory methods
and requires a custom processor for proper API integration.
Add API endpoints for managing order returns:
- GET /order-returns/{orderReturnId} - Get order return
- PATCH /order-returns/{orderReturnId}/state - Update return state
Add API endpoints for advanced category operations:
- GET /categories/tree - Get full category tree
- PATCH /categories/{categoryId}/position - Update category position
Add API endpoints for carrier configuration:
- PUT /carriers/{carrierId}/ranges - Set delivery ranges
- PUT /carriers/{carrierId}/tax-rule-group - Set tax rule group
Add API endpoints for currency queries:
- GET /currencies/exchange-rate/{isoCode} - Get exchange rate
- GET /currencies/reference/{isoCode} - Get reference currency data
Add API endpoints for country management:
- GET /countries/{countryId}/required-fields - Get required fields
- PATCH /countries/{countryId} - Edit country configuration
Add API endpoints for image settings:
- GET /image-settings - Get current settings
- PUT /image-settings - Edit settings
Add API endpoint for retrieving shop logos:
- GET /shop/logos - Get header, email, invoice and favicon logos
@Amoifr
Copy link
Copy Markdown
Author

Amoifr commented Mar 30, 2026

Closing in favor of smaller, domain-focused PRs (#183-#186). See #166 for details.

@Amoifr Amoifr closed this Mar 30, 2026
@github-project-automation github-project-automation bot moved this from Ready for review to Closed in PR Dashboard Mar 30, 2026
@ps-jarvis ps-jarvis moved this from Closed to Ready for review in PR Dashboard Mar 30, 2026
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.

4 participants