Headless API
SDK reference
hydrogen
lib
place-order-scope

lib/place-order-scope

Interfaces

GetPlaceOrderScopeOptions

Options for getPlaceOrderScope.

Properties

route?
route?: string;

Override the route (defaults to DEFAULT_PLACE_ORDER_SCOPE_ROUTE).

Variables

DEFAULT_PLACE_ORDER_SCOPE_ROUTE

const DEFAULT_PLACE_ORDER_SCOPE_ROUTE: "/api/joy-place-order-scope" = '/api/joy-place-order-scope';

Default same-origin route the merchant mounts (export {loader} from '@joy-loyalty/weaverse-hydrogen/routes/joy-place-order-scope').

Functions

getPlaceOrderScope()

function getPlaceOrderScope(programId, options?): Promise<PlaceOrderScope | null>;

Fetch place-order eligibility for one program. null for anything short of a clean 200 — see the file header for why that is never surfaced as an error.

Parameters

ParameterType
programIdstring
options?GetPlaceOrderScopeOptions

Returns

Promise<PlaceOrderScope | null>