Documentation / API reference / GET /embed/site

GET /api/v1/embed/site

Read the texts, limits and plans of the paywall embed.

Method and path
GET /api/v1/embed/site
Authentication
Server key
Status codes
  • 200
  • 400
  • 403
  • 404
  • 429
  • 500
  • 503

The browser sends this request for the embed script. It needs no server key, but Origin must match a site origin on the Integration page. Your server does not call this operation.

For custom elements and fallback markup, read part 3 of the integration guide.

Query parameters

Query parameters
FieldTypeRequiredDescription
locale query, string, 1 to 16 characters no The value of data-locale on the script tag. The value en returns English. Each other value, or no value, returns the market locale of the publication.

Response 200

Response fields
FieldTypeAlways presentDescription
locale en, sv-SE, nb-NO or da-DK yes The locale of each text string in the response.
limits.visitor integer, 0 or more yes The free articles for a visitor each month. The meter draws its bars from this number.
limits.registered integer, 0 or more yes The free articles for a registered reader each month. The meter draws its bars from this number with known.
urls.login string yes The absolute URL of the log-in page on the subscription host with no query. The embed adds the query.
urls.signup string yes The absolute URL of the sign-up page on the subscription host with no query. The embed adds the query.
urls.account string yes The absolute URL of the account page on the subscription host with no query.
urls.cancel string yes The absolute URL of the cancel page on the subscription host with no query.
urls.withdraw string yes The absolute URL of the withdrawal page on the subscription host with no query.
urls.checkout string yes The checkout URL prefix on the subscription host with a final slash. The embed adds the plan ID and query.
urls.changePlan string yes The plan change URL prefix on the subscription host with a final slash. The embed adds the plan ID and return.
texts.logIn string yes The text of the log-in link.
texts.account string yes The text of the account link.
texts.cancel string yes The label of the cancel link. The admin label applies in the market locale.
texts.withdraw string yes The label of the withdrawal link. The admin label applies in the market locale.
texts.meterNotice.one string yes The meter notice for 1 free article.
texts.meterNotice.other string yes The meter notice for another count. The string holds {count} for the number.
texts.registrationWall.heading string yes The heading of the registration wall.
texts.registrationWall.text string or null yes The sentence that names the registered limit, or null for a limit of 0. Show no sentence for null.
texts.registrationWall.createAccount string yes The text of the create account button.
texts.registrationWall.logIn string yes The text of the log-in link on the registration wall.
texts.offerBox.heading string yes The heading of the offer box.
texts.offerBox.empty string yes The sentence for an offer box with no plan.
texts.offerBox.haveSubscription string yes The text before the log-in link for a visitor who may hold a subscription.
texts.offerBox.logIn string yes The text of the log-in link in the offer box.
texts.offerBox.choose string yes The text of the plan button. The embed adds the plan name as hidden text.
texts.tierWall.heading string yes The heading of the tier wall.
texts.tierWall.text string yes The sentence under the heading. It states that the current plan does not open this article.
texts.tierWall.none string yes The sentence on a tier wall with no upgrade plan. The wall then links to the account.
texts.tierWall.change string yes The text of the plan change button.
texts.tierWall.changeLabel string yes The accessible name of the plan change button. The embed replaces {plan} with the plan name.
texts.tierWall.account string yes The text of the account link on a tier wall with no upgrade plan.
texts.unavailable.heading string yes The heading of the unavailable card.
texts.unavailable.text string yes The sentence of the unavailable card.
texts.unavailable.retry string yes The text of the button that loads the page again.
plans array of objects yes The plans that a visitor can buy, in the order of the subscribe page.
plans[].id string, UUID yes The plan ID. The embed adds it to the checkout URL.
plans[].name string yes The plan name.
plans[].description string or null yes The plan description, or null when the plan has none.
plans[].price string yes The amount with currency, for example 99,00 kr. It holds no interval.
plans[].per string yes The interval text after the price, for example / month or / year.
plans[].perMonth string or null yes For a year plan, the price text for each month. Else null.
plans[].trial string or null yes The trial text for a plan with trial days. Else null.
plans[].renewal string yes The renewal sentence. The embed always shows it with the price.
plans[].campaign object or null yes The campaign row of the plan, or null. Present only while an active campaign has Show in the offer on. It replaces the plan row and opens the campaign checkout.
plans[].keys array of strings, 1 to 10 yes The access keys of the plan, 1 to 10. The offer box shows plans that hold the article key. A key is not secret.
plans[].interval month or year yes The billing interval of the plan. The tier wall shows plans with the interval of the reader plan.

Fields in plans[].campaign

Fields in plans[].campaign
FieldTypeAlways presentDescription
code string yes The campaign code. The embed adds campaign=<code> to the checkout URL.
name string yes The campaign name for the badge.
first string yes The label of the first step, for example The first 2 months.
price string yes The campaign price with currency, for example 29,00 kr. It holds no interval.
per string yes The interval text after the campaign price, for example / month.
perMonth string or null yes For a year plan, the campaign price text for each month. Else null.
then string yes The label of the second step, for example Then.
laterPrice string yes The plan price after the campaign periods. It holds no interval.
laterPer string yes The interval text after the later price, for example / month.
laterPerMonth string or null yes For a year plan, the later price text for each month. Else null.
renewal string yes The sentence that states automatic renewal at the later price.
label string yes The plan name and campaign name as hidden text on the plan button. The embed adds it after the button text.

Example

Request

curl -sS "https://konto.example.no/api/v1/embed/site?locale=en" \
  -H "Origin: https://www.example.no"

Errors

Error status codes for this operation
Statuscode
400invalid_request
403forbidden
404no_site
429rate_limited
500internal
503busy

Read the cause and action for each code in the Errors reference.