POST
/
v2
/
sites
/
{site_id}
/
webviews
/
sessions
curl --request POST \
  --url https://api.loyaltylion.com/v2/sites/{site_id}/webviews/sessions \
  --header 'Content-Type: application/json' \
  --data '{
  "channel": "<string>",
  "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_customers

This 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.

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.