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

getUserBranchOrderHistory

Paginate 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 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(
	context: SapccIntegrationContext,
	props?: GetUserBranchOrderHistoryProps
): Promise<OrderHistoryList>;

Parameters

NameRequiredTypeDescription
contextRequiredSapccIntegrationContext
propsOptionalGetUserBranchOrderHistoryPropsParameter object which can be used with this method. Refer to its type definition to learn about possible properties.

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