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

getUserBranchOrderHistory

Method that paginates through B2B order from the user's organization's branch

Make sure that the B2B user calling this method is in the Unit Order Viewer group. This will make the user have the correct permissions to call this endpoint.

This method sends a POST request to the getUserBranchOrderHistory endpoint of the Alokai Middleware. In turn, it exchanges data with the {https://api.c1jvi8hu9a-vsfspzooa1-d1-public.model-t.cc.commerce.ondemand.com/occ/v2/swagger-ui/index.html#/B2B%20Orders/getUserBranchOrderHistory | getUserBranchOrderHistory} endpoint exposed by the SAP OCC API .

Signature

export declare function getUserBranchOrderHistory<Res extends OrderHistoryList = OrderHistoryList,
	Props extends GetUserBranchOrderHistoryProps = GetUserBranchOrderHistoryProps>(
	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 paginated/filtered/sorted order history for the user's organization's branch

Referenced Types

Examples

Getting the order history from the user's organization's branch

import { sdk } from '~/sdk';

// All of the props below are optional
const props = {
  currentPage: 1,
  filters: '::user:someUserHere';
  pageSize: 10;
  sort: 'someSortingMethod';
  statuses: 'CANCELLED,CHECKED_VALID';
};
const orderHistory = await sdk.commerce.getUserBranchOrderHistory(props);
// or just
const orderHistory = await sdk.commerce.getUserBranchOrderHistory();

On this page