handleOrderActions
post
                    /ccagent/v1/orders/{id}
Handle Order Actions. It handles the order actions based on Op value. Op value can be any of cancel/validateOrder/validatePaymentAuthorization/validActions/invalidateOrder/sendPlacedOrderEmailNotification. Optionally takes X-CCOrganization header which is a JSON field with organization ID as value. If this header is not provided, then the endPoint will consider first active organization as the current organization for a B2B user.
                Request
Supported Media Types
                - application/json
 
Path Parameters
                - 
                    id: string
                    
                    Commerce id of order.
 
Header Parameters
                - 
                        X-CCOrganization(optional): string
                        
                        the organization Id in which order should be created
 
Root Schema : handleOrderActions_request
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
            pInputData: 
            string
            Indicates which operation to perform and contains required data to perform operation
 
Example:
    
    
{
    "op":"cancel",
    "cancelReason":"badProductReview"
}Response
Supported Media Types
                - application/json
 
200 Response
Following model is returned when operation succeeds.
                
                
                    Root Schema : handleOrderActions_response
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
            id(optional): 
            string
            Commerce id for this order. Related Endpoint operations - CancelOrder, validateOrder, validatePaymentAuthorization, invalidateOrder, sendPlacedOrderEmailNotification.
 - 
            isAcceptQuoteAllowed(optional): 
            boolean
            Boolean indicating whether the quoted order can be accepted or not. Related Endpoint operations - validActions.
 - 
            isCancelInFlightOrderAllowed(optional): 
            boolean
            Boolean indicating whether the order is in remorse period or the extended remorse period.
 - 
            isCancelOrder(optional): 
            boolean
            Boolean indicating whether the order is cancellable or not. Related Endpoint operations - validActions.
 - 
            isEditOrder(optional): 
            boolean
            Boolean indicating whether the order is editable or not. Related Endpoint operations - validActions.
 - 
            isExchangeOrder(optional): 
            boolean
            Boolean indicating whether the order is exchangeable or not. Related Endpoint operations - validActions.
 - 
            isOrderAuthorized(optional): 
            boolean
            Boolean indicating whether the order is authorized or not. Related Endpoint operations - validatePaymentAuthorization.
 - 
            isOrderRefreshed(optional): 
            boolean
            Boolean to indicate if invalidation is successful. Related Endpoint operations - invalidateOrder.
 - 
            isOrderValid(optional): 
            string
            Boolean indicating whether the order is Valid or not. Related Endpoint operations - ValidActions.
 - 
            isRejectQuoteAllowed(optional): 
            boolean
            Boolean indicating whether the quoted order is rejected or not. Related Endpoint operations - validActions.
 - 
            isRequteAllowed(optional): 
            boolean
            Boolean indicating whether the quoted order is requoted or not. Related Endpoint operations - validActions.
 - 
            isResendPlacedOrderNotificationAllowed(optional): 
            boolean
            Boolean indicating whether the order qualifies for Placed Order email notification. Related Endpoint operations - validActions.
 - 
            isReturnOrder(optional): 
            boolean
            Boolean indicating whether the order is returnable or not. Related Endpoint operations - validActions.
 - 
            message(optional): 
            boolean
            Message indicating order has been successfully cancelled. Related Endpoint operations - CancelOrder.
 - 
            success(optional): 
            string
            Success status of email notification for given order ID. Related Endpoint operations - sendPlacedOrderEmailNotification.
 
Example Response (application/json)
                    {
    "links":[
        {
            "rel":"self",
            "href":"/ccagentui/v1/orders/o10008"
        }
    ],
    "id":"o10008",
    "message":"Order [o10008] has been successfully cancelled."
}
                    
                    Default Response
The error response.
 The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|100094|Organization passed in the header is currently inactive|
|100095|The order or return request does not belong to the current organization of the shopper profile|
|100096|The organization associated to the order or return request was deleted / does not exist|
|100097|The organization associated to the order or return request is currently inactive|
|200219|{0} is an inactive reason.|
|100098|Current operation is being performed in an organization context and the shopper profile is not associated to any organization|
|100099|Current operation is being performed in an organization context and the order or return request does not belong to any organization|
|200218|{0} is an invalid reason.|
|200101|Cancel failed as order is in [{0}] state.|
|200104|The shipping group commerce item relationship [{0}] is in an invalid [{1}] state.|
|200103|The shipping group [{0}] is in a no pending action state.|
|30015|SiteId passed in x-ccsite header is currently inactive|
|200100|Internal error occurred while processing the request.|
|30014|SiteId passed in x-ccsite header is invalid or the site was deleted|
|30020|The Site to which the order belongs was deleted|
|30021|The Site to which the order belongs is currently inactive|
|100101|The shopper profile does not belong to organization passed in the header|
|30019|SiteId passed in x-ccsite header is not related to the order being worked upon|
|210105|Specified order does not exist.|
                
                
                    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: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayAn 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