# lib/place-order-scope

> Source: https://devdocs.joy.so/joy-headless-api/sdk-reference/hydrogen/lib/place-order-scope/ · Last updated: 2026-11-24

## Interfaces

### GetPlaceOrderScopeOptions

Options for [getPlaceOrderScope](#getplaceorderscope).

#### Properties

##### route?

```ts
route?: string;
```

Override the route (defaults to [DEFAULT_PLACE_ORDER_SCOPE_ROUTE](#default_place_order_scope_route)).

## Variables

### DEFAULT_PLACE_ORDER_SCOPE_ROUTE

```ts
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()

```ts
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

| Parameter   | Type                                                      |
| ----------- | --------------------------------------------------------- |
| `programId` | `string`                                                  |
| `options?`  | [`GetPlaceOrderScopeOptions`](#getplaceorderscopeoptions) |

#### Returns

`Promise`<`PlaceOrderScope` | `null`>
