@limio/catalog v2.1.0
Limio - Javascript API Wrapper
A package that provides simple functions to access your Limio product catalogue.
Getting started
In order to get started you'll need to install the package and get an API key (TBC)
Installation
npm install @limio/catalog
A simple request
The following code snippet is the a basic request you can use to retrieve some campaign details & items from your catalogue:
// Require and setup limio with your access token
const limio = require('@limio/catalog').Limio('ACCESS_TOKEN_HERE')
// Or using ES modules
import { Limio } from '@limio/catalog'
const limio = Limio('ACCESS_TOKEN_HERE')
limio.getLanding({
catalog_id: '1',
tag: '/tags/TestTag/1YJDE',
segments: ['/segments/TestSegment/Segment'],
attributes: {
Payment_Term__c: 'Due Upon Receipt',
Auto_Renewal__c: 'Yes',
Initial_Term__c: '012W',
Offer_Type1__c: 'Gift'
}
})
.then(result => {
// Do whatever you need to with the data
console.log(result)
})
.catch(err => {
// Handle this how you like (docs to follow)
console.log(err)
})
API Methods
getLanding
This method will return tagged campaign details, all offer items that are tagged and match your inputted options & any associated offers.
limio.getLanding({
...your options here...
})
Name | Description | Required |
---|---|---|
catalog_id | String - The ID of the catalog you are querying | Yes |
tag | String - Path of tag item to query | Yes |
segments | Array - Path or paths of segments to query | No |
identity | String - Unique identifier of customer so we can query with matching segments | No |
attributes | Object - Attributes to query (key being attribute name) | No |
Example response
{
"tagDirInfo": {
"item_id": "ID_HERE",
"segment_id": "ID_HERE",
"id": "ID_HERE",
"path_parts": [
"offers",
"Limio Landing Campaign"
],
"parent_path": "/offers",
"path": "/offers/Limio Landing Campaign",
"name": "Limio Landing Campaign",
"type": "dir",
"data": {
"attributes": {
"primary_color": "#f47c24",
"secondary_color": "#2b2145",
"tertiary_color": "#697689"
},
"name": "Limio Landing Campaign",
"headline": "Choose the subscription that suits you",
"subline": "Unlock today’s Premium stories. Enjoy unrestricted access to Premium articles.",
"validFrom": "20190204",
"validTo": "20190218",
"status": "draft",
"tags": [
"/tags/Billboard/1DYNE"
],
"images": [],
"description": ""
}
},
"items": [
{
"item_id": "ID_HERE",
"segment_id": "ID_HERE",
"id": "ID_HERE",
"path_parts": [
"offers",
"Limio Landing Campaign",
"Limio Regular Subscription"
],
"parent_path": "/offers/Limio Landing Campaign",
"path": "/offers/Limio Landing Campaign/Limio Regular Subscription",
"name": "Limio Regular Subscription",
"type": "item",
"data": {
"attributes": {
"CTA_Txt": "Subscribe now",
"Payment_Term__c": "Due Upon Receipt"
},
"name": "Limio Regular Subscription",
"headline": "Choose the subscription that suits you",
"subline": "Unlock today’s Premium stories. Enjoy unrestricted access to Premium articles.",
"validFrom": "20190204",
"validTo": "20190218",
"status": "draft",
"tags": [
"/tags/Billboard/1DYNE"
],
"images": [],
"description": "",
"url": "/offers/Limio Landing Campaign/Limio Regular Subscription",
"segments": [
"/segments/regions/UK/UK/GB"
],
"products": [
"/products/UK/Limio/Digital edition, Audio edition, Limio"
],
"price": [
{
"name": "charge_1",
"label": "Charge 1",
"value": "50.00",
"currencyCode": "GBP",
"type": "recurring",
"trigger": "subscription_start",
"repeat_interval": 1,
"repeat_interval_type": "months",
"repeat_count": 0,
"delay_interval": null,
"attributes": []
}
],
"baseTemplate": "/config/templates/offers"
}
}
],
"associatedOffers": {
"upSellOffers": [
{
"item_id": "ID_HERE",
"segment_id": "ID_HERE",
"id": "ID_HERE",
"path_parts": [
"offers",
"Limio Relevant Campaign",
"Regular Related Subscription"
],
"parent_path": "/offers/Limio Relevant Campaign",
"path": "/offers/Limio Relevant Campaign/Regular Related Subscription",
"name": "Regular Related Subscription",
"type": "item",
"data": {
"attributes": {
"CTA_Txt": "",
"Payment_Term__c": "Due Upon Receipt"
},
"name": "Regular Related Subscription",
"headline": "Check out the relevant Limio offers below!",
"subline": "Relevant subline here",
"validFrom": "20190204",
"validTo": "20190218",
"status": "draft",
"tags": [
"/tags/Billboard/1DYNB"
],
"url": "/offers/Limio Relevant Campaign/Regular Related Subscription",
"segments": [
"/segments/regions/UK/UK/GB"
],
"products": [
"/products/UK/Limio/Digital edition, Audio edition, Limio"
],
"price": [
{
"name": "charge_1",
"label": "Charge 1",
"value": "65.00",
"currencyCode": "GBP",
"type": "recurring",
"trigger": "subscription_start",
"repeat_interval": 1,
"repeat_interval_type": "months",
"repeat_count": 0,
"delay_interval": null,
"attributes": []
}
],
"baseTemplate": "/config/templates/offers"
}
}
],
"crossSellOffers": [],
"saveOffers": []
}
}
getOffers
This method will return all offer items that match your inputted options.
limio.getOffers({
...your options here...
})
Name | Description | Required |
---|---|---|
catalog_id | String - The ID of the catalog you are querying | Yes |
tag | String - Path of tag item to query | No |
segments | Array - Path or paths of segments to query | No |
attributes | Object - Attributes to query (key being attribute name) | No |
Example response
[
{
"item_id": "ID_HERE",
"segment_id": "ID_HERE",
"id": "ID_HERE",
"path_parts": [
"offers",
"Limio Landing Campaign",
"Limio All Inclusive"
],
"parent_path": "/offers/Limio Landing Campaign",
"path": "/offers/Limio Landing Campaign/Limio All Inclusive",
"name": "Limio All Inclusive",
"type": "item",
"data": {
"attributes": {
"CTA_Txt": "Go All Inclusive"
},
"name": "Limio All Inclusive",
"headline": "Choose the subscription that suits you",
"subline": "Unlock today’s Premium stories. Enjoy unrestricted access to Premium articles.",
"validFrom": "20190204",
"validTo": "20190218",
"status": "draft",
"tags": [
"/tags/Billboard/1DYNE"
],
"images": [],
"description": "",
"url": "/offers/Limio Landing Campaign/Limio All Inclusive",
"segments": [
"segments/regions/UK/UK/GB"
],
"products": [
"/products/UK/Limio/Digital edition, Audio edition, Limio"
],
"price": [
{
"name": "charge_1",
"label": "Charge 1",
"value": "100.00",
"currencyCode": "GBP",
"type": "recurring",
"trigger": "subscription_start",
"repeat_interval": 1,
"repeat_interval_type": "months",
"repeat_count": 0,
"delay_interval": null,
"attributes": []
}
],
"baseTemplate": "/config/templates/offers",
"associations": {
"upSell": [
"offers/Limio Relevant Campaign/Regular Related Subscription"
],
"crossSell": [],
"save": []
}
}
}
]
getProducts
This method will return all products that match your inputted options.
limio.getProducts({
...your options here...
})
Name | Description | Required |
---|---|---|
catalog_id | String - The ID of the catalog you are querying | Yes |
attributes | Object - Attributes to query (key being attribute name) | No |
Example response
[
{
"item_id": "ID_HERE",
"segment_id": "ID_HERE",
"id": "ID_HERE",
"path_parts": [
"products",
"AFPR",
"Limio",
"Weekly print edition"
],
"parent_path": "/products/AFPR/Limio",
"path": "/products/AFPR/Limio/Weekly print edition",
"name": "Weekly print edition",
"type": "item",
"data": {
"attributes": {
"Product_Format__c": "Print Only",
"Family": "Limio"
},
"category": "product",
"sku": "AFPR_Student",
"baseTemplate": "products/Product"
}
}
]
getSegments
This method will return all segments that match your inputted options.
limio.getSegments({
...your options here...
})
Name | Description | Required |
---|---|---|
catalog_id | String - The ID of the catalog you are querying | Yes |
attributes | Object - Attributes to query (key being attribute name) | No |
Example response
[
{
"item_id": "ID_HERE",
"segment_id": "ID_HERE",
"id": "ID_HERE",
"path_parts": [
"segments",
"BusinessUnit",
"Student"
],
"parent_path": "/segments/BusinessUnit",
"path": "/segments/BusinessUnit/Student",
"name": "Student",
"type": "item",
"data": {
"attributes": {
"2Code": "ST",
"3Code": "STU"
},
"category": "segment",
"baseTemplate": "segments/Segment"
}
}
]
getAssets
This method will return all offer items that match your inputted options.
limio.getAssets({
...your options here...
})
Name | Description | Required |
---|---|---|
catalog_id | String - The ID of the catalog you are querying | Yes |
assetPath | String - Path of the asset you are querying | Yes |
Example response
{
"path": "/limio/catalogs/1/items/assets/text/javascript/Footerjs",
"position": "Footer",
"props": {
"bgColor": "#2fc151",
"isUpsideDown": false,
"text": "Footer"
}
}
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago