You are reading the documentation for v7.x and earlier, which is no longer the latest version. Switch to v8.x
getOrderApprovals
Fetches a list of order approvals on the B2B Commerce Cloud instance.
This method sends a POST request to the getOrderApprovals endpoint of the Alokai Middleware. In turn, it receives data from the getOrderApprovals endpoint exposed by the SAP OCC API B2B Order Approvals controller.
Signature
export declare function getOrderApprovals<Res extends OrderApprovalList = OrderApprovalList,
Props extends GetOrderApprovalsProps = GetOrderApprovalsProps>(
props?: Props,
options?: MethodOptions
): Promise<Res>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
props | Optional | Props | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
options | Optional | MethodOptions | Options that can be passed to additionally configure the request or customize the logic in a plugin. |
Returns
Returns a representation of a OrderApprovalList.
Referenced Types
- OrderApprovalList
GetOrderApprovalsProps- MethodOptions
Examples
Fetching order approvals.
import { sdk } from '~/sdk';
const approvals = await sdk.commerce.getOrderApprovals();Fetching order approvals with additional parameters.
import { sdk } from '~/sdk';
const approvals = await sdk.commerce.getOrderApprovals({ currentPage: 1, pageSize: 10, sort: "byOrderNumber" });