Web
Overview
Check campaigns and offers
Method: GET
Endpoint: /init/page?url=url
or /init/page?contentId=contentId
url
: The URL of the pagecontentId
: The content ID of the page
The table below provides a description for the standard headers of the method regardless of platform:
Header | Description |
---|---|
appId | The ID of your application. |
auth | The authorization header. |
content-type | The content-type of the response. |
accept | The accept header. |
referrer | The referrer header. |
origin | The origin header. |
x-api-key | The API key of your app, which is generated in the API section on your Tonos admin account. |
biskoId | The Bisko ID of your visitor. |
When this API call is successfuly made, you will receive a response like in the example below.
JSON
{
"statusCode": 200,
"success": true,
"errors": {},
"message": null,
"data": {
"pc": [
{
"cid": "61ff1f28-97a4-4bb3-811c-d465d445e88a",
"n": "test paid trial recurring cmp",
"e": [],
"po": [
{
"tid": "e2571f38-8d20-4275-8fcc-bdc3a73eca28",
"t": 1,
"is": null,
"ic": false
}
]
}
],
"pid": "51e848f4-d2d3-4922-80cd-4c5835670c73",
"hac": false,
"clientSegmentModel": {
"productAccesses": [],
"isLoggedIn": true,
"lastCheckoutAbandonment": 0,
"biskoAudiences": []
}
}
}
Field Name | Type | Description |
---|---|---|
data | Object | Object that represents the data of the response. |
pc | Object | Object that represents the campaign of the page. |
cid | string | The ID of the campaign. |
n | string | The name of the campaign. |
e | array[Object] | Array of objects that returns the trigger events. |
po | array[Object] | The template cards. |
tid | string | The ID of the offer template. |
t | string | The type of the offer template. |
is | string | The ID of the HTML element where the inline offer will be placed. |
ic | boolean | Indicates whether the offer is closable. |
pid | int | The ID of the page. |
hac | boolean | Indicates whether the page has an active campaign. |
Offer template
Method: GET
Endpoint: offer/template?aid=aid
&cid=cid
&tid=tid
aid
: Application IDtid
: Offer template IDcId
: Campaign ID
The table below provides a description for the standard headers of the method regardless of platform:
Header | Description |
---|---|
appId | The ID of your application. |
auth | The authorization header. |
content-type | The content-type of the response. |
accept | The accept header. |
referrer | The referrer header. |
appreferrer | The application referrer header. |
pageId | The page ID. |
origin | The origin header. |
x-api-key | The API key of your app, which is generated in the API section on your Tonos admin account. |
biskoId | The Bisko ID of your visitor. |
If the service is successful, the server sends back an HTTP 200 response.
{
"statusCode": 200,
"success": true,
"errors": {},
"message": null,
"data": {
"id": "e2571f38-8d20-4275-8fcc-bdc3a73eca28",
"oi": "a73c8d5c-ae61-459b-86de-e79c966160fc",
"cl": false,
"t": 1,
"tc": null,
"th": null,
"tf": null,
"pap": [
{
"papId": "3c14583b-3e6f-4e60-a19f-fb3e0d07c859",
"name": "test paid trial recurring offer",
"description": "",
"duration": "2 Days",
"type": "payment",
"isRecurring": true,
"appleProductId": null,
"googleProductId": null,
"price": "2.00€"
}
],
"c": {
"s": "{\"_id\":1,\"offerTemplateCardType\":1,\"_offerTemplateCardCustomWidthToggle\":false,\"_offerTemplateCardHeader\":\"\",\"_offerTemplateCardFooter\":\"\",\"isEditable\":false,\"_showOfferCardHeader\":false,\"_offerTemplateCardHeaderImageToggle\":false,\"_showOfferCardFooter\":false,\"style\":{\"_offerTemplateCardBorderWidth\":\"0px\",\"_offerTemplateCardPadding\":\"30px 30px 30px 30px\",\"_offerTemplateCardCustomWidth\":\"800px\",\"_offerTemplateCardBorderColor\":\"#FFFFFF\",\"_offerTemplateCardBorderRadius\":\"12px\",\"_offerTemplateCardBackgroundColor\":\"#FFFFFF\",\"_spaceBetweenOfferCardItems\":\"8px\",\"_offerTemplateCardItemsAligment\":1,\"_offerTemplateCardItemsBorderRadius\":\"10px\",\"_offerTemplateCardBorderShadow\":false,\"_offerTemplateCardItemsLayout\":\"row\",\"_offerTemplateCardItemOuterLineStyle\":\"card-no-outline\",\"_offerTemplateCardHeaderImageUrl\":\"\",\"_offerTemplateCardHeaderImageSize\":\"80px\",\"_offerTemplateCardHeaderBackgroundColor\":\"#FFFFFF\",\"_offerTemplateCardHeaderBorderColor\":\"#FFFFFF\",\"_offerTemplateCardHeaderBorderRadius\":\"8px\",\"_offerTemplateCardHeaderBorderWidth\":\"0px\",\"_offerTemplateCardHeaderMargin\":\"0px 0px 0px 0px\",\"_offerTemplateCardHeaderPadding\":\"0px 0px 0px 0px\",\"_offerTemplateCardFooterBackgroundColor\":\"#FFFFFF\",\"_offerTemplateCardFooterBorderColor\":\"#FFFFFF\",\"_offerTemplateCardFooterBorderRadius\":\"5px\",\"_offerTemplateCardFooterBorderWidth\":\"0px\",\"_offerTemplateCardFooterMargin\":\"0px 0px 0px 0px\",\"_offerTemplateCardFooterPadding\":\"0px 0px 0px 0px\"}}"
},
"ci": [
{
"s": "{\"papId\":\"3c14583b-3e6f-4e60-a19f-fb3e0d07c859\",\"offerTemplateCardItemType\":1,\"_offerTemplateCardItemCustomWidthToggle\":false,\"_offerTemplateCardItemCustomTitleToggle\":false,\"_offerTemplateCardItemCustomTitleContent\":null,\"_buttonCustomWidthToggle\":false,\"_buttonCustomText\":null,\"_buttonCustomTextToggle\":false,\"_offerTemplateCardItemRibbon\":false,\"_offerTemplateCardItemRibbonText\":\"Best Deal\",\"_offerTemplateCardItemRibbonCustomWidthToggle\":false,\"_offerTemplateCardItemImageToggle\":false,\"_offerTemplateCardItemCustomlDescriptionToggle\":false,\"_offerTemplateCardItemCustomDescriptionContent\":null,\"_offerTemplateCardItemShowDuration\":true,\"style\":{\"_offerTemplateCardItemCustomWidth\":\"350px\",\"_offerTemplateCardItemTitleColor\":\"#1d79f2\",\"_offerTemplateCardItemDescriptionColor\":\"#667c99\",\"_offerTemplateCardBackgroundColor\":\"#ffffff\",\"_buttonBackgroundColor\":\"#1d79f2\",\"_buttonTextColor\":\"#ffffff\",\"_buttonBorderColor\":\"#1d79f2\",\"_buttonCustomWidth\":\"150px\",\"_buttonBorderRadius\":\"10px\",\"_buttonMargin\":\"0px 0px 0px 0px\",\"_buttonPadding\":\"8px 8px 8px 8px\",\"_biggerOfferCard\":false,\"_offerTemplateCardItemBorderColor\":\"#1d79f2\",\"_offerTemplateCardItemBorderWidth\":\"0px\",\"_buttonBorderWidth\":\"1px\",\"_offerTemplateCardItemRibbonBackgroundColor\":\"#1d79f2\",\"_offerTemplateCardItemRibbonTextColor\":\"#ffffff\",\"_offerTemplateCardItemImageSize\":\"80px\",\"_offerTemplateCardItemDurationTextColor\":\"#1d79f2\",\"_offerTemplateCardItemImageUrl\":null,\"_offerTemplateCardItemRibbonCustomWidth\":\"85px\",\"_offerTemplateCardItemRibbonBorderWidth\":\"0px\",\"_offerTemplateCardItemRibbonBorderRadius\":\"4px\",\"_offerTemplateCardItemRibbonBorderColor\":\"#ffffff\",\"_offerTemplateCardItemPadding\":\"20px 16px 20px 16px\",\"_offerTemplateCardItemTitleMargin\":\"20px 0px 20px 0px\",\"_offerTemplateCardItemDescriptionMargin\":\"20px 0px 20px 0px\"}}"
}
]
}
}
Field name | Type | Description |
---|---|---|
data | Object | Object that represents the data of the response. |
id | string | The ID of the offer template |
oi | string | The ID of the offer. |
cl | boolean | Indicates whether the offer is closeable. |
t | int | The type of the offer template. |
tc | string | The custom css. |
th | string | The custom header. |
tf | string | The custom footer. |
pap | array[Object] | Returns the subscription plans as an array of objects. |
papId | string | The ID of the subscription plan. |
name | string | The name of the subscription plan. |
description | string | The description of the subscription plan. |
duration | string | The duration of the subscription plan. |
type | string | The type of the subscription plan. |
isRecurring | boolean | Inidcates whether the subscription plan is recurring. |
appleProductId | string | The ID of the apple product. |
googleProductId | string | The ID of the google product. |
price | string | The price of the subscription plan. |
c | Object | The offer template card. |
s | string | The style of the offer template. |
ci | Object | The offer template card items. |
Checkout
Method: GET
Endpoint: /checkout?oi=oi
oi
: Offer ID
Header | Description |
---|---|
appId | The ID of your application. |
auth | The authorization header. |
content-type | The content-type of the response. |
accept | The accept header. |
referrer | The referrer header. |
appreferrer | The application referrer header. |
pageId | The page ID. |
origin | The origin header. |
x-api-key | The API key of your app, which is generated in the API section on your Tonos admin account. |
biskoId | The Bisko ID of your visitor. |
JSON
{
"statusCode": 200,
"success": true,
"errors": {},
"message": null,
"data": {
"ps": {
"pm": 2,
"po": [
{
"id": 1,
"name": "Pay with card",
"imageUrl": "https://kfddosoikb.gjirafa.net/image/fb1decb2-1b42-42b5-8b57-8b790f5593cb.jpg"
},
{
"id": 3,
"name": "Apple Pay",
"imageUrl": "https://kfddosoikb.gjirafa.net/image/ade7a0b4-4562-4108-8f40-9ec3712b51d3.jpg"
},
{
"id": 2,
"name": "Google Pay",
"imageUrl": "https://kfddosoikb.gjirafa.net/image/a09ba8f3-133c-4e07-b66c-997f64750a37.jpg"
}
]
},
"bsa": true,
"l": "https://kfddosoikb.gjirafa.net/image/bfacbd30-f1a6-4e6b-a74f-a62633d56b7f.jpg",
"cp": [
{
"ic": false,
"d": "<p><strong>Read our </strong><a href=\"https://portali.gjirafa.dev\" rel=\"noopener noreferrer\" target=\"_blank\"><strong>Terms and Conditions</strong></a> meni edited</p>"
},
{
"ic": true,
"d": "<p>Baba records <a href=\"google.com\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"color: rgb(0, 0, 0);\"><strong>Lorem Ipsum</strong></a><span style=\"color: rgb(0, 0, 0);\"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</span></p>"
}
],
"s": [
{
"pid": "99aac486-c7ec-43a8-a99d-72df43ce5373",
"t": "1 day trial - $1",
"d": "Your trial period ends on 01 Dec, 2021."
},
{
"pid": "99aac486-c7ec-43a8-a99d-72df43ce5373",
"t": "Next Payment Date",
"d": "01 Dec, 2021."
}
],
"lr": {
"{language-key}": "{Translation}"
},
"cbd": {
"pid": "c548acb3-6087-4a6a-a2fa-cde78445f9ef",
"bc": { "id": 236, "name": "British Virgin Islands" },
"ba": "Adresa update",
"sc": null,
"sa": null
},
"c": [{ "id": "{Country ID}", "name": "{Country}" }]
}
}