Skip to content

Commit 2222db8

Browse files
committed
Updated API from documentation release
1 parent b1fc7df commit 2222db8

File tree

5 files changed

+19
-10
lines changed

5 files changed

+19
-10
lines changed

api-specs/api/resources/as-associate.raml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,8 +642,10 @@ type: base
642642
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
643643
description: |
644644
Creates an Order from a [Cart](ctp:api:type:Cart) in a [BusinessUnit](ctp:api:type:BusinessUnit).
645-
The Cart must have a shipping address set before creating an Order.
646-
Creating an Order fails with an [InvalidOperation](ctp:api:type:InvalidOperationError) if the Cart does not reference the same BusinessUnit as the `businessUnitKey` path parameter.
645+
646+
The Cart must have a shipping address and an active Shipping Method set.
647+
648+
If the Cart does not reference the same BusinessUnit as the `businessUnitKey` path parameter, an [InvalidOperation](ctp:api:type:InvalidOperationError) is returned.
647649
648650
Specific Error Codes:
649651

api-specs/api/resources/in-store.raml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,10 +419,12 @@ uriParameters:
419419
]
420420
description: |
421421
Creates an Order from a Cart in a [Store](ctp:api:type:Store).
422-
Before you create an Order, the Cart must have a [shipping address set](ctp:api:type:CartSetShippingAddressAction).
422+
The Cart must have a shipping address and an active Shipping Method set.
423+
423424
The shipping address is used for tax calculation for a Cart with `Platform` [TaxMode](ctp:api:type:TaxMode).
424425
425426
Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.
427+
426428
If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Order creation may still successfully complete after the error is returned.
427429
If you receive this error, you should verify the status of the Order by querying a unique identifier supplied during the creation request, such as the Order number.
428430
@@ -948,7 +950,9 @@ uriParameters:
948950
949951
Creates an Order from a Cart in a [Store](ctp:api:type:Store) for the Customer or anonymous user. The `customerId` or `anonymousId` field on the Order is automatically set based on the [customer:{id}](/scopes#composable-commerce-oauth) or [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
950952
951-
The Cart must have a [shipping address set](ctp:api:type:CartSetShippingAddressAction) for taxes to be calculated. When creating [B2B Orders](/associates-overview#b2b-resources), the Customer must have the `CreateMyOrdersFromMyCarts` [Permission](ctp:api:type:Permission).
953+
The Cart must have a shipping address and an active Shipping Method set.
954+
955+
When creating [B2B Orders](/associates-overview#b2b-resources), the Customer must have the `CreateMyOrdersFromMyCarts` [Permission](ctp:api:type:Permission).
952956
953957
If the Cart's `customerId` does not match the [customer:{id}](/scopes#composable-commerce-oauth) scope, or the `anonymousId` does not match the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope, a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned.
954958

api-specs/api/resources/me.raml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,11 +740,12 @@ delete:
740740
741741
Creates an Order from a Cart for the Customer or anonymous user. The `customerId` or `anonymousId` field on the Order is automatically set based on the [customer:{id}](/scopes#composable-commerce-oauth) or [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
742742
743-
The Cart must have a [shipping address set](ctp:api:type:CartSetShippingAddressAction) for taxes to be calculated. When creating [B2B Orders](/associates-overview#b2b-resources), the Customer must have the `CreateMyOrdersFromMyCarts` [Permission](ctp:api:type:Permission).
744-
Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.
743+
The Cart must have a shipping address and an active Shipping Method set. When creating [B2B Orders](/associates-overview#b2b-resources), the Customer must have the `CreateMyOrdersFromMyCarts` [Permission](ctp:api:type:Permission).
745744
746745
If the Cart's `customerId` does not match the [customer:{id}](/scopes#composable-commerce-oauth) scope, or the `anonymousId` does not match the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope, a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned.
747746
747+
Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.
748+
748749
If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Order creation may still successfully complete after the error is returned.
749750
If you receive this error, you should verify the status of the Order by querying a unique identifier supplied during the creation request, such as the Order number.
750751

api-specs/api/resources/orders.raml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@ post:
3131
- conflicting
3232
description: |
3333
Creates an Order from a Cart.
34-
Before you create an Order, the Cart must have a [shipping address set](ctp:api:type:CartSetShippingAddressAction).
34+
35+
The Cart must have a shipping address and an active Shipping Method set.
36+
3537
The shipping address is used for tax calculation for a Cart with `Platform` [TaxMode](ctp:api:type:TaxMode).
3638
3739
Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.
3840
39-
If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Order creation may still successfully complete after the error is returned.
40-
If you receive this error, you should verify the status of the Order by querying a unique identifier supplied during the creation request, such as the Order number.
41+
If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Order creation may still successfully complete after the error is returned.
42+
If you receive this error, you should verify the status of the Order by querying a unique identifier supplied during the creation request, such as the Order number.
4143
4244
Specific Error Codes:
4345

api-specs/api/types/cart/updates/CartSetShippingMethodAction.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ properties:
1313
Value to set.
1414
If empty, any existing value is removed.
1515
16-
If the referenced Shipping Method has a predicate that does not match the Cart, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
16+
If the referenced Shipping Method is inactive, or has a predicate that does not match the Cart, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
1717
externalTaxRate?:
1818
type: ExternalTaxRateDraft
1919
description: |

0 commit comments

Comments
 (0)