Skip to main content

Web API objects

Offer object

This object contains details about the applied offer.

{
"category": "no_offer",
"type": "free_trial",
"id": "Offer Name"
}

Properties

NameTypeRequiredDescription
categoryStringYesCategory of the applied offer. Possible values: introductory, promotional, winback.
typeStringYesType of the applied offer. Possible values: free_trial, pay_as_you_go, pay_up_front.
IdStringYesThe Offer name of the applied offer as specified in the Products section of the Adapty Dashboard.

Paywall object

The object that contains information on a paywall.

Properties

NameTypeRequiredDescription
placement_idStringThe ID of the Placement where this paywall is shown. This value is set when creating a placement in your Adapty Dashboard.
variation_idString(uuid)The variation ID used to track purchases linked to this specific paywall.
paywall_idString(uuid)The unique identifier of the paywall.
ab_test_nameStringThe name of the parent A/B test.
paywall_nameStringThe name of the paywall, as defined in your Adapty Dashboard.
productsArray of objectsArray of Products objects containing product information for the paywall.
remote_configJSONA RemoteConfig object in JSON format containing the full remote config of the paywall.

Example

JSON
{
"placement_id": "PaywallPlacementId",
"variation_id": "00000000-0000-0000-0000-000000000000",
"paywall_id": "InternalPaywallId",
"ab_test_name": "Existing Offer | Improved Offer",
"paywall_name": "Used Paywall",
"products": [
{
"title": "Monthly Subscription w/o Trial",
"is_consumable": true,
"adapty_product_id": "InternalProductId",
"vendor_product_id": "onemonth_no_trial",
"introductory_offer_eligibility": false,
"promotional_offer_eligibility": true,
"base_plan_id": "B1",
"offer": {
"category": "promotional",
"type": "pay_up_front",
"id": "StoreOfferId"
}
}
],
"remote_config": {
"lang": "en",
"data": "RemoteConfigObject"
}
}

Products object

This object contains details about a product in Adapty.

Properties

NameTypeRequiredDescription
titleStringNoProduct name from the Products section in the Adapty Dashboard.
is_consumableBooleanYesIndicates whether the product is consumable.
adapty_product_idUUIDNoInternal product ID as used in Adapty.
vendor_product_idStringYesThe product ID in app stores.
introductory_offer_eligibilityBooleanNoSpecifies if the user is eligible for an iOS introductory offer.
promotional_offer_eligibilityBooleanNoSpecifies if the user is eligible for a promotional offer.
base_plan_idStringNoBase plan ID for Google Play or price ID for Stripe.
offerJSONNoAn Offer object as a JSON.

Example

{
"title": "Monthly Subscription w/o Trial",
"is_consumable": true,
"adapty_product_id": "InternalProductId",
"vendor_product_id": "onemonth_no_trial",
"introductory_offer_eligibility": false,
"promotional_offer_eligibility": true,
"base_plan_id": "B1",
"offer": {
"category": "promotional",
"type": "pay_up_front",
"id": "StoreOfferId"
}
}

RemoteConfig object

This object contains information about a remote config for a paywall.

{
"lang": "en",
"data": "{\"bodyItems\":[{\"spacerValue\":{\"height\":20,\"style\":{\"type\":\"emptySpace\"}},\"type\":\"spacer\"},{\"mediaValue\":{\"ratio\":\"1:1\",\"source\":{\"fileType\":\"image\",\"reference\":{\"en\":\"bundle/images/new1.png\"}},\"widthStyle\":\"full\"},\"type\":\"media\"},{\"titleValue\":{\"alignment\":\"center\",\"subtitleConfig\":{\"fontSize\":17,\"text\":\"\",\"color\":\"#FFFFFF\"},\"titleConfig\":{\"fontSize\":22,\"text\":\"\"}},\"type\":\"title\"},{\"productListValue\":{\"items\":[{\"productId\":\"exampleapp.oneWeek\",\"promoText\":\"paywall.promo-1.title\",\"backgroundColor\":\"#0B867D\"},{\"discountRate\":80,\"productId\":\"exampleapp.oneYear\",\"promoText\":\"paywall.promo-2.title\",\"backgroundColor\":\"#0B867D\"}],\"layout\":\"vertical\"},\"type\":\"productList\"}],\"defaultProductId\":\"exampleapp.oneWeek\",\"footer\":{\"singleProductValue\":{\"customTitles\":{\"exampleapp.oneWeek\":\"Subscribe\",\"exampleapp.oneYear\":\"Subscribe\"},\"productId\":\"exampleapp.oneWeek\"},\"type\":\"singleProduct\"},\"id\":\"exampleapp\",\"isFullScreen\":true,\"settings\":{\"backgroundColor\":\"#000000\",\"closeButtonAlignment\":\"left\",\"closeButtonIconStyle\":\"light\",\"colorScheme\":{\"accent\":\"#007566\",\"background\":\"#001B0D\",\"label\":\"#FFFFFF\",\"primary\":\"#10C6B6\",\"secondaryLabel\":\"#FFFFFF\",\"seperator\":\"#FFFFFF\"},\"isFullScreen\":true,\"shouldShowAlertOnClose\":false,\"showCloseButtonAfter\":1,\"triggerPurchaseWithAlert\":false,\"triggerPurchaseWithProductChange\":false}}"
}

Properties

NameTypeRequiredDescription
langString

Locale code for the [paywall localization. It uses language and region subtags separated by a hyphen (-).

Examples: en for English, pt-br for Brazilian Portuguese.

Refer to Localizations and locale codes for more details.

dataStringSerialized JSON string representing the remote config of your paywall. You can find it in the Remote Config tab of a specific paywall in the Adapty Dashboard.