POST
/
v2
/
sites
/
{site_id}
/
webviews
/
sessions
cURL
curl --request POST \
  --url https://api.loyaltylion.com/v2/sites/{site_id}/webviews/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "channel": "<string>",
  "language": "en",
  "currency": "usd",
  "customer": {
    "merchant_id": "1000001",
    "email": "alice@example.com"
  }
}'
{
  "webview_session": {
    "url": "https://platform.loyaltylion.com/webview/f7bd16c",
    "expires_at": "2025-03-03T00:00:00Z"
  }
}
Required scopes: write_customersThis endpoint has a rate limit of 100 requests per second
Create a short-lived WebView session for a site. This session includes a URL that can be used to render an embedded Loyalty Page in a WebView. If you have an authenticated customer, you can include their ID and email when creating the session. This will allow rendering a WebView with a customer context, allowing the customer to view their points and redeem rewards.
You must only include a customer when generating an WebView session if you have already authenticated them in your app, i.e. using Shopify’s own authentication, or multipass.

Authorizations

Authorization
string
header
required

An API key linked to a Program in LoyaltyLion, with a set of permissions (scopes). API keys can be created manually, or acquired through an OAuth2 flow. The API key should be provided as a Bearer token in the Authorization header

Path Parameters

site_id
number
required

Body

application/json

Body

The body is of type object.

Response

201
application/json

201

The response is of type object.