Alokai
You are reading the documentation for v7.x and earlier, which is no longer the latest version. Switch to v8.x

doMakeOrderApprovalDecision

Creates a decision (approval or rejection) for the order, which will trigger the next step in the approval workflow.

This method sends a POST request to the doMakeOrderApprovalDecision endpoint of the Alokai Middleware. In turn, it receives data from the doMakeOrderApprovalDecision endpoint exposed by the SAP OCC API B2B Order Approval controller.

Signature

export declare function doMakeOrderApprovalDecision<Res extends OrderApprovalDecision = OrderApprovalDecision,
	Props extends DoMakeOrderApprovalDecisionProps = DoMakeOrderApprovalDecisionProps>(
	props?: Props,
	options?: MethodOptions
): Promise<Res>;

Parameters

NameRequiredTypeDescription
propsOptionalPropsParameter object which can be used with this method. Refer to its type definition to learn about possible properties.
optionsOptionalMethodOptionsOptions that can be passed to additionally configure the request or customize the logic in a plugin.

Returns

Returns a representation of a OrderApproval.

Referenced Types

Examples

Fetching order approvals.

import { sdk } from '~/sdk';

const result = await sdk.commerce.doMakeOrderApprovalDecision(
 {
   orderApprovalCode: "approval-code",
   orderApprovalDecision: { decision: "REJECTED", comment: "test-comment" }
 }
);

On this page