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

getCostCenter

Fetch cost center by the code list from SAP Commerce Cloud in the B2B channel.

This method receives data from the getCostCenter endpoint exposed by the SAP OCC API B2B Cost Centers Controller.

Signature

export declare function getCostCenter(
	context: SapccIntegrationContext,
	props: GetCostCenterProps
): Promise<B2BCostCenter>;

Parameters

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

Returns

Returns a representation of a B2BCostCenter.

Referenced Types

Examples

Fetching active cost centers with optional parameters

import { sdk } from '~/sdk';

const costCenter = await sdk.commerce.getCostCenter({ costCenterCode: "pronto_services" });

On this page