Switch the current order
post
/ccstore/v1/orders/current/switch/
Provides the ability to switch the current order context to another incomplete order from the list of saved orders for the current profile. The new order to switch to is specified in the request payload.
It also supports switching the current order context to a new empty cart order when no order ID is supplied.
Request
Supported Media Types
- application/json
The Json input containing the ID of the order to switch the context to.
Root Schema : switchCurrentOrder_request
Type:
Show Source
object
-
orderId(optional):
string
The ID of the order to switch the context to.
Example:
{
"orderId":"o60411"
}
Response
Supported Media Types
- application/json
200 Response
Following model is returned when the switch order operation succeeds.
Root Schema : switchCurrentOrder_response
Type:
Show Source
object
-
orderId(optional):
string
The ID of the new cart order.
Example Response (application/json)
{
"orderId":"o14441"
}
Default Response
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
The error response:
Error Code | Description | Possible Fix |
---|---|---|
28107 | Order not found. | Specify a valid order ID. |
38432 | Unable to switch the order. | Ensure that the order being switched to is pre-submitted. |
The error response:
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code