Skip to content

Commit cf0f702

Browse files
committed
Updated API from documentation release
1 parent 3a34fc6 commit cf0f702

File tree

10 files changed

+26
-17
lines changed

10 files changed

+26
-17
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,10 @@ type: base
448448
displayName: Create an Order from a Quote
449449
securedBy: [oauth_2_0: { scopes: ['manage_quotes:{projectKey}'] }]
450450
description: |
451-
Creates an Order from a [Quote](ctp:api:type:Cart) in a [BusinessUnit](ctp:api:type:BusinessUnit).
452-
Creating an Order fails with an [InvalidOperation](ctp:api:type:InvalidOperationError) if the Quote does not reference the same BusinessUnit as the `businessUnitKey` path parameter.
451+
452+
Creates an Order from a [Quote](ctp:api:type:Quote) in a [BusinessUnit](ctp:api:type:BusinessUnit).
453+
454+
The Quote must reference the same Business Unit as the `businessUnitKey` path parameter, must have the `Pending` [state](ctp:api:type:QuoteState), and must be valid (not past the `validTo` date). If these criteria are not met, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
453455
454456
Specific Error Codes:
455457

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,12 +438,14 @@ uriParameters:
438438
post:
439439
displayName: Create Order in Store from Quote
440440
description: |
441-
Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.
441+
442+
Creates an Order from a [Quote](ctp:api:type:Quote) in a [Store](ctp:api:type:Store). The referenced Quote must have the `Pending` [state](ctp:api:type:QuoteState) and must be valid (not past the `validTo` date); otherwise, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
443+
444+
Produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.
442445
443446
Specific Error Codes:
444447
445448
- [OutOfStock](ctp:api:type:OutOfStockError)
446-
- [PriceChanged](ctp:api:type:PriceChangedError)
447449
- [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
448450
- [InvalidOperation](ctp:api:type:InvalidOperationError)
449451
- [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)

api-specs/api/resources/me.raml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,14 +829,16 @@ delete:
829829
post:
830830
displayName: Create My Order from Quote
831831
description: |
832-
When creating [B2B Orders](/associates-overview#b2b-resources), the Customer must have the `CreateMyOrdersFromMyQuotes` [Permission](ctp:api:type:Permission).
833832
834-
Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.
833+
Creates an Order from a [Quote](ctp:api:type:Quote). To create [B2B Orders](/associates-overview#b2b-resources), the Customer must have the `CreateMyOrdersFromMyQuotes` [Permission](ctp:api:type:Permission).
834+
835+
The referenced Quote must have the `Pending` [state](ctp:api:type:QuoteState) and must be valid (not past the `validTo` date); otherwise, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
836+
837+
Produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.
835838
836839
Specific Error Codes:
837840
838841
- [OutOfStock](ctp:api:type:OutOfStockError)
839-
- [PriceChanged](ctp:api:type:PriceChangedError)
840842
- [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
841843
- [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
842844
- [AssociateMissingPermission](ctp:api:type:AssociateMissingPermissionError)

api-specs/api/resources/orders.raml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,17 @@ post:
8686
post:
8787
displayName: Create an Order from a Quote
8888
description: |
89-
Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.
89+
90+
Creates an Order from a Quote. The referenced Quote must have the `Pending` [state](ctp:api:type:QuoteState) and must be valid (not past the `validTo` date); otherwise, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
91+
92+
Produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.
9093
9194
Specific Error Codes:
9295
9396
- [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
9497
- [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
9598
- [InvalidOperation](ctp:api:type:InvalidOperationError)
9699
- [OutOfStock](ctp:api:type:OutOfStockError)
97-
- [PriceChanged](ctp:api:type:PriceChangedError)
98100
99101
securedBy: [oauth_2_0: { scopes: ['manage_quotes:{projectKey}'] }]
100102
body:

api-specs/api/types/error/PriceChangedError.raml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ description: |
1010
1111
The error is also returned as a failed response to:
1212
13-
- [Create Order from Cart](ctp:api:endpoint:/{projectKey}/orders:POST), [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/orders:POST), and [Create Order from Quote](ctp:api:endpoint:/{projectKey}/orders/quotes:POST) requests on Orders.
14-
- [Create Order from Cart](ctp:api:endpoint:/{projectKey}/me/orders:POST), [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/me/orders:POST), and [Create Order from Quote](ctp:api:endpoint:/{projectKey}/me/orders/quotes:POST) requests on My Orders.
13+
- [Create Order from Cart](ctp:api:endpoint:/{projectKey}/orders:POST) and [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/orders:POST) requests on Orders.
14+
- [Create Order from Cart](ctp:api:endpoint:/{projectKey}/me/orders:POST) and [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/me/orders:POST) requests on My Orders.
1515
- [Create Order from Cart in BusinessUnit](ctp:api:endpoint:/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/orders:POST) request on Associate Orders.
1616
1717
properties:

api-specs/api/types/error/graphql/GraphQLPriceChangedError.raml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ description: |
1010
1111
The error is also returned as a failed response to:
1212
13-
- [Create Order from Cart](ctp:api:endpoint:/{projectKey}/orders:POST), [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/orders:POST), and [Create Order from Quote](ctp:api:endpoint:/{projectKey}/orders/quotes:POST) requests on Orders.
14-
- [Create Order from Cart](ctp:api:endpoint:/{projectKey}/me/orders:POST), [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/me/orders:POST), and [Create Order from Quote](ctp:api:endpoint:/{projectKey}/me/orders/quotes:POST) requests on My Orders.
13+
- [Create Order from Cart](ctp:api:endpoint:/{projectKey}/orders:POST) and [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/orders:POST) requests on Orders.
14+
- [Create Order from Cart](ctp:api:endpoint:/{projectKey}/me/orders:POST) and [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/me/orders:POST) requests on My Orders.
1515
- [Create Order from Cart in BusinessUnit](ctp:api:endpoint:/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/orders:POST) request on Associate Orders.
1616
properties:
1717
code:

api-specs/api/types/order/OrderFromQuoteDraft.raml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ properties:
77
type: QuoteResourceIdentifier
88
description: |
99
[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to the Quote from which the Order is created.
10-
If the referenced [Quote](ctp:api:type:Quote) has expired (`validTo` check) or its `quoteState` is `Accepted`, `Declined`, or `Withdrawn`, the Order creation will fail.
10+
11+
The [Quote](ctp:api:type:Quote) must have the `Pending` [state](ctp:api:type:QuoteState) and must be valid (not past the `validTo` date).
1112
version:
1213
type: number
1314
format: int64

api-specs/api/types/quote/Quote.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ properties:
6060
validTo?:
6161
type: datetime
6262
description: |
63-
Expiration date for the Quote.
63+
Expiration date for the Quote. Once a Quote expires, it cannot be ordered.
6464
sellerComment?:
6565
type: string
6666
description: |

api-specs/api/types/quote/updates/QuoteChangeQuoteStateAction.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ example: !include ../../../examples/Quote/QuoteChangeQuoteStateAction.json
77
properties:
88
quoteState:
99
type: QuoteState
10-
description: New state to be set for the Quote.
10+
description: New state to be set for the Quote, except `DeclinedForRenegotiation`. The `DeclinedForRenegotiation` state can be set only when performing a [renegotiation request](ctp:api:type:QuoteRequestQuoteRenegotiationAction).

api-specs/api/types/staged-quote/StagedQuote.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ properties:
5252
validTo?:
5353
type: datetime
5454
description: |
55-
Expiration date for the Quote.
55+
Expiration date for the Quote. Once a Quote expires, it cannot be ordered.
5656
sellerComment?:
5757
type: string
5858
description: |

0 commit comments

Comments
 (0)