-
API is disabled by default, to enable it you need to set flag to
true
inconfig/packages/_sylius.yaml
:sylius_api: enabled: true
-
API CartShippingMethod key
cost
has been changed toprice
. -
API Ship Shipment endpoint (PATCH api/v2/admin/shipments/{id}/ship) body value
tracking
has been changed totrackingCode
. -
To have better control over the serialization process, we introduced
shop
andadmin
prefixes to names of serialization groups onsrc/Sylius/Bundle/ApiBundle/Resources/config/api_resources/*
andsrc/Sylius/Bundle/ApiBundle/Resources/config/serialization/*
. Several additional serialization groups have been rephrased, to improve readability and predictability of them. If you are using they on your custom entityapi_resource
configuration or serialization groups, you should check if one of these changes may affect on your app. If yes, change all occurs by this pattern:
-
product_review:update
changed to:admin:product_review:update
andshop:product_review:update
-
product_association_type
changed to:admin:product_association_type
-
product_option
changed to:admin:product_option
-
product_option_value
changed to:admin:product_option_value
-
product_taxon
changed to:admin:product_taxon
andshop:product_taxon
-
product_variant
changed to:admin:product_variant
andshop:product_variant
-
taxon_translation
changed to:admin:taxon_translation
andshop:taxon_translation
-
We've removed
Sylius\Bundle\ApiBundle\ApiPlatform\Bridge\Doctrine\ORM\SubresourceDataProvider
. It's no longer needed becauseApiPlatform\Core\Bridge\Doctrine\Orm\SubresourceDataProvider
has the same logic. -
API Change Quantity endpoint
PATCH api/v2/admin/orders/{tokenValue}/change-quantity
has been changed toPATCH api/v2/admin/orders/{tokenValue}/items/{orderItemId}
and its body valueorderItemId
has been removed (now it is a route parameter) andnewQuantity
has been renamed toquantity
. -
API Add to cart endpoint
PATCH /api/v2/shop/orders/{tokenValue}/items
no longer requiresproductCode
in request body. -
Channel pricing resource and its serialization has been removed from shop section
-
Sylius\Bundle\ApiBundle\DataProvider\AddressCollectionDataProvider
has been removed in favour ofSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\AddressesExtension
-
Second argument of
Sylius\Bundle\ApiBundle\DataPersister\AddressDataPersister
has been changed fromCustomerContextInterface $customerContext
toUserContextInterface $userContext
-
We've removed
productCode
fromSylius\Bundle\ApiBundle\Command\Cart\AddItemToCart
command. -
Endpoints with changed code to IRI:
PATCH on /api/v2/shop/account/orders/{tokenValue}/payments/{paymentId}
:
{
- "paymentMethodCode": "string"
+ "paymentMethod": "string"
}
POST on /api/v2/shop/product-reviews
:
{
"title": "string",
"rating": 0,
"comment": "string",
- "productCode": "string",
+ "product": "string",
"email": "string"
}
POST on /api/v2/shop/reset-password-requests
:
{
- "localeCode": "string"
+ "locale": "string"
}
POST on api/v2/shop/account-verification-requests
:
{
- "localeCode": "string"
+ "locale": "string"
}
PATCH on /api/v2/shop/account/orders/{tokenValue}/shipments/{shipmentId}
:
{
- "shippingMethodCode": "string"
+ "shippingMethod": "string"
}
PATCH on /api/v2/shop/account/orders/{tokenValue}/items
:
{
- "productVariantCode": "string"
+ "productVariant": "string"
}