checkRequiresApproval
post
/ccagent/v1/orders/checkRequiresApproval
Check Requires Approval. Check for an order if it requires an approval or not. 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
Header Parameters
-
X-CCOrganization: string
the organization Id in which order should be created
-
X-CCSite: string
the site Id in which order should be created
Root Schema : checkRequiresApproval_request
Type:
Show Source
object
-
orderId(required):
string
the order id for the order which is to be checked for approval requirement.
Example:
{
"orderId":"o30411"
}
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : checkRequiresApproval_response
Type:
Show Source
object
-
requireApprovalReasons:
string
The reason why the order has been moved to pending approval
-
requiresApproval:
boolean
True if order requires approval else False.
Example Response (application/json)
{
"requiresApproval":"True",
"requireApprovalReasons":"Order is pending approval because total is greater than the approved order limit."
}
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|
|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|
|100101|The shopper profile does not belong to organization passed in the header|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
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:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code