You are reading the documentation for v7.x and earlier, which is no longer the latest version. Switch to v8.x
getActiveCostCenters
Fetch Active Cost Centers list from SAP Commerce Cloud in the B2B channel.
This method receives data from the getActiveCostCenters endpoint exposed by the SAP OCC API B2B Cost Centers Controller.
Signature
export declare function getActiveCostCenters(
context: SapccIntegrationContext,
props: GetActiveCostCentersProps
): Promise<B2BCostCenterList>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | SapccIntegrationContext | |
props | Required | GetActiveCostCentersProps | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
Returns
Returns a representation of a B2BCostCenterList.
Referenced Types
- SapccIntegrationContext
GetActiveCostCentersProps- B2BCostCenterList
Examples
Fetching active cost centers with optional parameters
import { sdk } from '~/sdk';
const costCenters = await sdk.commerce.getActiveCostCenters({ lang: 'en', currency: 'GBP' });