Skip to content

Commit b249fe4

Browse files
committed
Updated API from documentation release
1 parent 53bd987 commit b249fe4

File tree

4 files changed

+71
-35
lines changed

4 files changed

+71
-35
lines changed

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ type: base
603603
(createable): OrderFromCartDraft
604604
get:
605605
displayName: Query orders in business unit
606+
description: Retrieves Orders in a [BusinessUnit](ctp:api:type:BusinessUnit).
606607
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
607608
responses:
608609
200:
@@ -611,7 +612,7 @@ type: base
611612
example: !include ../examples/orders.example.json
612613
head:
613614
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
614-
description: Checks if one or more Orders exist for the provided query predicate. Returns a `200 OK` status if any Orders match the query predicate, or a `404 Not Found` otherwise.
615+
description: Checks if one or more Orders exist with provided query predicate in a [BusinessUnit](ctp:api:type:BusinessUnit). Returns a `200 OK` status if any Orders match the query predicate, or a `404 Not Found` otherwise.
615616
queryParameters:
616617
where?:
617618
type: QueryPredicate[]
@@ -682,6 +683,7 @@ type: base
682683
displayName: Get order by order number in business unit
683684
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
684685
description: |
686+
Retrieves an Order with the provided `orderNumber` in a [BusinessUnit](ctp:api:type:BusinessUnit).
685687
If the Order exists in the [Project](ctp:api:type:Project) but does not reference the requested [BusinessUnit](ctp:api:type:BusinessUnit), this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
686688
responses:
687689
200:
@@ -690,12 +692,13 @@ type: base
690692
example: !include ../examples/order.example.json
691693
head:
692694
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
693-
description: Checks if an Order exists for a given `orderNumber`. Returns a `200 OK` status if the Order exists or a `404 Not Found` otherwise.
695+
description: Checks if an Order exists with the provided `orderNumber` in a [BusinessUnit](ctp:api:type:BusinessUnit). Returns a `200 OK` status if the Order exists or a `404 Not Found` otherwise.
694696
post:
695697
displayName: Update order by order number in business unit
696698
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
697699
description: |
698-
If the Order exists in the [Project](ctp:api:type:Project) but does not reference the requested [BusinessUnit](ctp:api:type:BusinessUnit), this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
700+
Updates an Order in a [BusinessUnit](ctp:api:type:BusinessUnit) using one or more [update actions](/../api/projects/orders#update-actions).
701+
If the Order exists in the [Project](ctp:api:type:Project) but does not reference the requested Business Unit, this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
699702
body:
700703
application/json:
701704
example: !include ../examples/order-update.example.json
@@ -715,20 +718,22 @@ type: base
715718
displayName: Get order by id in business unit
716719
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
717720
description: |
718-
If the Order exists in the [Project](ctp:api:type:Project) but does not reference the requested [BusinessUnit](ctp:api:type:BusinessUnit), this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
721+
Retrieves an Order with the provided `id` in a [BusinessUnit](ctp:api:type:BusinessUnit).
722+
If the Order exists in the [Project](ctp:api:type:Project) but does not reference the requested Business Unit, this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
719723
responses:
720724
200:
721725
body:
722726
application/json:
723727
example: !include ../examples/order.example.json
724728
head:
725729
securedBy: [oauth_2_0: { scopes: ['view_orders:{projectKey}'] }]
726-
description: Checks if an Order exists with the provided `id`. Returns a `200 OK` status if the Order exists or a `404 Not Found` otherwise.
730+
description: Checks if an Order exists with the provided `id` in a [BusinessUnit](ctp:api:type:BusinessUnit). Returns a `200 OK` status if the Order exists or a `404 Not Found` otherwise.
727731
post:
728732
displayName: Update order by id in business unit
729733
securedBy: [oauth_2_0: { scopes: ['manage_orders:{projectKey}'] }]
730734
description: |
731-
If the Order exists in the [Project](ctp:api:type:Project) but does not reference the requested [BusinessUnit](ctp:api:type:BusinessUnit), this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
735+
Updates an Order in a [BusinessUnit](ctp:api:type:BusinessUnit) using one or more [update actions](/../api/projects/orders#update-actions).
736+
If the Order exists in the [Project](ctp:api:type:Project) but does not reference the requested Business Unit, this method returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
732737
body:
733738
application/json:
734739
example: !include ../examples/order-update.example.json

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

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ uriParameters:
370370
been completed.
371371
get:
372372
displayName: Query Orders in Store
373+
description: Retrieves Orders in a [Store](ctp:api:type:Store).
373374
securedBy:
374375
[
375376
oauth_2_0:
@@ -399,7 +400,7 @@ uriParameters:
399400
],
400401
},
401402
]
402-
description: Checks if one or more Orders exist for the provided query predicate. Returns a `200 OK` status if any Orders match the query predicate, or [Not Found](/../api/errors#404-not-found) otherwise.
403+
description: Checks if one or more Orders exist for the provided query predicate in a [Store](ctp:api:type:Store). Returns a `200 OK` status if any Orders match the query predicate, or [Not Found](/../api/errors#404-not-found) otherwise.
403404
queryParameters:
404405
where?:
405406
type: QueryPredicate[]
@@ -417,6 +418,7 @@ uriParameters:
417418
},
418419
]
419420
description: |
421+
Creates an Order from a Cart in a [Store](ctp:api:type:Store).
420422
Before you create an Order, the Cart must have a [shipping address set](ctp:api:type:CartSetShippingAddressAction).
421423
The shipping address is used for tax calculation for a Cart with `Platform` [TaxMode](ctp:api:type:TaxMode).
422424
@@ -507,6 +509,7 @@ uriParameters:
507509
},
508510
]
509511
description: |
512+
Retrieves an Order with the provided `orderNumber` in a [Store](ctp:api:type:Store).
510513
If the Order exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
511514
responses:
512515
200:
@@ -526,7 +529,7 @@ uriParameters:
526529
],
527530
},
528531
]
529-
description: Checks if an Order exists for a given `orderNumber`. Returns a `200 OK` status if the Order exists or [Not Found](/../api/errors#404-not-found) otherwise.
532+
description: Checks if an Order exists with the provided `orderNumber` in a [Store](ctp:api:type:Store). Returns a `200 OK` status if the Order exists or [Not Found](/../api/errors#404-not-found) otherwise.
530533
post:
531534
displayName: Update Order in Store by OrderNumber
532535
securedBy:
@@ -541,6 +544,7 @@ uriParameters:
541544
},
542545
]
543546
description: |
547+
Updates an Order in a [Store](ctp:api:type:Store) using one or more [update actions](/../api/projects/orders#update-actions).
544548
If the Order exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
545549
body:
546550
application/json:
@@ -553,6 +557,7 @@ uriParameters:
553557
delete:
554558
displayName: Delete Order in Store by OrderNumber
555559
description: |
560+
Deletes an Order in a [Store](ctp:api:type:Store).
556561
If the Order exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
557562
558563
Deleting an Order produces the [OrderDeleted](ctp:api:type:OrderDeletedMessage) Message.
@@ -595,6 +600,7 @@ uriParameters:
595600
},
596601
]
597602
description: |
603+
Retrieves an Order with the provided `id` in a [Store](ctp:api:type:Store).
598604
If the Order exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
599605
responses:
600606
200:
@@ -614,7 +620,7 @@ uriParameters:
614620
],
615621
},
616622
]
617-
description: Checks if an Order exists with the provided `id`. Returns a `200 OK` status if the Order exists or [Not Found](/../api/errors#404-not-found) otherwise.
623+
description: Checks if an Order exists with the provided `id` in a [Store](ctp:api:type:Store). Returns a `200 OK` status if the Order exists or [Not Found](/../api/errors#404-not-found) otherwise.
618624
post:
619625
displayName: Update Order in Store by ID
620626
securedBy:
@@ -629,6 +635,7 @@ uriParameters:
629635
},
630636
]
631637
description: |
638+
Updates an Order in a [Store](ctp:api:type:Store) using one or more [update actions](/../api/projects/orders#update-actions).
632639
If the Order exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
633640
body:
634641
application/json:
@@ -641,6 +648,7 @@ uriParameters:
641648
delete:
642649
displayName: Delete Order in Store by ID
643650
description: |
651+
Deletes an Order in a [Store](ctp:api:type:Store).
644652
If the Order exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
645653
646654
Deleting an Order produces the [OrderDeleted](ctp:api:type:OrderDeletedMessage) Message.
@@ -893,7 +901,13 @@ uriParameters:
893901
},
894902
]
895903
description: |
896-
Returns all Orders in a Store that match a given Query Predicate and contain either a `customerId` that matches the [customer_id:{id}](/scopes#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
904+
Retrieves Orders in a [Store](ctp:api:type:Store) for the authenticated Customer or anonymous user.
905+
906+
A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
907+
908+
- If no Orders exist that match the provided query predicate.
909+
- If an Order exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
910+
897911
responses:
898912
200:
899913
body:
@@ -915,9 +929,9 @@ uriParameters:
915929
},
916930
]
917931
description: |
918-
Checks if one or more Orders exist for the provided query predicate in a Store. Returns a `200 OK` status if successful.
932+
Checks if one or more Orders exist for the provided query predicate in a [Store](ctp:api:type:Store) for the authenticated Customer or anonymous user. Returns a `200 OK` status if successful.
919933
920-
A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
934+
A [Not Found](/../api/errors#404-not-found) error is returned in the following scenarios:
921935
922936
- If no Orders exist in the Store that match the Query Predicate.
923937
- If an Order matches the Query Predicate, but no `store` is specified, or the `store` field references a different Store.
@@ -932,7 +946,7 @@ uriParameters:
932946
displayName: Create My Order in Store from Cart
933947
description: |
934948
935-
Creates an Order in a Store 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.
949+
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.
936950
937951
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).
938952
@@ -981,13 +995,13 @@ uriParameters:
981995
get:
982996
displayName: Get My Order in Store by ID
983997
description: |
984-
Returns an Order for a given `id` in a Store. Returns a `200 OK` status if successful.
998+
Retrieves an Order with the provided `id` in a [Store](ctp:api:type:Store) for the authenticated Customer or anonymous user. Returns a `200 OK` status if successful.
985999
9861000
A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
9871001
988-
- If no Order exists in the Store for the given `id`.
989-
- If the Order exists but does not have a `store` specified, or the `store` field references a different Store.
990-
- If the Order exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
1002+
- If no Orders exists in the Store with the provided `id`.
1003+
- If an Order exists but does not have a `store` specified, or the `store` field references a different Store.
1004+
- If an Order exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
9911005
9921006
securedBy:
9931007
[
@@ -1023,13 +1037,13 @@ uriParameters:
10231037
},
10241038
]
10251039
description: |
1026-
Checks if an Order exists with the provided `id` in a Store. Returns a `200 OK` status if successful.
1040+
Checks if an Order exists with the provided `id` in a [Store](ctp:api:type:Store) for the authenticated Customer or anonymous user. Returns a `200 OK` status if successful.
10271041
1028-
A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
1042+
A [Not Found](/../api/errors#404-not-found) error is returned in the following scenarios:
10291043
1030-
- If no Order exists in the Store for the given `id`.
1031-
- If the Order exists but does not have a `store` specified, or the `store` field references a different Store.
1032-
- If the Order exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
1044+
- If no Order exists in the Store with the provided `id`.
1045+
- If an Order exists but does not have a `store` specified, or the `store` field references a different Store.
1046+
- If an Order exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
10331047
10341048
/active-cart:
10351049
type: base

0 commit comments

Comments
 (0)