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

getBranchOrder

Method that gets a single 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 getBranchOrder 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/getBranchOrder | getBranchOrder} endpoint exposed by the SAP OCC API .

Signature

export declare function getBranchOrder<Res extends Order = Order,
	Props extends GetBranchOrderProps = GetBranchOrderProps>(
	props: Props,
	options?: MethodOptions
): Promise<Res>;

Parameters

NameRequiredTypeDescription
propsRequiredPropsParameter 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 one B2B order with the requested ID from the user's organization's unit

Referenced Types

Examples

Requesting a single order from the user's organization's branch

import { sdk } from '~/sdk';

const props = { code: "00001234" };
const order = await sdk.commerce.getBranchOrder(props);

On this page