You are reading the documentation for v7.x and earlier, which is no longer the latest version. Switch to v8.x
placeOrgOrder
Creates a B2B order, based on a cart
This method exchanges data with the placeOrgOrder endpoint exposed by the SAP OCC API .
Signature
export declare function placeOrgOrder(
context: SapccIntegrationContext,
props: PlaceOrgOrderProps
): Promise<Order>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | SapccIntegrationContext | |
props | Required | PlaceOrgOrderProps | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
Returns
Returns the newly created order
Referenced Types
- SapccIntegrationContext
PlaceOrgOrderProps- Order
Examples
Placing a new order
import { sdk } from '~/sdk';
// All the complex info like shipping/delivery address must already filled out in the cart entity
// see sdk.createCart()
const props = {
cartId: "00001234",
termsChecked: true,
}
const newOrder = await sdk.commerce.placeOrgOrder(props);