Headless API
SDK reference
hydrogen
routes
joy-place-order-scope

routes/joy-place-order-scope

Interfaces

JoyPlaceOrderScopeContext

Properties

env
env: JoyPlaceOrderScopeEnv;

JoyPlaceOrderScopeEnv

Env the merchant declares in their Hydrogen project (Oxygen) — the same two vars every block's loader already reads.

Properties

JOY_API_URL?
JOY_API_URL?: string;

Base URL of the Joy Headless API, e.g. https://api.joy.so/app/api/v1/headless.

JOY_SHOP_DOMAIN?
JOY_SHOP_DOMAIN?: string;

The shop's myshopify domain. The ONLY source of truth for shop identity here — see file header.


JoyPlaceOrderScopeLoaderArgs

Structural shape of a Hydrogen/Remix loader's args.

Properties

context
context: JoyPlaceOrderScopeContext;
request
request: Request;

Functions

loader()

function loader(__namedParameters): Promise<Response>;

Hydrogen resource-route loader. Always resolves to a Response; never throws.

Parameters

ParameterType
__namedParametersJoyPlaceOrderScopeLoaderArgs

Returns

Promise<Response>