Check an order requires approval

post

/ccstore/v1/orders/checkRequiresApproval

Checks if the specified order requires approval before it can be submitted.

This tends to be functionality that is used in B2B use cases, for example, where a supervisor needs to approve and order because of a purchase limit.

The endpoint returns a result indicating if the order requires approval and the reason(s) it requires approval.

Request

Supported Media Types
Header Parameters
Body ()
Root Schema : checkRequiresApproval_request
Type: object
Show Source
  • the order ID for the order which is to be checked for approval requirement.
Example:
{
    "orderId":"o30411"
}
Back to Top

Response

Supported Media Types

200 Response

Returned when the operation succeeds.
Body ()
Root Schema : checkRequiresApproval_response
Type: object
Show Source
Example Response (application/json)
{
    "requiresApproval":true,
    "requireApprovalReasons":"Order is pending approval because total is greater than the approved order limit."
}

Default Response

The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
Error CodeDescriptionPossible Fix
28358Order not found.Please ensure that valid order ID is specified that the current profile has access to.

The error response:
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top