Skip to content

Commit 7fe8fbd

Browse files
committed
Updated API from documentation release
1 parent 2f865fd commit 7fe8fbd

9 files changed

+199
-0
lines changed

api-specs/api/resources/standalone-prices.raml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ post:
3333
3434
- If the Standalone Price has the same price scope as an existing Standalone Price, a [DuplicateStandalonePriceScope](ctp:api:type:DuplicateStandalonePriceScopeError) error is returned.
3535
- If the Standalone Price has overlapping validity periods within the same price scope, a [OverlappingStandalonePriceValidity](ctp:api:type:OverlappingStandalonePriceValidityError) error is returned. A Price without validity period does not conflict with a Price defined for a time period.
36+
- If a modification is already in progress for the exact combination of SKU and price scope fields, an [ExactLockConflict](ctp:api:type:ExactLockConflictError) or [ValidityLockConflict](ctp:api:type:ValidityLockConflictError) error is returned.
3637
securedBy: [oauth_2_0: { scopes: ['manage_standalone_prices:{projectKey}'] }]
3738
body:
3839
application/json:
@@ -63,6 +64,8 @@ post:
6364
description: Checks if a StandalonePrice exists with the provided `key`. Returns a `200` status if the StandalonePrice exists, or a `404` status otherwise.
6465
post:
6566
displayName: Update StandalonePrice by Key
67+
description: |
68+
If a modification is already in progress for the exact combination of SKU and price scope fields, an [ExactLockConflict](ctp:api:type:ExactLockConflictError) or [ValidityLockConflict](ctp:api:type:ValidityLockConflictError) error is returned.
6669
securedBy:
6770
[oauth_2_0: { scopes: ['manage_standalone_prices:{projectKey}'] }]
6871
body:
@@ -105,6 +108,8 @@ post:
105108
description: Checks if a StandalonePrice exists with the provided `id`. Returns a `200` status if the StandalonePrice exists, or a `404` status otherwise.
106109
post:
107110
displayName: Update StandalonePrice by ID
111+
description: |
112+
If a modification is already in progress for the exact combination of SKU and price scope fields, an [ExactLockConflict](ctp:api:type:ExactLockConflictError) or [ValidityLockConflict](ctp:api:type:ValidityLockConflictError) error is returned.
108113
securedBy:
109114
[oauth_2_0: { scopes: ['manage_standalone_prices:{projectKey}'] }]
110115
body:
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#%RAML 1.0 DataType
2+
(package): Error
3+
type: ErrorObject
4+
displayName: ExactLockConflictError
5+
discriminatorValue: ExactLockConflict
6+
description: |
7+
Returned when a modification is already in progress for the exact combination of SKU and price scope fields for a Standalone Price.
8+
Retry the same request after 300 ms.
9+
10+
The error is returned as a failed response to:
11+
- [Create StandalonePrice](ctp:api:endpoint:/{projectKey}/standalone-prices:POST)
12+
- [Update StandalonePrice by ID](ctp:api:endpoint:/{projectKey}/standalone-prices/{id}:POST)
13+
- [Update StandalonePrice by Key](ctp:api:endpoint:/{projectKey}/standalone-prices/key={key}:POST)
14+
properties:
15+
code:
16+
type: string
17+
message:
18+
type: string
19+
description: |
20+
`"Modification already in progress for the combination of SKU and price scope fields."`
21+
sku:
22+
type: string
23+
description: |
24+
SKU for which the modification conflict occurred.
25+
currency:
26+
type: CurrencyCode
27+
description: |
28+
Currency code of the Standalone Price.
29+
country?:
30+
type: CountryCode
31+
description: |
32+
Country code of the geographic location.
33+
customerGroup?:
34+
type: CustomerGroupResourceIdentifier
35+
description: |
36+
[CustomerGroup](ctp:api:type:CustomerGroup) for which the Standalone Price is valid.
37+
channel?:
38+
type: ChannelResourceIdentifier
39+
description: |
40+
[Channel](ctp:api:type:Channel) for which the Standalone Price is valid.
41+
validFrom?:
42+
type: datetime
43+
description: |
44+
Date and time (UTC) from which the Standalone Price is valid.
45+
validUntil?:
46+
type: datetime
47+
description: |
48+
Date and time (UTC) until which the Standalone Price is valid.
49+
recurrencePolicy?:
50+
type: RecurrencePolicyReference
51+
description: |
52+
[RecurrencePolicy](ctp:api:type:RecurrencePolicy) that applies to the Standalone Price.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#%RAML 1.0 DataType
2+
(package): Error
3+
type: ErrorObject
4+
displayName: ValidityLockConflictError
5+
discriminatorValue: ValidityLockConflict
6+
description: |
7+
Returned when a modification is already in progress for the combination of SKU and price scope fields (but potentially different validity period) for a Standalone Price.
8+
Retry the same request after 300 ms.
9+
10+
The error is returned as a failed response to:
11+
- [Create StandalonePrice](ctp:api:endpoint:/{projectKey}/standalone-prices:POST)
12+
- [Update StandalonePrice by ID](ctp:api:endpoint:/{projectKey}/standalone-prices/{id}:POST)
13+
- [Update StandalonePrice by Key](ctp:api:endpoint:/{projectKey}/standalone-prices/key={key}:POST)
14+
properties:
15+
code:
16+
type: string
17+
message:
18+
type: string
19+
description: |
20+
`"Modification already in progress for the combination of SKU, price scope fields (but potentially different validity period). Please retry after the current operation completes."`
21+
sku:
22+
type: string
23+
description: |
24+
SKU for which the modification conflict occurred.
25+
currency:
26+
type: CurrencyCode
27+
description: |
28+
Currency code of the Standalone Price.
29+
country?:
30+
type: CountryCode
31+
description: |
32+
Country code of the geographic location.
33+
customerGroup?:
34+
type: CustomerGroupResourceIdentifier
35+
description: |
36+
[CustomerGroup](ctp:api:type:CustomerGroup) for which the Standalone Price is valid.
37+
channel?:
38+
type: ChannelResourceIdentifier
39+
description: |
40+
[Channel](ctp:api:type:Channel) for which the Standalone Price is valid.
41+
recurrencePolicy?:
42+
type: RecurrencePolicyResourceIdentifier
43+
description: |
44+
[RecurrencePolicy](ctp:api:type:RecurrencePolicy) for which the Standalone Price is valid.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#%RAML 1.0 DataType
2+
(package): Error
3+
type: GraphQLErrorObject
4+
displayName: GraphQLExactLockConflictError
5+
discriminatorValue: ExactLockConflict
6+
description: |
7+
Returned when a modification is already in progress for the exact combination of SKU and price scope fields for a Standalone Price.
8+
Retry the same request after 300 ms.
9+
10+
The error is returned as a failed response to:
11+
- [Create StandalonePrice](ctp:api:endpoint:/{projectKey}/standalone-prices:POST)
12+
- [Update StandalonePrice by ID](ctp:api:endpoint:/{projectKey}/standalone-prices/{id}:POST)
13+
- [Update StandalonePrice by Key](ctp:api:endpoint:/{projectKey}/standalone-prices/key={key}:POST)
14+
properties:
15+
code:
16+
type: string
17+
sku:
18+
type: string
19+
description: |
20+
SKU for which the modification conflict occurred.
21+
currency:
22+
type: CurrencyCode
23+
description: |
24+
Currency code of the Standalone Price.
25+
country?:
26+
type: CountryCode
27+
description: |
28+
Country code of the geographic location.
29+
customerGroup?:
30+
type: CustomerGroupResourceIdentifier
31+
description: |
32+
[CustomerGroup](ctp:api:type:CustomerGroup) for which the Standalone Price is valid.
33+
channel?:
34+
type: ChannelResourceIdentifier
35+
description: |
36+
[Channel](ctp:api:type:Channel) for which the Standalone Price is valid.
37+
validFrom?:
38+
type: datetime
39+
description: |
40+
Date and time (UTC) from which the Standalone Price is valid.
41+
validUntil?:
42+
type: datetime
43+
description: |
44+
Date and time (UTC) until which the Standalone Price is valid.
45+
recurrencePolicy?:
46+
type: RecurrencePolicyReference
47+
description: |
48+
[RecurrencePolicy](ctp:api:type:RecurrencePolicy) that applies to the Standalone Price.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#%RAML 1.0 DataType
2+
(package): Error
3+
type: GraphQLErrorObject
4+
displayName: GraphQLValidityLockConflictError
5+
discriminatorValue: ValidityLockConflict
6+
description: |
7+
Returned when a modification is already in progress for the combination of SKU and price scope fields (but potentially different validity period) for a Standalone Price.
8+
Retry the same request after 300 ms.
9+
10+
The error is returned as a failed response to:
11+
- [Create StandalonePrice](ctp:api:endpoint:/{projectKey}/standalone-prices:POST)
12+
- [Update StandalonePrice by ID](ctp:api:endpoint:/{projectKey}/standalone-prices/{id}:POST)
13+
- [Update StandalonePrice by Key](ctp:api:endpoint:/{projectKey}/standalone-prices/key={key}:POST)
14+
properties:
15+
code:
16+
type: string
17+
sku:
18+
type: string
19+
description: |
20+
SKU for which the modification conflict occurred.
21+
currency:
22+
type: CurrencyCode
23+
description: |
24+
Currency code of the Standalone Price.
25+
country?:
26+
type: CountryCode
27+
description: |
28+
Country code of the geographic location.
29+
customerGroup?:
30+
type: CustomerGroupResourceIdentifier
31+
description: |
32+
[CustomerGroup](ctp:api:type:CustomerGroup) for which the Standalone Price is valid.
33+
channel?:
34+
type: ChannelResourceIdentifier
35+
description: |
36+
[Channel](ctp:api:type:Channel) for which the Standalone Price is valid.
37+
recurrencePolicy?:
38+
type: RecurrencePolicyResourceIdentifier
39+
description: |
40+
[RecurrencePolicy](ctp:api:type:RecurrencePolicy) for which the Standalone Price is valid.

api-specs/api/types/standalone-price/updates/StandalonePriceSetValidFromAction.raml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ description: |
77
Updating the `validFrom` value generates the [StandalonePriceValidFromSet](ctp:api:type:StandalonePriceValidFromSetMessage) Message.
88
99
As the validity dates are part of the price scope and are not allowed to overlap, this update might return the [DuplicateStandalonePriceScope](ctp:api:type:DuplicateStandalonePriceScopeError) and [OverlappingStandalonePriceValidity](ctp:api:type:OverlappingStandalonePriceValidityError) errors, respectively. A Price without validity period does not conflict with a Price defined for a time period.
10+
11+
If a modification is already in progress for the exact combination of SKU and price scope fields, an [ExactLockConflict](ctp:api:type:ExactLockConflictError) or a [ValidityLockConflict](ctp:api:type:ValidityLockConflictError) error is returned.
1012
example: !include ../../../examples/StandalonePrice/StandalonePriceSetValidFromAction.json
1113
properties:
1214
validFrom?:

api-specs/api/types/standalone-price/updates/StandalonePriceSetValidFromAndUntilAction.raml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ description: |
77
Updating the `validFrom` and `validUntil` values generates the [StandalonePriceValidFromAndUntilSet](ctp:api:type:StandalonePriceValidFromAndUntilSetMessage) Message.
88
99
As the validity dates are part of the price scope and are not allowed to overlap, this update might return the [DuplicateStandalonePriceScope](ctp:api:type:DuplicateStandalonePriceScopeError) and [OverlappingStandalonePriceValidity](ctp:api:type:OverlappingStandalonePriceValidityError) errors, respectively. A Price without validity period does not conflict with a Price defined for a time period.
10+
11+
If a modification is already in progress for the exact combination of SKU and price scope fields, an [ExactLockConflict](ctp:api:type:ExactLockConflictError) or a [ValidityLockConflict](ctp:api:type:ValidityLockConflictError) error is returned.
1012
example: !include ../../../examples/StandalonePrice/StandalonePriceSetValidFromAndUntilAction.json
1113
properties:
1214
validFrom?:

api-specs/api/types/standalone-price/updates/StandalonePriceSetValidUntilAction.raml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ description: |
77
Updating the `validUntil` value generates the [StandalonePriceValidUntilSet](ctp:api:type:StandalonePriceValidUntilSetMessage) Message.
88
99
As the validity dates are part of the price scope and are not allowed to overlap, this update might return the [DuplicateStandalonePriceScope](ctp:api:type:DuplicateStandalonePriceScopeError) and [OverlappingStandalonePriceValidity](ctp:api:type:OverlappingStandalonePriceValidityError) errors, respectively. A Price without validity period does not conflict with a Price defined for a time period.
10+
11+
If a modification is already in progress for the exact combination of SKU and price scope fields, an [ExactLockConflict](ctp:api:type:ExactLockConflictError) or a [ValidityLockConflict](ctp:api:type:ValidityLockConflictError) error is returned.
1012
example: !include ../../../examples/StandalonePrice/StandalonePriceSetValidUntilAction.json
1113
properties:
1214
validUntil?:

api-specs/api/types/types.raml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ EnumValuesMustMatchError: !include error/EnumValuesMustMatchError.raml
570570
ErrorByExtension: !include error/ErrorByExtension.raml
571571
ErrorObject: !include error/ErrorObject.raml
572572
ErrorResponse: !include error/ErrorResponse.raml
573+
ExactLockConflictError: !include error/ExactLockConflictError.raml
573574
ExpiredCustomerEmailTokenError: !include error/ExpiredCustomerEmailTokenError.raml
574575
ExpiredCustomerPasswordTokenError: !include error/ExpiredCustomerPasswordTokenError.raml
575576
ExtensionBadResponseError: !include error/ExtensionBadResponseError.raml
@@ -628,6 +629,7 @@ SemanticErrorError: !include error/SemanticErrorError.raml
628629
ShippingMethodDoesNotMatchCartError: !include error/ShippingMethodDoesNotMatchCartError.raml
629630
StoreCartDiscountsLimitReachedError: !include error/StoreCartDiscountsLimitReachedError.raml
630631
SyntaxErrorError: !include error/SyntaxErrorError.raml
632+
ValidityLockConflictError: !include error/ValidityLockConflictError.raml
631633
VariantValues: !include error/VariantValues.raml
632634
GraphQLAnonymousIdAlreadyInUseError: !include error/graphql/GraphQLAnonymousIdAlreadyInUseError.raml
633635
GraphQLAssociateMissingPermissionError: !include error/graphql/GraphQLAssociateMissingPermissionError.raml
@@ -655,6 +657,7 @@ GraphQLEnumKeyDoesNotExistError: !include error/graphql/GraphQLEnumKeyDoesNotExi
655657
GraphQLEnumValueIsUsedError: !include error/graphql/GraphQLEnumValueIsUsedError.raml
656658
GraphQLEnumValuesMustMatchError: !include error/graphql/GraphQLEnumValuesMustMatchError.raml
657659
GraphQLErrorObject: !include error/graphql/GraphQLErrorObject.raml
660+
GraphQLExactLockConflictError: !include error/graphql/GraphQLExactLockConflictError.raml
658661
GraphQLExpiredCustomerEmailTokenError: !include error/graphql/GraphQLExpiredCustomerEmailTokenError.raml
659662
GraphQLExpiredCustomerPasswordTokenError: !include error/graphql/GraphQLExpiredCustomerPasswordTokenError.raml
660663
GraphQLExtensionBadResponseError: !include error/graphql/GraphQLExtensionBadResponseError.raml
@@ -715,6 +718,7 @@ GraphQLSemanticErrorError: !include error/graphql/GraphQLSemanticErrorError.raml
715718
GraphQLShippingMethodDoesNotMatchCartError: !include error/graphql/GraphQLShippingMethodDoesNotMatchCartError.raml
716719
GraphQLStoreCartDiscountsLimitReachedError: !include error/graphql/GraphQLStoreCartDiscountsLimitReachedError.raml
717720
GraphQLSyntaxErrorError: !include error/graphql/GraphQLSyntaxErrorError.raml
721+
GraphQLValidityLockConflictError: !include error/graphql/GraphQLValidityLockConflictError.raml
718722
BaseEvent: !include event/BaseEvent.raml
719723
CheckoutOrderCreationFailedEvent: !include event/CheckoutOrderCreationFailedEvent.raml
720724
CheckoutPaymentAuthorizationCancelledEvent: !include event/CheckoutPaymentAuthorizationCancelledEvent.raml

0 commit comments

Comments
 (0)