You are reading the documentation for v7.x and earlier, which is no longer the latest version. Switch to v8.x
createRegistrationRequest
Creates a registration request for a B2B user.
This method exchanges data with the createRegistrationRequest endpoint exposed by the SAP OCC API B2b Users Controller.
This method will work only if B2B User extension is enabled.
Signature
export declare function createRegistrationRequest(
context: SapccIntegrationContext,
props: CreateRegistrationRequestProps
): Promise<void>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | SapccIntegrationContext | |
props | Required | CreateRegistrationRequestProps | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
Returns
Returns a representation of an Order.
Referenced Types
- SapccIntegrationContext
CreateRegistrationRequestProps
Examples
Cancelling an order from a cart.
import { sdk } from '~/sdk';
const b2bUserData: createRegistrationRequestProps = {
orgUserRegistrationData: {
titleCode: "mr",
firstName: "john",
lastName: "doe",
email: "john+doe@integration-test.com",
message:
"Please create a new account for me. Department: Ground support; Position: Chief safeguard; Report to: Steve Jackson.",
},
sapCommerceCloudCaptchaToken: "token", // optional recaptcha token, when the captchaCheckEnabled = true for the store
};
await sdk.commerce.createRegistrationRequest(b2bUserData);